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

icedtea6-jdk: fix compiles_rules to work with tazwok. I know it's a bit messy but I need this.
author Antoine Bodin <gokhlayeh@slitaz.org>
date Fri Mar 09 18:19:26 2012 +0100 (2012-03-09)
parents f81e47267992
children b13ed9740841
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@9036 15 # Rules to configure and make the package.
pascal@9036 16 compile_rules()
pascal@9036 17 {
pascal@9037 18 mkdir -p $DESTDIR
pascal@9036 19 cp -a $src $DESTDIR/$SOURCE
pascal@9036 20 }
pascal@9036 21
pascal@2253 22 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2253 23 genpkg_rules()
pascal@2253 24 {
pascal@2253 25 mkdir -p $fs/usr/share/squirrelmail/plugins $fs/etc/squirrelmail
pascal@9036 26 cp -a $_pkg/$SOURCE $fs/usr/share/squirrelmail/plugins
pascal@2253 27 mv $fs/usr/share/squirrelmail/plugins/$SOURCE/config_sample.php \
pascal@2253 28 $fs/etc/squirrelmail/config-$SOURCE.php
pascal@2253 29 ln -s /etc/squirrelmail/config-$SOURCE.php \
pascal@2253 30 $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php
pascal@2253 31 }
pascal@2253 32
pascal@2253 33 post_install()
pascal@2253 34 {
pascal@2253 35 echo "\$plugins[] = '$SOURCE';" >> $1/etc/squirrelmail/config_local.php
pascal@2253 36 mv $1/usr/share/squirrelmail/functions/file_prefs.php \
pascal@2253 37 $1/usr/share/squirrelmail/functions/file_prefs.php.original
pascal@2253 38 ln -s ../plugins/ldapuserdata/file_prefs.php \
pascal@2253 39 $1/usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 40 cat >> $1/etc/openldap/slapd.conf <<EOT
pascal@2253 41 include /usr/share/squirrelmail/plugins/$SOURCE/doc/squirrelmail.schema
pascal@2253 42 EOT
pascal@2253 43 }
pascal@2253 44
pascal@2260 45 pre_remove()
pascal@2253 46 {
pascal@2253 47 sed -i "/\$plugins.. = '$SOURCE';/d" /etc/squirrelmail/config_local.php
pascal@2253 48 sed -i "/plugins.$SOURCE.doc/d" /etc/openldap/slapd.conf
pascal@2253 49 rm -f /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 50 mv /usr/share/squirrelmail/functions/file_prefs.php.original \
pascal@2253 51 /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 52 }