Search
SailfishOS Open Build Service
>
Projects
>
home:kontio
:
nfs
>
openldap
> openldap.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File openldap.spec of Package openldap
%define version 2.4.21 Summary: LDAP support libraries Name: openldap Version: 2.4.24 Release: 1 License: OpenLDAP Group: System/Daemons Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz # Patches for 2.4 Patch0: openldap-2.4.6-config.patch Patch1: openldap-2.0.11-ldaprc.patch Patch2: openldap-2.2.13-setugid.patch Patch3: openldap-2.4.6-pie.patch Patch4: openldap-2.3.11-toollinks.patch Patch5: openldap-2.4.6-nosql.patch Patch6: openldap-2.3.19-gethostbyXXXX_r.patch Patch9: openldap-2.3.37-smbk5pwd.patch Patch10: openldap-2.4.6-multilib.patch Patch11: openldap-2.4.24-doc-cacertdir.patch URL: http://www.openldap.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: cyrus-sasl-devel >= 2.1, gdbm-devel, libtool >= 1.5.6-2, krb5-devel BuildRequires: openssl-devel, pam-devel, perl, pkgconfig BuildRequires: libtool-ltdl-devel, groff Requires: glibc >= 2.2.3-48, mktemp %description OpenLDAP is an open source suite of LDAP (Lightweight Directory Access Protocol) applications and development tools. LDAP is a set of protocols for accessing directory services (usually phone book style information, but other information is possible) over the Internet, similar to the way DNS (Domain Name System) information is propagated over the Internet. The openldap package contains configuration files, libraries, and documentation for OpenLDAP. %package devel Summary: LDAP development libraries and header files Group: Development/Libraries Requires: openldap = %{version}-%{release}, cyrus-sasl-devel >= 2.1 Provides: openldap-evolution-devel = %{version}-%{release} %description devel The openldap-devel package includes the development libraries and header files needed for compiling applications that use LDAP (Lightweight Directory Access Protocol) internals. LDAP is a set of protocols for enabling directory services over the Internet. Install this package only if you plan to develop or will need to compile customized LDAP clients. %package clients Summary: LDAP client utilities Requires: openldap = %{version}-%{release} Group: Applications/Internet %description clients OpenLDAP is an open-source suite of LDAP (Lightweight Directory Access Protocol) applications and development tools. LDAP is a set of protocols for accessing directory services (usually phone book style information, but other information is possible) over the Internet, similar to the way DNS (Domain Name System) information is propagated over the Internet. The openldap-clients package contains the client programs needed for accessing and modifying OpenLDAP directories. %prep %setup -q %patch0 -p1 -b .config %patch1 -p1 -b .ldaprc %patch2 -p1 -b .setugid %patch3 -p1 -b .pie %patch4 -p1 -b .toollinks %patch5 -p1 -b .nosql %patch6 -p1 -b .gethostbyname_r %patch9 -p1 -b .smbk5pwd %patch10 -p1 -b .multilib %patch11 -p1 -b .cacertdir cp %{_datadir}/libtool/config/config.{sub,guess} build/ for subdir in build-servers build-clients ; do mkdir $subdir ln -s ../configure $subdir done # build smbk5pwd with other overlays ln -s ../../../contrib/slapd-modules/smbk5pwd/smbk5pwd.c servers/slapd/overlays mv contrib/slapd-modules/smbk5pwd/README contrib/slapd-modules/smbk5pwd/README.smbk5pwd %build libtool='%{_bindir}/libtool' tagname=CC; export tagname export CFLAGS="$RPM_OPT_FLAGS -D_REENTRANT -fPIC -D_GNU_SOURCE" build() { %configure \ --with-threads=posix \ \ --enable-local --enable-rlookups \ \ --with-tls \ --with-cyrus-sasl \ \ --enable-wrappers \ \ --enable-passwd \ \ --enable-cleartext \ --enable-crypt \ --enable-spasswd \ --enable-lmpasswd \ --enable-modules \ --disable-sql \ \ --libexecdir=%{_libdir} \ $@ make %{_smp_mflags} LIBTOOL="$libtool" } # Build clients without Kerberos password-checking support, which is only # useful in the server anyway, to avoid stray dependencies. pushd build-clients build \ --disable-slapd \ --enable-shared \ --enable-dynamic \ --without-kerberos \ --with-pic popd %install libtool='%{_bindir}/libtool' tagname=CC; export tagname mkdir -p $RPM_BUILD_ROOT/%{_libdir}/ pushd build-clients make install DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} LIBTOOL="$libtool" STRIP="" popd # Create this directory so that authconfig setting TLS_CACERT to # /etc/openldap/cacerts doesn't cause TLS startup of any kind to fail # when the directory doesn't exist. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/openldap/cacerts # Create the data directory. mkdir -p $RPM_BUILD_ROOT/var/lib/ldap # Create the new run directory mkdir -p $RPM_BUILD_ROOT/var/run/openldap # Hack the build root out of the default config files. perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/*.conf # Get the buildroot out of the man pages. perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT%{_mandir}/*/*.* # We don't need the default files -- RPM handles changes. rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/*.default rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/schema/*.default # Tweak permissions on the libraries to make sure they're correct. chmod 755 $RPM_BUILD_ROOT/%{_libdir}/lib*.so* chmod 644 $RPM_BUILD_ROOT/%{_libdir}/lib*.*a # Remove files which we don't want packaged. rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a rm -f $RPM_BUILD_ROOT/%{evolution_connector_libdir}/*.la rm -f $RPM_BUILD_ROOT/%{evolution_connector_libdir}/*.so* rm -f $RPM_BUILD_ROOT/%{_libdir}/openldap/*.a rm -f $RPM_BUILD_ROOT/%{_libdir}/openldap/*.so #rm -f $RPM_BUILD_ROOT%{_localstatedir}/openldap-data/DB_CONFIG.example #rmdir $RPM_BUILD_ROOT%{_localstatedir}/openldap-data rm -rf %{buildroot}%{_mandir}/man{5,8}/slap* %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post devel -p /sbin/ldconfig %postun devel -p /sbin/ldconfig %files %defattr(-,root,root) %doc COPYRIGHT %doc LICENSE %doc README %attr(0755,root,root) %dir %{_sysconfdir}/openldap %attr(0755,root,root) %dir %{_sysconfdir}/openldap/cacerts %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/openldap/ldap*.conf %attr(0755,root,root) %{_libdir}/liblber-2.4*.so.* %attr(0755,root,root) %{_libdir}/libldap-2.4*.so.* %attr(0755,root,root) %{_libdir}/libldap_r-2.4*.so.* %attr(0644,root,root) %{_mandir}/man5/ldif.5* %attr(0644,root,root) %{_mandir}/man5/ldap.conf.5* %files clients %defattr(-,root,root) %attr(0755,root,root) %{_bindir}/* %attr(0644,root,root) %{_mandir}/man1/* %files devel %defattr(-,root,root) %doc doc/drafts doc/rfc %attr(0755,root,root) %{_libdir}/libl*.so %attr(0644,root,root) %{_includedir}/* %attr(0644,root,root) %{_mandir}/man3/*