# # Chakra Packages for Chakra, part of chakra-project.org # # maintainer (i686): Phil Miller # maintainer (x86_64): Manuel Tortosa # include global config pkgname=cherokee pkgver=1.2.101 pkgrel=5 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') makedepends=('python2' 'gettext' 'libldap' 'pam' 'libmysqlclient' 'ffmpeg' 'geoip') optdepends=('python2: 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') categories=('network') backup=('etc/cherokee/cherokee.conf' 'etc/logrotate.d/cherokee') options=('!libtool') source=("http://www.cherokee-project.com/download/1.2/${pkgver}/${pkgname}-${pkgver}.tar.gz" 'cherokee.service' 'cherokee.logrotate' 'fix-ctk-path-handler-match.patch' 'gentoo-cherokee-1.2.98-linux3.patch' 'gentoo-cherokee-1.2.99-chakra-customized.patch' 'cherokee-1.2.101-ffmpeg0.11.patch') sha256sums=('ca465ab3772479fc843b38ffc45113bf24d8bfae9185cdd5176b099d5a17feb8' 'a5ba46821799eaeea39c35f46ae51d58a8394f5e729889729f814562561d1edb' '20e26d633f8c1cd90eb21f41dd163b73a83846e405b1ce995e072c4efefc522e' 'f682e9e6287e1db7d1843843143afa70b687f59807346aca9ddf19a35bacee45' 'cc03fa321bb01cd4a7026685ef2e3fc606fd53da056f629307c6e1904987ad1b' '298a9394ca7c0e50c320bfc08f8674d23929272825cd3001c955fc560e62b662' '6bcdcb8eaccb5516478a0c36960fbacc3d68f8bc326b9b526c388e0607a65116') build() { cd "${srcdir}/${pkgname}-${pkgver}" # Fix path matching bug in CTK apps (e.g. market) patch -Np1 -i "${srcdir}/fix-ctk-path-handler-match.patch" # ffmpeg patch patch -Np1 -i "${srcdir}/cherokee-1.2.101-ffmpeg0.11.patch" # Apply Gentoo patches patch -Np1 -i "${srcdir}/gentoo-cherokee-1.2.98-linux3.patch" patch -Np1 -i "${srcdir}/gentoo-cherokee-1.2.99-chakra-customized.patch" # Use subdirectory for logs sed -i -r 's|(%localstatedir%/log)|\1/cherokee|' cherokee.conf.sample.pre ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-wwwroot=/srv/http \ --disable-static \ --with-wwwuser=http \ --with-wwwgroup=http \ --with-python=python2 \ --enable-os-string="Chakra Linux" make } package() { cd "${srcdir}/${pkgname}-${pkgver}" 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" # Use Python 2 sed -i 's/env python$/&2/' \ "${pkgdir}/usr/share/cherokee/admin/"{server,upgrade_config}.py \ "${pkgdir}/usr/bin/"{CTK-run,cherokee-{admin-launcher,tweak}} sed -i -r "s/['\"]python/&2/g" \ "${pkgdir}/usr/share/cherokee/admin/wizards/django.py" # Compile Python scripts python2 -m compileall "${pkgdir}" python2 -O -m compileall "${pkgdir}" install -d -o http -g http "${pkgdir}/var/log/${pkgname}" install -Dm644 "${srcdir}/${pkgname}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgname}" # install service file install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" # Cleanup rm -rf "${pkgdir}/srv" } # vim:set ts=2 sw=2 et: