Blame SPECS/compat-openldap.spec

5fcfe9
%global _hardened_build 1
5fcfe9
5fcfe9
Summary: OpenLDAP compatibility shared libraries
5fcfe9
Name: compat-openldap
5fcfe9
Epoch: 1
5fcfe9
Version: 2.3.43
ade838
Release: 5%{?dist}
5fcfe9
License: OpenLDAP
5fcfe9
Group: System Environment/Libraries
5fcfe9
URL: http://www.openldap.org/
5fcfe9
5fcfe9
Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz
5fcfe9
5fcfe9
Patch0: openldap-ldaprc.patch
5fcfe9
Patch1: openldap-gethostbyXXXX_r.patch
5fcfe9
Patch2: openldap-setugid.patch
5fcfe9
Patch3: openldap-config-sasl-options.patch
5fcfe9
Patch4: openldap-network-timeout.patch
5fcfe9
Patch5: openldap-chase-referral.patch
5fcfe9
Patch6: openldap-tls-null-char.patch
5fcfe9
Patch7: openldap-compat-macros.patch
5fcfe9
Patch8: openldap-ai-addrconfig.patch
5fcfe9
5fcfe9
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
5fcfe9
BuildRequires: glibc-devel, cyrus-sasl-devel >= 2.1, openssl-devel
5fcfe9
# require current OpenLDAP libraries to have /etc/openldap/ldap.conf
5fcfe9
Requires: openldap >= 2.4
5fcfe9
5fcfe9
%description
5fcfe9
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
5fcfe9
Protocol) applications and development tools. The compat-openldap package
5fcfe9
includes older versions of the OpenLDAP shared libraries which may be
5fcfe9
required by some applications.
5fcfe9
5fcfe9
5fcfe9
%prep
5fcfe9
%setup -q -n openldap-%{version}
5fcfe9
5fcfe9
for patch in %patches; do
5fcfe9
	%__patch -p1 -i $patch
5fcfe9
done
5fcfe9
5fcfe9
5fcfe9
%build
5fcfe9
5fcfe9
export CFLAGS="%{optflags} -fPIC -D_GNU_SOURCE -D_REENTRANT -fno-strict-aliasing"
5fcfe9
5fcfe9
%configure \
5fcfe9
	--enable-debug \
5fcfe9
	--enable-dynamic \
5fcfe9
	--disable-syslog \
5fcfe9
	--disable-proctitle \
5fcfe9
	--enable-ipv6 \
5fcfe9
	--enable-local \
5fcfe9
	\
5fcfe9
	--disable-slapd \
5fcfe9
	--disable-slurpd \
5fcfe9
	\
5fcfe9
	--disable-modules \
5fcfe9
	--disable-backends \
5fcfe9
	--disable-overlays \
5fcfe9
	\
5fcfe9
	--disable-static \
5fcfe9
	--enable-shared \
5fcfe9
	\
5fcfe9
	--with-cyrus-sasl \
5fcfe9
	--without-fetch \
5fcfe9
	--with-threads \
5fcfe9
	--with-tls=openssl \
5fcfe9
	--with-gnu-ld \
5fcfe9
	--with-pic
5fcfe9
5fcfe9
# get rid of rpath
5fcfe9
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
5fcfe9
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
5fcfe9
5fcfe9
make %{?_smp_mflags}
5fcfe9
5fcfe9
5fcfe9
%install
5fcfe9
rm -rf %{buildroot}
5fcfe9
5fcfe9
pushd libraries
5fcfe9
	make install DESTDIR=%{buildroot}
5fcfe9
5fcfe9
	# drop libarchive files
5fcfe9
	rm -f %{buildroot}%{_libdir}/*.la
5fcfe9
5fcfe9
	# two sets of libraries share the soname, compat is not default
5fcfe9
	rm -f %{buildroot}/%{_libdir}/*.so
5fcfe9
5fcfe9
	# fix permissions to correctly generate debuginfo
5fcfe9
	chmod 0755 %{buildroot}/%{_libdir}/*
5fcfe9
popd
5fcfe9
5fcfe9
# remove all configuration files
5fcfe9
rm -rf %{buildroot}/etc
5fcfe9
5fcfe9
5fcfe9
%clean
5fcfe9
rm -rf %{buildroot}
5fcfe9
5fcfe9
%post -p /sbin/ldconfig
5fcfe9
5fcfe9
%postun -p /sbin/ldconfig
5fcfe9
5fcfe9
%files
5fcfe9
%defattr(-,root,root,-)
5fcfe9
%doc ANNOUNCEMENT
5fcfe9
%doc COPYRIGHT
5fcfe9
%doc LICENSE
5fcfe9
%attr(0755,root,root) %{_libdir}/liblber-2.3.so.*
5fcfe9
%attr(0755,root,root) %{_libdir}/libldap-2.3.so.*
5fcfe9
%attr(0755,root,root) %{_libdir}/libldap_r-2.3.so.*
5fcfe9
5fcfe9
5fcfe9
%changelog
ade838
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1:2.3.43-5
ade838
- Mass rebuild 2014-01-24
ade838
ade838
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1:2.3.43-4
ade838
- Mass rebuild 2013-12-27
ade838
5fcfe9
* Tue May 07 2013 Jan Synáček <jsynacek@redhat.com> - 1:2.3.43-3.2
5fcfe9
- Remove undefined rpm macros (#960090)
5fcfe9
5fcfe9
* Fri Apr 19 2013 Daniel Mach <dmach@redhat.com> - 1:2.3.43-3.1
5fcfe9
- Rebuild for cyrus-sasl
5fcfe9
5fcfe9
* Wed Aug 15 2012 Jan Vcelak <jvcelak@redhat.com> 1:2.3.43-3
5fcfe9
- enhancement: build with hardening flags (RELRO)
5fcfe9
- fix: querying for IPv6 DNS records when IPv6 is disabled on the host (#835013)
5fcfe9
- drop unnecessary patches
5fcfe9
- clean configure flags
5fcfe9
5fcfe9
* Mon Nov 22 2010 Jan Vcelak <jvcelak@redhat.com> 1:2.3.43-2
5fcfe9
- run ldconfig in post and postun
5fcfe9
- remove rpath
5fcfe9
5fcfe9
* Thu Nov 11 2010 Jan Vcelak <jvcelak@redhat.com> 1:2.3.43-1
5fcfe9
- split from openldap package