Name: libmaxminddb Summary: C library for the MaxMind DB file format Version: 1.6.0 Release: 1%{?dist} Group: System/Libraries URL: https://maxmind.github.io/libmaxminddb Source0: https://github.com/maxmind/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz License: Apache License 2.0 BuildRequires: gcc BuildRequires: perl-interpreter %description The package contains libmaxminddb library. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig Summary: Development header files for libmaxminddb Group: System/Libraries %description devel The package contains development header files for the libmaxminddb library and the mmdblookup utility which allows IP address lookup in a MaxMind DB file. %prep %setup -q %build %configure --disable-static # remove embeded RPATH sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool # link only requried libraries sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool make %{?_smp_mflags} %check # tests are linked dynamically, preload the library as we have removed RPATH LD_PRELOAD=%{buildroot}%{_libdir}/libmaxminddb.so make check %install %make_install rm -fv %{buildroot}%{_libdir}/*.la %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license LICENSE %{_libdir}/libmaxminddb.so.* %files devel %license NOTICE %doc Changes.md %{_bindir}/mmdblookup %{_includedir}/maxminddb.h %{_includedir}/maxminddb_config.h %{_libdir}/libmaxminddb.so %{_libdir}/pkgconfig/libmaxminddb.pc %{_mandir}/man1/* %{_mandir}/man3/* %changelog * Mon Jan 20 2022 Alan Miao 1.6.0-1 - initial version of the package