summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLopo2015-06-17 20:09:45 +0200
committerLopo2015-06-17 20:09:45 +0200
commit86b7b5d7b28125b0ef2eeab031fad7f7e49a2886 (patch)
tree9e79a121f6cb5cfba6e6e7588d87cd375be12d0c
downloadaur-86b7b5d7b28125b0ef2eeab031fad7f7e49a2886.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD67
-rw-r--r--squirrelmail-dev-svn.install17
3 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9d53041768c2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = squirrelmail-dev-svn
+ pkgdesc = Webmail for Nuts! (Development version Subversion source)
+ pkgver = 14499
+ pkgrel = 1
+ url = http://www.squirrelmail.org
+ install = squirrelmail-dev-svn.install
+ arch = any
+ license = GPL
+ makedepends = subversion
+ depends = php
+ depends = perl
+ depends = imap-server
+ provides = squirrelmail=1.5.2
+ conflicts = squirrelmail
+ options = !strip
+ backup = srv/http/squirrelmail/.htaccess
+ backup = srv/http/squirrelmail/config/config.php
+
+pkgname = squirrelmail-dev-svn
+
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
+}
diff --git a/squirrelmail-dev-svn.install b/squirrelmail-dev-svn.install
new file mode 100644
index 000000000000..565cc68cf1ca
--- /dev/null
+++ b/squirrelmail-dev-svn.install
@@ -0,0 +1,17 @@
+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
+}