- Fix and install the .pc (pkg-config) file

This commit is contained in:
Paul Wouters 2014-10-02 15:57:05 -04:00
parent c67d2dd695
commit 8e5ecac1fc

View File

@ -24,7 +24,7 @@
Summary: Low-level DNS(SEC) library with API
Name: ldns
Version: 1.6.17
Release: 9%{?dist}
Release: 10%{?dist}
License: BSD
Url: http://www.nlnetlabs.nl/%{name}/
@ -71,6 +71,7 @@ packets.
Summary: Development package that includes the ldns header files
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel
The devel package contains the ldns library and the include files
@ -129,6 +130,9 @@ This package contains documentation for the ldns library
# autoreconf --install
%build
# fixup .pc file
sed -i "s/@includedir@/@includedir@\/ldns/" packaging/libldns.pc.in
CFLAGS="%{optflags} -fPIC"
CXXFLAGS="%{optflags} -fPIC"
LDFLAGS="-Wl,-z,relro,-z,now -pie"
@ -196,6 +200,7 @@ make %{?_smp_mflags} doc
# specfic hardening options should not end up in ldns-config
sed -i "s/-Wl,-z,relro,-z,now -pie//" packaging/ldns-config
%install
rm -rf %{buildroot}
@ -210,6 +215,8 @@ rm doc/doxyparse.pl
rm -rf doc/man
# remove .la files
rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{python_sitearch}/*.la
# install pkg-config file
install -D -m644 packaging/libldns.pc %{buildroot}%{_libdir}/pkgconfig/ldns.pc
make -C drill DESTDIR=%{buildroot} install
make -C examples DESTDIR=%{buildroot} install
%if %{with perl}
@ -240,6 +247,7 @@ rm -rf %{buildroot}
%files devel
%doc Changelog README
%{_libdir}/libldns*so
%{_libdir}/pkgconfig/ldns.pc
%{_bindir}/ldns-config
%dir %{_includedir}/ldns
%{_includedir}/ldns/*.h
@ -260,6 +268,9 @@ rm -rf %{buildroot}
%doc doc
%changelog
* Thu Oct 02 2014 Paul Wouters <pwouters@redhat.com> - 1.6.17-10
- Fix and install the .pc (pkg-config) file
* Wed Oct 01 2014 Paul Wouters <pwouters@redhat.com> - 1.6.17-9
- Remove hardening options from ldns-config (rhbz#1147972)