wok annotate squirrelmail-ldapuser/receipt @ rev 18682

Add mps-youtube (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Dec 09 18:50:42 2015 +0100 (2015-12-09)
parents b13ed9740841
children 9e01bc6321ea
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@2253 38 echo "\$plugins[] = '$SOURCE';" >> $1/etc/squirrelmail/config_local.php
pascal@2253 39 mv $1/usr/share/squirrelmail/functions/file_prefs.php \
pascal@2253 40 $1/usr/share/squirrelmail/functions/file_prefs.php.original
pascal@2253 41 ln -s ../plugins/ldapuserdata/file_prefs.php \
pascal@2253 42 $1/usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 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 }