Blame SPECS/compat-openldap.spec

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