mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
51 lines
2 KiB
Bash
51 lines
2 KiB
Bash
# $Id: PKGBUILD 40069 2009-05-26 18:17:30Z paul $
|
|
# Maintainer: Paul Mattal <paul@archlinux.org>
|
|
# Contributor: Manolis Tzanidakis <manolis@archlinux.org>
|
|
|
|
pkgname=squirrelmail
|
|
pkgver=1.4.19
|
|
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://dl.sf.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz)
|
|
options=('force')
|
|
|
|
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
|
|
md5sums=('bf71b282361cd9fe65781bb17ecd7704')
|