wok annotate squirrelmail-ldapuser/receipt @ rev 20341

Up tazlito (512)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 07 13:39:00 2018 +0200 (2018-06-07)
parents d51b2411e55e
children 46dcc80bef41
rev   line source
pascal@2253 1 # SliTaz package receipt.
pascal@2253 2
pascal@2253 3 PACKAGE="squirrelmail-ldapuser"
pascal@2253 4 VERSION="0.4"
pascal@2253 5 CATEGORY="network"
pascal@2253 6 SHORT_DESC="LDAP backend for Web mail users' profile/preferences."
pascal@2253 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15200 8 LICENSE="GPL2"
pascal@2253 9 SOURCE="ldapuserdata"
pascal@2253 10 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@2253 11 WEB_SITE="http://www.squirrelmail.org/"
pascal@2253 12 WGET_URL="${WEB_SITE}plugins/$TARBALL"
pascal@2253 13 CONFIG_FILES="/etc/squirrelmail/config-$SOURCE.php"
pascal@16264 14 HOST_ARCH="any"
pascal@2253 15
pascal@15200 16 DEPENDS="squirrelmail openldap"
pascal@15200 17
pascal@9036 18 # Rules to configure and make the package.
pascal@9036 19 compile_rules()
pascal@9036 20 {
pascal@9037 21 mkdir -p $DESTDIR
pascal@9036 22 cp -a $src $DESTDIR/$SOURCE
pascal@9036 23 }
pascal@9036 24
pascal@2253 25 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2253 26 genpkg_rules()
pascal@2253 27 {
pascal@2253 28 mkdir -p $fs/usr/share/squirrelmail/plugins $fs/etc/squirrelmail
pascal@15200 29 cp -a $install/$SOURCE $fs/usr/share/squirrelmail/plugins
pascal@2253 30 mv $fs/usr/share/squirrelmail/plugins/$SOURCE/config_sample.php \
pascal@2253 31 $fs/etc/squirrelmail/config-$SOURCE.php
pascal@2253 32 ln -s /etc/squirrelmail/config-$SOURCE.php \
pascal@2253 33 $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php
pascal@2253 34 }
pascal@2253 35
pascal@2253 36 post_install()
pascal@2253 37 {
pascal@18730 38 echo "\$plugins[] = '$SOURCE';" >> "$1/etc/squirrelmail/config_local.php"
pascal@18730 39 mv "$1/usr/share/squirrelmail/functions/file_prefs.php" \
pascal@18730 40 "$1/usr/share/squirrelmail/functions/file_prefs.php.original"
pascal@2253 41 ln -s ../plugins/ldapuserdata/file_prefs.php \
pascal@18730 42 "$1/usr/share/squirrelmail/functions/file_prefs.php"
pascal@18730 43 cat >> "$1/etc/openldap/slapd.conf" <<EOT
pascal@2253 44 include /usr/share/squirrelmail/plugins/$SOURCE/doc/squirrelmail.schema
pascal@2253 45 EOT
pascal@2253 46 }
pascal@2253 47
pascal@2260 48 pre_remove()
pascal@2253 49 {
pascal@2253 50 sed -i "/\$plugins.. = '$SOURCE';/d" /etc/squirrelmail/config_local.php
pascal@2253 51 sed -i "/plugins.$SOURCE.doc/d" /etc/openldap/slapd.conf
pascal@2253 52 rm -f /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 53 mv /usr/share/squirrelmail/functions/file_prefs.php.original \
pascal@2253 54 /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 55 }