wok-current view squirrelmail-ldapuser/receipt @ rev 24836
updated libtasn1 and libtasn1-dev (4.16.0 -> 4.18.0)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Mar 25 07:25:04 2022 +0100 (2022-03-25) |
parents | 46dcc80bef41 |
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="https://www.squirrelmail.org/"
12 WGET_URL="${WEB_SITE}plugins/$TARBALL"
13 CONFIG_FILES="/etc/squirrelmail/config-$SOURCE.php"
14 HOST_ARCH="any"
16 DEPENDS="squirrelmail openldap"
18 current_version()
19 {
20 wget -O - "$WEB_SITE/plugin_view.php?id=97" 2>/dev/null | \
21 sed "/tarball/!d;s|.*$SOURCE.||;s|.tar.*||;q"
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 mkdir -p $DESTDIR
28 cp -a $src $DESTDIR/$SOURCE
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/share/squirrelmail/plugins $fs/etc/squirrelmail
35 cp -a $install/$SOURCE $fs/usr/share/squirrelmail/plugins
36 mv $fs/usr/share/squirrelmail/plugins/$SOURCE/config_sample.php \
37 $fs/etc/squirrelmail/config-$SOURCE.php
38 ln -s /etc/squirrelmail/config-$SOURCE.php \
39 $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php
40 }
42 post_install()
43 {
44 echo "\$plugins[] = '$SOURCE';" >> "$1/etc/squirrelmail/config_local.php"
45 mv "$1/usr/share/squirrelmail/functions/file_prefs.php" \
46 "$1/usr/share/squirrelmail/functions/file_prefs.php.original"
47 ln -s ../plugins/ldapuserdata/file_prefs.php \
48 "$1/usr/share/squirrelmail/functions/file_prefs.php"
49 cat >> "$1/etc/openldap/slapd.conf" <<EOT
50 include /usr/share/squirrelmail/plugins/$SOURCE/doc/squirrelmail.schema
51 EOT
52 }
54 pre_remove()
55 {
56 sed -i "/\$plugins.. = '$SOURCE';/d" /etc/squirrelmail/config_local.php
57 sed -i "/plugins.$SOURCE.doc/d" /etc/openldap/slapd.conf
58 rm -f /usr/share/squirrelmail/functions/file_prefs.php
59 mv /usr/share/squirrelmail/functions/file_prefs.php.original \
60 /usr/share/squirrelmail/functions/file_prefs.php
61 }