wok annotate squirrelmail-ldapuser/receipt @ rev 24463

updated dar (2.6.7 -> 2.7.3)
author Hans-G?nter Theisgen
date Thu Feb 17 07:23:25 2022 +0100 (2022-02-17)
parents 9e01bc6321ea
children cb67b4f8be05
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@24094 18 current_version()
pascal@24094 19 {
pascal@24094 20 wget -O - "$WEB_SITE/plugin_view.php?id=97" 2>/dev/null | \
pascal@24094 21 sed "/tarball/!d;s|.*$SOURCE.||;s|.tar.*||;q"
pascal@24094 22 }
pascal@24094 23
pascal@9036 24 # Rules to configure and make the package.
pascal@9036 25 compile_rules()
pascal@9036 26 {
pascal@9037 27 mkdir -p $DESTDIR
pascal@9036 28 cp -a $src $DESTDIR/$SOURCE
pascal@9036 29 }
pascal@9036 30
pascal@2253 31 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2253 32 genpkg_rules()
pascal@2253 33 {
pascal@2253 34 mkdir -p $fs/usr/share/squirrelmail/plugins $fs/etc/squirrelmail
pascal@15200 35 cp -a $install/$SOURCE $fs/usr/share/squirrelmail/plugins
pascal@2253 36 mv $fs/usr/share/squirrelmail/plugins/$SOURCE/config_sample.php \
pascal@2253 37 $fs/etc/squirrelmail/config-$SOURCE.php
pascal@2253 38 ln -s /etc/squirrelmail/config-$SOURCE.php \
pascal@2253 39 $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php
pascal@2253 40 }
pascal@2253 41
pascal@2253 42 post_install()
pascal@2253 43 {
pascal@18730 44 echo "\$plugins[] = '$SOURCE';" >> "$1/etc/squirrelmail/config_local.php"
pascal@18730 45 mv "$1/usr/share/squirrelmail/functions/file_prefs.php" \
pascal@18730 46 "$1/usr/share/squirrelmail/functions/file_prefs.php.original"
pascal@2253 47 ln -s ../plugins/ldapuserdata/file_prefs.php \
pascal@18730 48 "$1/usr/share/squirrelmail/functions/file_prefs.php"
pascal@18730 49 cat >> "$1/etc/openldap/slapd.conf" <<EOT
pascal@2253 50 include /usr/share/squirrelmail/plugins/$SOURCE/doc/squirrelmail.schema
pascal@2253 51 EOT
pascal@2253 52 }
pascal@2253 53
pascal@2260 54 pre_remove()
pascal@2253 55 {
pascal@2253 56 sed -i "/\$plugins.. = '$SOURCE';/d" /etc/squirrelmail/config_local.php
pascal@2253 57 sed -i "/plugins.$SOURCE.doc/d" /etc/openldap/slapd.conf
pascal@2253 58 rm -f /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 59 mv /usr/share/squirrelmail/functions/file_prefs.php.original \
pascal@2253 60 /usr/share/squirrelmail/functions/file_prefs.php
pascal@2253 61 }