summaryrefslogtreecommitdiff
path: root/extra/squirrelmail
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/squirrelmail
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/squirrelmail')
-rw-r--r--extra/squirrelmail/PKGBUILD50
-rw-r--r--extra/squirrelmail/squirrelmail.install34
2 files changed, 84 insertions, 0 deletions
diff --git a/extra/squirrelmail/PKGBUILD b/extra/squirrelmail/PKGBUILD
new file mode 100644
index 000000000..dcdb822f5
--- /dev/null
+++ b/extra/squirrelmail/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 71649 2010-03-07 23:43:31Z paul $
+# Maintainer: Paul Mattal <paul@archlinux.org>
+# Contributor: Manolis Tzanidakis <manolis@archlinux.org>
+
+pkgname=squirrelmail
+pkgver=1.4.20
+pkgrel=1
+pkgdesc="Webmail for Nuts!"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.squirrelmail.org"
+depends=('php' 'perl' 'imap-server')
+makedepends=('findutils')
+backup=(srv/http/squirrelmail/.htaccess srv/http/squirrelmail/config/config.php)
+install=$pkgname.install
+source=(http://superb-sea2.dl.sf.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
+md5sums=('60ffedc61b295650c7695c2b74209294')
+
+build() {
+ # install
+ mkdir -p $startdir/pkg/srv/http/squirrelmail || return 1
+ cd $startdir/pkg/srv/http/squirrelmail || return 1
+ cp -a $startdir/src/squirrelmail-$pkgver/* . || return 1
+
+ # remove CVS dirs
+ find $startdir/pkg -type d -name CVS -exec rm -rf {} \; || return 1
+
+ # customize config (data and attachments in /var/lib/squirrelmail)
+ cd config || return 1
+ cp -p config_default.php config.php || return 1
+ sed -i 's|^$attachment_dir = $data_dir;|$attachment_dir = "/var/lib/squirrelmail/attachments";|' config.php || return 1
+ sed -i 's|^$data_dir = "/var/local/squirrelmail/data";|$data_dir = "/var/lib/squirrelmail/data";|' config.php || return 1
+
+ # create data and attachments directories, set ownership/permissions
+ # ideally we would set attachments differently to root:-1 with 0730, but
+ # I don't know how to get chgrp to take "-1" properly; perhaps someday
+ # I'll figure out how to make this work
+ mkdir -p $startdir/pkg/var/lib/squirrelmail/{data,attachments} || return 1
+ chown -R http:http $startdir/pkg/var/lib/squirrelmail/data \
+ || return 1
+ chown -R http:http $startdir/pkg/var/lib/squirrelmail/attachments \
+ || return 1
+ chmod 0700 $startdir/pkg/var/lib/squirrelmail/data || return 1
+ chmod 0300 $startdir/pkg/var/lib/squirrelmail/attachments || return 1
+
+ # restrict access to squirrelmail by default
+ echo "deny from all" >$startdir/pkg/srv/http/squirrelmail/.htaccess \
+ || return 1
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/extra/squirrelmail/squirrelmail.install b/extra/squirrelmail/squirrelmail.install
new file mode 100644
index 000000000..06f411f16
--- /dev/null
+++ b/extra/squirrelmail/squirrelmail.install
@@ -0,0 +1,34 @@
+post_install() {
+ /bin/cat <<THEEND
+
+NOTE
+----
+To configure squirrelmail :
+$ cd /srv/http/squirrelmail/config
+$ perl conf.pl
+
+Make sure to check the documentation on its webpage for more details,
+especially about securing your setup. The default attachments dir
+has been placed in /var/lib/squirrelmail/attachments.
+
+Also make sure your php module is loaded in your Apache config.
+
+THEEND
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ /bin/true
+}
+
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+
+$op $*