2010-11-16 09:27:26 +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
|
2011-10-20 12:23:46 +08:00
|
|
|
pkgver=1.2.101
|
2012-01-20 09:03:11 +08:00
|
|
|
pkgrel=4
|
2010-11-16 09:27:26 +08:00
|
|
|
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-16 05:37:07 +08:00
|
|
|
makedepends=('python2' 'gettext' 'libldap' 'pam' 'libmysqlclient'
|
2010-11-16 09:27:26 +08:00
|
|
|
'ffmpeg' 'geoip')
|
2010-12-16 05:37:07 +08:00
|
|
|
optdepends=('python2: cherokee-admin (administrative web interface)'
|
2010-11-16 09:27:26 +08:00
|
|
|
'libldap: ldap validator'
|
|
|
|
'pam: pam validator'
|
|
|
|
'libmysqlclient: mysql validator'
|
|
|
|
'ffmpeg: Audio/Video streaming handler'
|
|
|
|
'geoip: GeoIP rule module'
|
|
|
|
'rrdtool: RRDtool based information collector')
|
2012-03-16 22:51:37 +08:00
|
|
|
categories=('network')
|
2010-11-16 09:27:26 +08:00
|
|
|
backup=('etc/cherokee/cherokee.conf'
|
|
|
|
'etc/logrotate.d/cherokee')
|
|
|
|
options=('!libtool')
|
2012-01-11 23:20:15 +08:00
|
|
|
source=("http://www.cherokee-project.com/download/1.2/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
|
|
|
'cherokee.rc'
|
|
|
|
'cherokee.logrotate'
|
|
|
|
'fix-ctk-path-handler-match.patch'
|
|
|
|
'gentoo-cherokee-1.2.98-linux3.patch'
|
2012-01-20 09:03:11 +08:00
|
|
|
'gentoo-cherokee-1.2.99-chakra-customized.patch')
|
2011-10-20 12:42:29 +08:00
|
|
|
md5sums=('ef47003355a2e368e4d9596cd070ef23'
|
2012-01-20 09:03:11 +08:00
|
|
|
'aaf900097afba950f0a0a15d906a3648'
|
2011-12-22 09:02:48 +08:00
|
|
|
'8d69341bd4002bffd69c6e82ff6c905f'
|
2012-01-11 23:20:15 +08:00
|
|
|
'565326a51632bd803671b36b13d02f1d'
|
|
|
|
'f8a102f6b4711a2af4ce17e7f59437ae'
|
2012-01-20 09:03:11 +08:00
|
|
|
'e6800e28a2487698a04ad870412f42a9')
|
2010-11-16 09:27:26 +08:00
|
|
|
|
|
|
|
build() {
|
2012-01-11 23:20:15 +08:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
2010-11-16 09:27:26 +08:00
|
|
|
|
2011-12-22 09:02:48 +08:00
|
|
|
# Fix path matching bug in CTK apps (e.g. market)
|
2012-01-11 23:20:15 +08:00
|
|
|
patch -Np1 -i "${srcdir}/fix-ctk-path-handler-match.patch"
|
|
|
|
|
|
|
|
# Apply Gentoo patches
|
|
|
|
patch -Np1 -i "${srcdir}/gentoo-cherokee-1.2.98-linux3.patch"
|
2012-01-20 09:03:11 +08:00
|
|
|
patch -Np1 -i "${srcdir}/gentoo-cherokee-1.2.99-chakra-customized.patch"
|
2011-12-22 09:02:48 +08:00
|
|
|
|
2010-11-16 09:27:26 +08:00
|
|
|
# Use subdirectory for logs
|
|
|
|
sed -i -r 's|(%localstatedir%/log)|\1/cherokee|' cherokee.conf.sample.pre
|
2010-12-03 20:30:07 +08:00
|
|
|
|
2012-01-11 23:20:15 +08:00
|
|
|
./configure --prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--with-wwwroot=/srv/http \
|
|
|
|
--disable-static \
|
|
|
|
--with-wwwuser=http \
|
|
|
|
--with-wwwgroup=http \
|
2010-12-03 20:30:07 +08:00
|
|
|
--enable-os-string="Chakra Linux"
|
2012-01-11 23:20:15 +08:00
|
|
|
|
2010-11-16 09:27:26 +08:00
|
|
|
make
|
2011-09-11 10:30:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2012-01-11 23:20:15 +08:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
2011-09-11 10:30:29 +08:00
|
|
|
|
2012-01-11 23:20:15 +08:00
|
|
|
make -j1 DESTDIR="${pkgdir}" install
|
2010-11-16 09:27:26 +08:00
|
|
|
|
|
|
|
# PAM configuration file for cherokee
|
2012-01-11 23:20:15 +08:00
|
|
|
install -D -m644 pam.d_cherokee "${pkgdir}/etc/pam.d/${pkgname}"
|
2010-11-16 09:27:26 +08:00
|
|
|
|
|
|
|
# Fix ownership of /var/lib/cherokee/graphs
|
2012-01-11 23:20:15 +08:00
|
|
|
chown -R http:http "${pkgdir}/var/lib/${pkgname}/graphs"
|
2010-11-16 09:27:26 +08:00
|
|
|
|
2011-09-11 10:30:29 +08:00
|
|
|
# Use Python 2
|
|
|
|
sed -i 's/env python$/&2/' \
|
2012-01-11 23:20:15 +08:00
|
|
|
"${pkgdir}/usr/share/cherokee/admin/"{server,upgrade_config}.py \
|
|
|
|
"${pkgdir}/usr/bin/"{CTK-run,cherokee-{admin-launcher,tweak}}
|
2011-09-11 10:30:29 +08:00
|
|
|
sed -i -r "s/['\"]python/&2/g" \
|
2012-01-11 23:20:15 +08:00
|
|
|
"${pkgdir}/usr/share/cherokee/admin/wizards/django.py"
|
2010-11-16 09:27:26 +08:00
|
|
|
|
|
|
|
# Compile Python scripts
|
2012-01-11 23:20:15 +08:00
|
|
|
python2 -m compileall "${pkgdir}"
|
|
|
|
python2 -O -m compileall "${pkgdir}"
|
2010-11-16 09:27:26 +08:00
|
|
|
|
2012-01-11 23:20:15 +08:00
|
|
|
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}"
|
2010-11-16 09:27:26 +08:00
|
|
|
|
|
|
|
# Cleanup
|
2012-01-11 23:20:15 +08:00
|
|
|
rm -rf "${pkgdir}/srv"
|
2010-11-16 09:27:26 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|