wok-next view squirrelmail-ldapuser/receipt @ rev 21351

updated faad2 (2.8.8 -> 2.9.1)
author Hans-G?nter Theisgen
date Fri Apr 10 07:14:21 2020 +0100 (2020-04-10)
parents c4e53a39395a
children
line source
1 # SliTaz package receipt.
3 PACKAGE="squirrelmail-ldapuser"
4 VERSION="0.4"
5 CATEGORY="network"
6 SHORT_DESC="LDAP backend for Web mail users' profile/preferences"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 SOURCE="ldapuserdata"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.squirrelmail.org/"
12 WGET_URL="${WEB_SITE}plugins/$TARBALL"
13 CONFIG_FILES="/etc/squirrelmail/config-$SOURCE.php"
15 DEPENDS="squirrelmail openldap"
17 compile_rules() {
18 mkdir -p $install
19 cp -a $src $install/$SOURCE
20 }
22 genpkg_rules() {
23 mkdir -p $fs/usr/share/squirrelmail/plugins $fs/etc/squirrelmail
24 cp -a $install/$SOURCE $fs/usr/share/squirrelmail/plugins
25 mv $fs/usr/share/squirrelmail/plugins/$SOURCE/config_sample.php \
26 $fs/etc/squirrelmail/config-$SOURCE.php
27 ln -s /etc/squirrelmail/config-$SOURCE.php \
28 $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php
29 }
31 post_install() {
32 echo "\$plugins[] = '$SOURCE';" >> "$1/etc/squirrelmail/config_local.php"
33 mv "$1/usr/share/squirrelmail/functions/file_prefs.php" \
34 "$1/usr/share/squirrelmail/functions/file_prefs.php.original"
35 ln -s ../plugins/ldapuserdata/file_prefs.php \
36 "$1/usr/share/squirrelmail/functions/file_prefs.php"
37 cat >> "$1/etc/openldap/slapd.conf" <<EOT
38 include /usr/share/squirrelmail/plugins/$SOURCE/doc/squirrelmail.schema
39 EOT
40 }
42 pre_remove() {
43 sed -i "/\$plugins.. = '$SOURCE';/d" /etc/squirrelmail/config_local.php
44 sed -i "/plugins.$SOURCE.doc/d" /etc/openldap/slapd.conf
45 rm -f /usr/share/squirrelmail/functions/file_prefs.php
46 mv /usr/share/squirrelmail/functions/file_prefs.php.original \
47 /usr/share/squirrelmail/functions/file_prefs.php
48 }