wok-next view openldap/receipt @ rev 1923

Openldap: reconfigure ldap applications
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Dec 23 10:01:16 2008 +0000 (2008-12-23)
parents 03a799424aaa
children bd6010223726
line source
1 # SliTaz package receipt.
3 PACKAGE="openldap"
4 VERSION="2.3.39"
5 CATEGORY="misc"
6 SHORT_DESC="LDAP database system."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-stable-20071118.tgz"
9 WEB_SITE="http://www.openldap.org/"
10 WGET_URL="ftp://ftp.openldap.org/pub/OpenLDAP/$PACKAGE-stable/$TARBALL"
11 DEPENDS="libdb openssl"
12 BUILD_DEPENDS="db-dev libdb"
13 CONFIG_FILES="/etc/openldap/ldap.conf /etc/openldap/slapd.conf"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
19 cd $src
20 ./configure --prefix=/usr --infodir=/usr/share/info \
21 --sysconfdir=/etc --localstatedir=/var \
22 --mandir=/usr/share/man $CONFIGURE_ARGS
23 make
24 make DESTDIR=$PWD/_pkg install
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p $fs/usr
31 cp -a $_pkg/etc $fs
32 cp -a $_pkg/usr/bin $fs/usr
33 cp -a $_pkg/usr/sbin $fs/usr
34 cp -a $_pkg/usr/libexec $fs/usr
35 cp -a $_pkg/var $fs
36 cp -a stuff/etc/init.d $fs/etc
37 chmod 700 $fs/var/openldap-data $fs/etc/openldap
38 # Package all mysql pkgs
39 for i in $(cd $WOK; ls -d openldap-* libldap*)
40 do
41 tazwok genpkg $i
42 done
43 }
45 # Pre and post install commands for Tazpkg.
46 post_install()
47 {
48 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
49 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
50 etc/openldap/ldap.conf
51 etc/openldap/slapd.conf
52 EOT
53 ( cd $1/$INSTALLED/ ; grep -l /etc/openldap/slapd.conf */receipt ) | \
54 while read file; do
55 pkg=$(dirname $file)
56 [ "$pkg" = "$PACKAGE" ] && continue
57 echo "Reconfiguring $pkg for $PACKAGE..."
58 tazpkg reconfigure $pkg
59 done
60 }
62 repack_cleanup()
63 {
64 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
65 }