summaryrefslogtreecommitdiff
path: root/extra/squirrelmail/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'extra/squirrelmail/PKGBUILD')
-rw-r--r--extra/squirrelmail/PKGBUILD50
1 files changed, 50 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