desktop/cherokee/PKGBUILD

76 lines
2.5 KiB
Bash
Raw Normal View History

2010-11-16 01:42:20 +08:00
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
pkgname=cherokee
2010-12-10 23:00:48 +08:00
pkgver=1.0.13
2010-11-16 01:42:20 +08:00
pkgrel=1
pkgdesc="A very fast, flexible and easy to configure Web Server"
arch=('i686' 'x86_64')
url="http://www.cherokee-project.com/"
license=('GPL2')
depends=('openssl' 'pcre')
2010-12-10 23:00:48 +08:00
makedepends=('python2' 'gettext' 'libldap' 'pam' 'libmysqlclient'
2010-11-16 01:42:20 +08:00
'ffmpeg' 'geoip')
optdepends=('python: cherokee-admin (administrative web interface)'
'libldap: ldap validator'
'pam: pam validator'
'libmysqlclient: mysql validator'
'ffmpeg: Audio/Video streaming handler'
'geoip: GeoIP rule module'
'rrdtool: RRDtool based information collector')
backup=('etc/cherokee/cherokee.conf'
'etc/logrotate.d/cherokee')
source=(http://www.cherokee-project.com/download/1.0/$pkgver/cherokee-$pkgver.tar.gz
cherokee.rc
cherokee.logrotate)
2010-11-16 01:42:20 +08:00
options=('!libtool')
2010-12-10 23:00:48 +08:00
md5sums=('aafaaab9f2528f1ef7f8461d608ce775'
2010-11-16 01:42:20 +08:00
'a2d2b69c6220fab57cda4f531b680f9f'
'8d69341bd4002bffd69c6e82ff6c905f')
2010-11-16 01:42:20 +08:00
build() {
cd "$srcdir/$pkgname-$pkgver"
# Use subdirectory for logs
sed -i -r 's|(%localstatedir%/log)|\1/cherokee|' cherokee.conf.sample.pre
# http://code.google.com/p/cherokee/issues/detail?id=1034
#patch -Np3 -E -i "$srcdir/r5734-get-rid-of-package-py.patch"
#autoreconf -v
2010-11-16 01:42:20 +08:00
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--with-wwwroot=/srv/http --disable-static \
--with-wwwuser=http --with-wwwgroup=http \
--enable-os-string="Chakra Linux"
2010-11-16 01:42:20 +08:00
make
make -j1 DESTDIR="$pkgdir" install
# PAM configuration file for cherokee
install -D -m644 pam.d_cherokee "$pkgdir/etc/pam.d/$pkgname"
# Fix ownership of /var/lib/cherokee/graphs
chown -R http:http "$pkgdir/var/lib/$pkgname/graphs"
# Point Python scripts to the python2 binary
sed -i 's/env python/env python2/' \
"$pkgdir/usr/share/cherokee/admin/"{server,upgrade_config}.py
# Compile Python scripts
python2 -m compileall "$pkgdir"
python2 -O -m compileall "$pkgdir"
install -d -o http -g http "$pkgdir/var/log/$pkgname"
install -D "$srcdir/$pkgname.rc" "$pkgdir/etc/rc.d/$pkgname"
install -Dm644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname"
# Cleanup
rm -rf "$pkgdir/srv"
}
# vim:set ts=2 sw=2 et: