add pkg-config from upcoming upstream version
This commit is contained in:
parent
b7ed7743b0
commit
864ebd17a1
11
libmaxminddb.pc.in
Normal file
11
libmaxminddb.pc.in
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@prefix@
|
||||||
|
libdir=@libdir@
|
||||||
|
includedir=@includedir@
|
||||||
|
|
||||||
|
Name: libmaxminddb
|
||||||
|
Description: C library for the MaxMind DB file format
|
||||||
|
URL: http://maxmind.github.io/libmaxminddb/
|
||||||
|
Version: @PACKAGE_VERSION@
|
||||||
|
Libs: -L${libdir} -lmaxminddb
|
||||||
|
Cflags: -I${includedir}
|
@ -1,10 +1,14 @@
|
|||||||
Name: libmaxminddb
|
Name: libmaxminddb
|
||||||
Summary: C library for the MaxMind DB file format
|
Summary: C library for the MaxMind DB file format
|
||||||
Version: 1.1.1
|
Version: 1.1.1
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
URL: https://maxmind.github.io/libmaxminddb
|
URL: https://maxmind.github.io/libmaxminddb
|
||||||
Source0: https://github.com/maxmind/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/maxmind/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Add pkg-config from the upcomming release:
|
||||||
|
# https://github.com/maxmind/libmaxminddb/commit/9b788d0492e6149d01a1088ca15c85315a8113d0
|
||||||
|
Source1: libmaxminddb.pc.in
|
||||||
|
|
||||||
# original libmaxminddb code is Apache Licence 2.0
|
# original libmaxminddb code is Apache Licence 2.0
|
||||||
# src/maxminddb-compat-util.h is BSD
|
# src/maxminddb-compat-util.h is BSD
|
||||||
License: ASL 2.0 and BSD
|
License: ASL 2.0 and BSD
|
||||||
@ -14,6 +18,7 @@ The package contains libmaxminddb library.
|
|||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: pkgconfig
|
||||||
Summary: Development header files for libmaxminddb
|
Summary: Development header files for libmaxminddb
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
@ -31,6 +36,12 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
|||||||
# link only requried libraries
|
# link only requried libraries
|
||||||
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
|
sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
# generate pkg-config file
|
||||||
|
sed -e 's;@prefix@;%{_prefix};g' \
|
||||||
|
-e 's;@libdir@;%{_libdir};g' \
|
||||||
|
-e 's;@includedir@;%{_includedir};g' \
|
||||||
|
-e 's;@PACKAGE_VERSION@;%{version};g' \
|
||||||
|
%{SOURCE1} > %{name}.pc
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# tests are linked dynamically, preload the library as we have removed RPATH
|
# tests are linked dynamically, preload the library as we have removed RPATH
|
||||||
@ -39,6 +50,9 @@ LD_PRELOAD=%{buildroot}%{_libdir}/libmaxminddb.so make check
|
|||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
rm -fv %{buildroot}%{_libdir}/*.la
|
rm -fv %{buildroot}%{_libdir}/*.la
|
||||||
|
# install generated pkg-config
|
||||||
|
mkdir -p %{buildroot}%{_libdir}/pkgconfig
|
||||||
|
install -m 0644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -55,11 +69,14 @@ rm -fv %{buildroot}%{_libdir}/*.la
|
|||||||
%{_includedir}/maxminddb.h
|
%{_includedir}/maxminddb.h
|
||||||
%{_includedir}/maxminddb_config.h
|
%{_includedir}/maxminddb_config.h
|
||||||
%{_libdir}/libmaxminddb.so
|
%{_libdir}/libmaxminddb.so
|
||||||
|
%{_libdir}/pkgconfig/libmaxminddb.pc
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 15 2015 Jan Vcelak <jvcelak@fedoraproject.org> 1.1.1-5
|
||||||
|
- add pkg-config file from the upcoming upstream version
|
||||||
|
|
||||||
* Mon Sep 14 2015 Jan Vcelak <jvcelak@fedoraproject.org> 1.1.1-4
|
* Mon Sep 14 2015 Jan Vcelak <jvcelak@fedoraproject.org> 1.1.1-4
|
||||||
- remove utils subpackage and place mmdblookup into devel subpackage
|
- remove utils subpackage and place mmdblookup into devel subpackage
|
||||||
- remove Group from the spec file
|
- remove Group from the spec file
|
||||||
|
Loading…
Reference in New Issue
Block a user