wok annotate squirrelmail-ldapuser/receipt @ rev 16042

Add to ARM: sqlite ptunnel libpcap gdbm gc
author Christophe Lincoln <pankso@slitaz.org>
date Sun Mar 09 16:31:15 2014 +0100 (2014-03-09)
parents 91a615759636
children d51b2411e55e
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@2253 14
pascal@15200 15 DEPENDS="squirrelmail openldap"
pascal@15200 16
pascal@9036 17 # Rules to configure and make the package.
pascal@9036 18 compile_rules()
pascal@9036 19 {
pascal@9037 20 mkdir -p $DESTDIR
pascal@9036 21 cp -a $src $DESTDIR/$SOURCE
pascal@9036 22 }
pascal@9036 23
pascal@2253 24 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2253 25 genpkg_rules()
pascal@2253 26 {
pascal@2253 27 mkdir -p $fs/usr/share/squirrelmail/plugins $fs/etc/squirrelmail
pascal@15200 28 cp -a $install/$SOURCE $fs/usr/share/squirrelmail/plugins
pascal@2253 29 mv $fs/usr/share/squirrelmail/plugins/$SOURCE/config_sample.php \
pascal@2253 30 $fs/etc/squirrelmail/config-$SOURCE.php
pascal@2253 31 ln -s /etc/squirrelmail/config-$SOURCE.php \
pascal@2253 32 $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php
pascal@2253 33 }
pascal@2253 34
pascal@2253 35 post_install()
pascal@2253 36 {
pascal@2253 37 echo "\$plugins[] = '$SOURCE';" >> $1/etc/squirrelmail/config_local.php
pascal@2253 38 mv $1/usr/share/squirrelmail/functions/file_prefs.php \
pascal@2253 39 $1/usr/share/squirrelmail/functions/file_prefs.php.original
pascal@2253 40 ln -s ../plugins/ldapuserdata/file_prefs.php \
pascal@2253 41 $1/usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 42 cat >> $1/etc/openldap/slapd.conf <<EOT
pascal@2253 43 include /usr/share/squirrelmail/plugins/$SOURCE/doc/squirrelmail.schema
pascal@2253 44 EOT
pascal@2253 45 }
pascal@2253 46
pascal@2260 47 pre_remove()
pascal@2253 48 {
pascal@2253 49 sed -i "/\$plugins.. = '$SOURCE';/d" /etc/squirrelmail/config_local.php
pascal@2253 50 sed -i "/plugins.$SOURCE.doc/d" /etc/openldap/slapd.conf
pascal@2253 51 rm -f /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 52 mv /usr/share/squirrelmail/functions/file_prefs.php.original \
pascal@2253 53 /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 54 }