wok view squirrelmail-html_mail/receipt @ rev 9036

iron-linux, squirrelmail plugins: fix genpkg_rules
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 04 00:08:04 2011 +0100 (2011-03-04)
parents 27175f0c11f5
children 91a615759636
line source
1 # SliTaz package receipt.
3 PACKAGE="squirrelmail-html_mail"
4 VERSION="2.3-1.4"
5 CATEGORY="network"
6 SHORT_DESC="Vacation and forwarding plugin for Web mail."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SOURCE="html_mail"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://www.squirrelmail.org/"
11 DEPENDS="squirrelmail perl-html-entities perl-html-parser perl-text-aspell"
12 WGET_URL="${WEB_SITE}plugins/$TARBALL"
13 CONFIG_FILES="/etc/squirrelmail/config-$SOURCE.php /etc/apache/conf.d"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cp -a $src $DESTDIR/$SOURCE
19 }
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 genpkg_rules()
23 {
24 mkdir -p $fs/usr/share/squirrelmail/plugins $fs/etc/squirrelmail \
25 $fs/etc/apache/conf.d
26 cp -a $_pkg/$SOURCE $fs/usr/share/squirrelmail/plugins
27 mv $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php.sample \
28 $fs/etc/squirrelmail/config-$SOURCE.php
29 ln -s /etc/squirrelmail/config-$SOURCE.php \
30 $fs/usr/share/squirrelmail/plugins/$SOURCE/config.php
31 cat > $fs/etc/apache/conf.d/$SOURCE <<EOT
32 <Directory /usr/share/squirrelmail/plugins/html_mail/htmlarea/plugins/SpellChecker>
33 Options +ExecCGI
34 AddHandler cgi-script cgi
35 </Directory>
36 EOT
37 }
39 post_install()
40 {
41 echo "\$plugins[] = '$SOURCE';" >> $1/etc/squirrelmail/config_local.php
42 }
44 pre_remove()
45 {
46 sed -i "/\$plugins.. = '$SOURCE';/d" /etc/squirrelmail/config_local.php
47 rm /etc/apache/conf.d/$SOURCE
48 }