wok-6.x annotate squirrelmail-ldapuser/receipt @ rev 5775

Up: slitaz-tools-boxes 3.8.1
author Antoine Bodin <gokhlayeh@mailoo.org>
date Wed Jul 07 19:33:09 2010 +0200 (2010-07-07)
parents fb1f0177e4ef
children f81e47267992
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@2253 8 SOURCE="ldapuserdata"
pascal@2253 9 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@2253 10 WEB_SITE="http://www.squirrelmail.org/"
pascal@2253 11 DEPENDS="squirrelmail openldap"
pascal@2253 12 WGET_URL="${WEB_SITE}plugins/$TARBALL"
pascal@2253 13 CONFIG_FILES="/etc/squirrelmail/config-$SOURCE.php"
pascal@2253 14
pascal@2253 15 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2253 16 genpkg_rules()
pascal@2253 17 {
pascal@2253 18 mkdir -p $fs/usr/share/squirrelmail/plugins $fs/etc/squirrelmail
pascal@2253 19 cp -a $SOURCE $fs/usr/share/squirrelmail/plugins
pascal@2253 20 mv $fs/usr/share/squirrelmail/plugins/$SOURCE/config_sample.php \
pascal@2253 21 $fs/etc/squirrelmail/config-$SOURCE.php
pascal@2253 22 ln -s /etc/squirrelmail/config-$SOURCE.php \
pascal@2253 23 $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php
pascal@2253 24 }
pascal@2253 25
pascal@2253 26 post_install()
pascal@2253 27 {
pascal@2253 28 echo "\$plugins[] = '$SOURCE';" >> $1/etc/squirrelmail/config_local.php
pascal@2253 29 mv $1/usr/share/squirrelmail/functions/file_prefs.php \
pascal@2253 30 $1/usr/share/squirrelmail/functions/file_prefs.php.original
pascal@2253 31 ln -s ../plugins/ldapuserdata/file_prefs.php \
pascal@2253 32 $1/usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 33 cat >> $1/etc/openldap/slapd.conf <<EOT
pascal@2253 34 include /usr/share/squirrelmail/plugins/$SOURCE/doc/squirrelmail.schema
pascal@2253 35 EOT
pascal@2253 36 }
pascal@2253 37
pascal@2260 38 pre_remove()
pascal@2253 39 {
pascal@2253 40 sed -i "/\$plugins.. = '$SOURCE';/d" /etc/squirrelmail/config_local.php
pascal@2253 41 sed -i "/plugins.$SOURCE.doc/d" /etc/openldap/slapd.conf
pascal@2253 42 rm -f /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 43 mv /usr/share/squirrelmail/functions/file_prefs.php.original \
pascal@2253 44 /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 45 }