wok-next view openldap/receipt @ rev 20545

vmtouch: create $install/usr/bin path
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 03 15:08:22 2018 +0200 (2018-04-03)
parents 0e7893ac206d
children 4a67f7e79846
line source
1 # SliTaz package receipt v2.
3 PACKAGE="openldap"
4 VERSION="2.4.45"
5 CATEGORY="misc"
6 SHORT_DESC="LDAP database system"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://www.openldap.org/"
10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/server/openldap.html"
12 TARBALL="$PACKAGE-$VERSION.tgz"
13 WGET_URL="http://mirror.eu.oneandone.net/software/openldap/openldap-release/$TARBALL"
15 BUILD_DEPENDS="automake util-linux-uuid-dev openssl-dev libtool groff"
16 SPLIT="libldap openldap openldap-dev"
18 compile_rules() {
19 addgroup -g 84 -S ldap
20 adduser -h /var/lib/openldap -g "OpenLDAP Daemon Owner" \
21 -u 84 -s /bin/false -S -D -G ldap ldap
23 autoconf &&
24 ./configure \
25 --libexecdir=/usr/lib \
26 --disable-static \
27 --disable-debug \
28 --with-tls=openssl \
29 --enable-dynamic \
30 --enable-crypt \
31 --disable-bdb \
32 --disable-hdb \
33 $CONFIGURE_ARGS &&
34 sed -i 's|@VERSION_OPTION@||' $src/libraries/*/Makefile &&
35 make depend &&
36 make &&
37 make install || return 1
39 install -Dm0755 $stuff/etc/init.d/openldap $install/etc/init.d/openldap
41 cook_pick_docs doc/drafts doc/rfc doc/guide
42 }
44 genpkg_rules() {
45 case $PACKAGE in
46 libldap)
47 copy *.so*
48 CAT="libs|libraries"
49 DEPENDS="openssl"
50 ;;
51 openldap)
52 copy @std @rm
53 DEPENDS="libldap openssl util-linux-uuid"
54 CONFIG_FILES="/etc/openldap/"
55 DATABASE_FILES="/var/openldap-*"
56 TAZPANEL_DAEMON="man::slapd|help::/usr/libexec/slapd|edit::/etc/openldap/slapd.conf|options::LDAP_OPTIONS|web::$WEB_SITE"
57 ;;
58 *-dev)
59 copy @dev
60 DEPENDS="openldap libldap openssl-dev";;
61 esac
62 }
64 post_install_openldap() {
65 if ! grep -q ldap "$1/etc/passwd"; then
66 action "Adding user/group ldap..."
67 chroot "$1/" addgroup -g 84 -S ldap
68 chroot "$1/" adduser -h /var/lib/openldap -g "OpenLDAP Daemon Owner" \
69 -u 84 -s /bin/false -S -D -G ldap ldap
70 status
71 fi
73 chmod 700 "$1/etc/openldap"
74 chroot "$1/" install -dm700 -o ldap -g ldap /var/lib/openldap
76 chroot "$1/" install -dm700 -o ldap -g ldap /etc/openldap/slapd.d
77 chroot "$1/" chmod 640 /etc/openldap/slapd.conf
78 chroot "$1/" chmod 640 /etc/openldap/slapd.ldif
79 chroot "$1/" chown root:ldap /etc/openldap/slapd.conf
80 chroot "$1/" chown root:ldap /etc/openldap/slapd.ldif
82 ( cd "$1/$INSTALLED/"; grep -l /etc/openldap/slapd.conf */receipt ) | \
83 while read file; do
84 pkg=$(dirname $file)
85 [ "$pkg" == "$PACKAGE" ] && continue
86 echo "Reconfiguring $pkg for $PACKAGE..."
87 chroot "$1/" tazpkg reconfigure $pkg
88 done
89 }