wok-next view openldap/receipt @ rev 20454

Choose between libpng16 and libpng12
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Feb 28 17:32:31 2018 +0200 (2018-02-28)
parents 9278a60d6895
children 757d032c55c7
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 --sysconfdir=/etc \
26 --localstatedir=/var \
27 --libexecdir=/usr/lib \
28 --disable-static \
29 --disable-debug \
30 --with-tls=openssl \
31 --enable-dynamic \
32 --enable-crypt \
33 --disable-bdb \
34 --disable-hdb \
35 $CONFIGURE_ARGS &&
36 sed -i 's|@VERSION_OPTION@||' $src/libraries/*/Makefile &&
37 make depend && make && 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 }