enhancement: generate openldap.pc (#1171493)

This commit is contained in:
Jan Synacek 2014-12-09 12:34:25 +01:00
parent 4b2abac9db
commit 79a0b58108

View File

@ -5,7 +5,7 @@
Name: openldap
Version: 2.4.40
Release: 2%{?dist}
Release: 3%{?dist}
Summary: LDAP support libraries
Group: System Environment/Daemons
License: OpenLDAP
@ -72,6 +72,7 @@ libraries, and documentation for OpenLDAP.
Summary: LDAP development libraries and header files
Group: Development/Libraries
Requires: openldap%{?_isa} = %{version}-%{release}, cyrus-sasl-devel%{?_isa}
Requires: pkgconfig
%description devel
The openldap-devel package includes the development libraries and
@ -246,6 +247,20 @@ make LDAP_INC="-I../openldap-%{version}/include \
-I../openldap-%{version}/build-servers/include"
popd
# generate openldap.pc
echo "prefix=/usr
exec_prefix=/usr
libdir=%{_libdir}
includedir=%{_includedir}
Name: %{name}
Description: LDAP (Lightweight Directory Access Protocol) development libraries
URL: http://www.openldap.org/
Version: %{version}
Libs: -L\${libdir} -lldap
Cflags: -I\${includedir}
" > openldap.pc
%install
mkdir -p %{buildroot}%{_libdir}/
@ -350,6 +365,10 @@ mv %{buildroot}%{_sysconfdir}/openldap/DB_CONFIG.example %{buildroot}%{_datadir}
chmod 0644 openldap-%{version}/servers/slapd/back-sql/rdbms_depend/timesten/*.sh
chmod 0644 %{buildroot}%{_datadir}/openldap-servers/DB_CONFIG.example
# package generated openldap.pc
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
install -m 0644 openldap.pc %{buildroot}%{_libdir}/pkgconfig/
# remove files which we don't want packaged
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_libdir}/openldap/*.so
@ -572,10 +591,15 @@ exit 0
%files devel
%doc openldap-%{version}/doc/drafts openldap-%{version}/doc/rfc
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/
%{_libdir}/pkgconfig/openldap.pc
%{_includedir}/*
%{_mandir}/man3/*
%changelog
* Tue Dec 9 2014 Jan Synáček <jsynacek@redhat.com> - 2.4.40-3
- enhancement: generate openldap.pc (#1171493)
* Fri Nov 14 2014 Jan Synáček <jsynacek@redhat.com> - 2.4.40-2
- enhancement: support TLSv1 and later (#1160466)