]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - openldap/openldap.nm
openldap: Update to 2.4.32.
[people/ms/ipfire-3.x.git] / openldap / openldap.nm
index fa98c0f93c688f46ebeaae5291d850ebc1f6262f..1f80a015edd4b838ddc0665bfa5b853b191213b5 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = openldap
-version    = 2.4.25
-release    = 2
+version    = 2.4.32
+release    = 1
 
 groups     = System/Daemons
 url        = http://www.openldap.org/
@@ -21,7 +21,7 @@ description
        documentation for OpenLDAP.
 end
 
-source_dl  =
+source_dl  = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/
 sources    = %{thisapp}.tgz
 
 build
@@ -36,7 +36,7 @@ build
        end
 
        configure_options += \
-               --libexecdir=/usr/lib \
+               --libexecdir=%{libdir} \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --with-threads=posix \
@@ -51,13 +51,8 @@ build
                --enable-ndb=no \
                --disable-static
 
-# Doens't seem to work in chroot.
-#define test
-#      cd %{DIR_APP} && make check
-#endef
-
        install_cmds
-               mv -v %{BUILDROOT}/usr/lib/slapd %{BUILDROOT}/usr/sbin/slapd
+               mv -v %{BUILDROOT}%{libdir}/slapd %{BUILDROOT}/usr/sbin/slapd
                ln -svf slapd %{BUILDROOT}/usr/sbin/slapacl
                ln -svf slapd %{BUILDROOT}/usr/sbin/slapadd
                ln -svf slapd %{BUILDROOT}/usr/sbin/slapauth
@@ -71,7 +66,7 @@ build
                rm -rvf %{BUILDROOT}/var/openldap-data
 
                for LINK in lber ldap ldap_r; do
-                       chmod -v 0755 %{BUILDROOT}/usr/lib/$(readlink %{BUILDROOT}/usr/lib/lib${LINK}.so)
+                       chmod -v 0755 %{BUILDROOT}%{libdir}/$(readlink %{BUILDROOT}%{libdir}/lib${LINK}.so)
                done
 
                # Install configuration
@@ -85,6 +80,24 @@ end
 
 packages
        package %{name}
+               script postin
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script preun
+                       systemctl --no-reload disable openldap.service >/dev/null 2>&1 || :
+                       systemctl stop openldap.service >/dev/null 2>&1 || :
+               end
+
+               script postun
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl try-restart openldap.service >/dev/null 2>&1 || :
+               end
+       end
 
        package %{name}-libs
                template LIBS