wok-next view openldap/receipt @ rev 20667
qemu/qemu-light: race condition, ppp/sane-backends: set group
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 11 09:27:12 2018 +0200 (2018-05-11) |
parents | 757d032c55c7 |
children | e7a485521d6a |
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 fix libtool &&
35 sed -i 's|@VERSION_OPTION@||' $src/libraries/*/Makefile &&
36 make depend &&
37 make &&
38 make install || return 1
40 install -Dm0755 $stuff/etc/init.d/openldap $install/etc/init.d/openldap
42 cook_pick_docs doc/drafts doc/rfc doc/guide
43 }
45 genpkg_rules() {
46 case $PACKAGE in
47 libldap)
48 copy *.so*
49 CAT="libs|libraries"
50 DEPENDS="openssl"
51 ;;
52 openldap)
53 copy @std @rm
54 DEPENDS="libldap openssl util-linux-uuid"
55 CONFIG_FILES="/etc/openldap/"
56 DATABASE_FILES="/var/openldap-*"
57 TAZPANEL_DAEMON="man::slapd|help::/usr/libexec/slapd|edit::/etc/openldap/slapd.conf|options::LDAP_OPTIONS|web::$WEB_SITE"
58 ;;
59 *-dev)
60 copy @dev
61 DEPENDS="openldap libldap openssl-dev";;
62 esac
63 }
65 post_install_openldap() {
66 if ! grep -q ldap "$1/etc/passwd"; then
67 action "Adding user/group ldap..."
68 chroot "$1/" addgroup -g 84 -S ldap
69 chroot "$1/" adduser -h /var/lib/openldap -g "OpenLDAP Daemon Owner" \
70 -u 84 -s /bin/false -S -D -G ldap ldap
71 status
72 fi
74 chmod 700 "$1/etc/openldap"
75 chroot "$1/" install -dm700 -o ldap -g ldap /var/lib/openldap
77 chroot "$1/" install -dm700 -o ldap -g ldap /etc/openldap/slapd.d
78 chroot "$1/" chmod 640 /etc/openldap/slapd.conf
79 chroot "$1/" chmod 640 /etc/openldap/slapd.ldif
80 chroot "$1/" chown root:ldap /etc/openldap/slapd.conf
81 chroot "$1/" chown root:ldap /etc/openldap/slapd.ldif
83 ( cd "$1/$INSTALLED/"; grep -l /etc/openldap/slapd.conf */receipt ) | \
84 while read file; do
85 pkg=$(dirname $file)
86 [ "$pkg" == "$PACKAGE" ] && continue
87 echo "Reconfiguring $pkg for $PACKAGE..."
88 chroot "$1/" tazpkg reconfigure $pkg
89 done
90 }