summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLopo2015-06-17 20:09:45 +0200
committerLopo2015-06-17 20:09:45 +0200
commit86b7b5d7b28125b0ef2eeab031fad7f7e49a2886 (patch)
tree9e79a121f6cb5cfba6e6e7588d87cd375be12d0c /PKGBUILD
downloadaur-86b7b5d7b28125b0ef2eeab031fad7f7e49a2886.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD67
1 files changed, 67 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1727aab02d25
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer: Pavol Hluchy (Lopo) <lopoATlosysDOTeu>
+# based on original squirrelmail package by darose
+
+pkgname=squirrelmail-dev-svn
+pkgver=14499
+pkgrel=1
+pkgdesc='Webmail for Nuts! (Development version Subversion source)'
+arch=('any')
+license=('GPL')
+url="http://www.squirrelmail.org"
+depends=('php' 'perl' 'imap-server')
+makedepends=('subversion')
+conflicts=('squirrelmail')
+provides=('squirrelmail=1.5.2')
+source=()
+md5sums=()
+backup=(srv/http/squirrelmail/.htaccess srv/http/squirrelmail/config/config.php)
+install=$pkgname.install
+options=(!strip)
+_svntrunk='http://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail/trunk/squirrelmail'
+_svnmod='squirrelmail'
+
+package() {
+ cd $srcdir
+
+ if [ $NOEXTRACT -eq 0 ]; then
+ msg "Connecting to ${_svntrunk} SVN server...."
+ if [ -d $_svnmod/.svn ]; then
+ (cd ${_svnmod} && svn up -r ${pkgver})
+ else
+ svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
+ fi
+ msg "SVN checkout done or server timeout"
+ fi
+ if [ -d ${_svnmod}-build ]; then
+ rm -Rf ${_svnmod}-build
+ fi
+ svn --force export ${_svnmod} ${_svnmod}-build
+ msg "Starting make ${pkgname} ..."
+
+ # install
+ mkdir -p "$pkgdir"/srv/http/squirrelmail
+ cd "$pkgdir"/srv/http/squirrelmail
+ cp -a "$srcdir"/${_svnmod}-build/* .
+
+ # remove CVS dirs
+ find "$pkgdir" -type d -name CVS -exec rm -rf {} \;
+
+ # customize config (data and attachments in /var/lib/squirrelmail)
+ cd config
+ cp -p config_default.php config.php
+ sed -i 's|^$attachment_dir = $data_dir;|$attachment_dir = "/var/lib/squirrelmail/attachments";|' config.php
+ sed -i 's|^$data_dir = "/var/local/squirrelmail/data";|$data_dir = "/var/lib/squirrelmail/data";|' config.php
+
+ # 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 "$pkgdir"/var/lib/squirrelmail/{data,attachments}
+ chown -R http:http "$pkgdir"/var/lib/squirrelmail/data
+ chown -R http:http "$pkgdir"/var/lib/squirrelmail/attachments
+ chmod 0700 "$pkgdir"/var/lib/squirrelmail/data
+ chmod 0300 "$pkgdir"/var/lib/squirrelmail/attachments
+
+ # restrict access to squirrelmail by default
+ echo "deny from all" >"$pkgdir"/srv/http/squirrelmail/.htaccess
+}