summaryrefslogtreecommitdiff
path: root/pcr/cherokee
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-02-02 16:06:07 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-02-02 16:06:07 +0100
commit174dbc8c1aca86671adb16dee77206bc50d63d85 (patch)
treee5a3261575a7849739d05ca7e43d1d3294bf0de0 /pcr/cherokee
parent22f4ba5a9a8ff4b4c81662639d2c0cec82ecb7ca (diff)
downloadabslibre-174dbc8c1aca86671adb16dee77206bc50d63d85.tar.gz
abslibre-174dbc8c1aca86671adb16dee77206bc50d63d85.tar.bz2
abslibre-174dbc8c1aca86671adb16dee77206bc50d63d85.zip
pcr/cherokee: updated to 1.2.103.d021376
Diffstat (limited to 'pcr/cherokee')
-rw-r--r--pcr/cherokee/PKGBUILD157
1 files changed, 94 insertions, 63 deletions
diff --git a/pcr/cherokee/PKGBUILD b/pcr/cherokee/PKGBUILD
index 4ffe40afa..6a79d2aa0 100644
--- a/pcr/cherokee/PKGBUILD
+++ b/pcr/cherokee/PKGBUILD
@@ -1,100 +1,131 @@
-# $Id: PKGBUILD 63849 2012-02-06 06:17:28Z foutrelis $
-# Maintainer (Arch): Fernando Jiménez Solano <fjim@sdfeu.org>
-# Contributor (Arch): Evangelos Foutras <evangelos@foutrelis.com>
-# Contributor (Arch): Link Dupont <link@subpop.net>
-# Contributor (Arch): Pierre Bourdin <pierre@pi3rrot.net>
-
-pkgname=cherokee
-pkgver=1.2.103
-pkgrel=1
-pkgdesc="A very fast, flexible and easy to configure Web Server (Parabola rebranded)"
-arch=('i686' 'x86_64')
-url="http://www.cherokee-project.com/"
+# Maintainer (AUR): Chris Severance aur.severach aATt spamgourmet dott com
+# Contributor (AUR): vorbote
+# Contributor (AUR): Fernando Jiménez Solano <fjim@sdfeu.org>
+# Contributor (AUR): Evangelos Foutras <evangelos@foutrelis.com>
+# Contributor (AUR): Link Dupont <link@subpop.net>
+# Contributor (AUR): Pierre Bourdin <pierre@pi3rrot.net>
+
+# parabola changes and rationale:
+# - removed superfluous 'set -u'
+# - rebranded to parabola
+
+pkgname='cherokee'
+pkgver=1.2.103.d021376
+pkgrel=2
+pkgdesc='A very fast, flexible and easy to configure Web server'
+arch=('i686' 'x86_64' 'armv7h')
+url='http://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'
+depends=('openssl-1.0' 'pcre' 'python2')
+optdepends=('libldap: ldap validator'
'pam: pam validator'
- 'libmysqlclient: mysql validator'
+ 'php-fpm: php5 support'
+ 'libmariadbclient: mysql validator'
'ffmpeg: Audio/Video streaming handler'
'geoip: GeoIP rule module'
'rrdtool: RRDtool based information collector')
+makedepends=('libldap' 'pam' 'libmariadbclient' 'php-fpm' 'ffmpeg' 'geoip' 'rrdtool' 'wget')
backup=('etc/cherokee/cherokee.conf'
'etc/logrotate.d/cherokee'
'etc/pam.d/cherokee')
options=('!libtool')
-source=(https://github.com/cherokee/webserver/archive/v1.2.103.zip
- cherokee.rc
- cherokee.logrotate
-# fix-ctk-path-handler-match.patch
-# cherokee-1.2.101-ffmpeg0.11.patch
- cherokee.service)
-
-sha256sums=('0e125cba2ad2d0dc48ecca3af4894b92ec5fab422a9d7d27fd0c7a74751e5f35'
+_srcdir="webserver-${pkgver}"
+_verwatch=("${url}/downloads.html" 'Version \(.\+\)' 't')
+_srcfile="v${pkgver}.zip"
+source=("${pkgname}-${_srcfile}::https://github.com/cherokee/webserver/archive/${_srcfile}"
+ 'cherokee.rc'
+ 'cherokee.logrotate'
+# 'fix-ctk-path-handler-match.patch'
+# 'cherokee-1.2.101-ffmpeg0.11.patch'
+ 'cherokee.service')
+sha256sums=('fb6390e55ae901493806cdc9bdf0a8d68ba6ac3ac76b20b05ad247c05b771311'
'4c06cebfab8b68edd4967c020bfb41b077cfff10d76596d1ed192d0b6cedbd86'
'20e26d633f8c1cd90eb21f41dd163b73a83846e405b1ce995e072c4efefc522e'
-# '2bd05e0181024c9bd02d828e8329d4d96a779e4870b1fc4f18aa8667d8c6a630'
-# '6bcdcb8eaccb5516478a0c36960fbacc3d68f8bc326b9b526c388e0607a65116'
'415a2e4cd7d04afe21e502dd0ad76301f85a7087cadbfdab5566bec469679a68')
-build() {
- cd "$srcdir/$pkgname-$pkgver"
+prepare() {
+ cd "${_srcdir}"
# Fix path matching bug in CTK apps (e.g. market)
-# patch -Np1 -i "$srcdir/fix-ctk-path-handler-match.patch"
+ #patch -Np1 -i "${srcdir}/fix-ctk-path-handler-match.patch"
+
# Fix this bug : https://bugs.mageia.org/show_bug.cgi?id=6145
-# patch -Np1 -i "$srcdir/cherokee-1.2.101-ffmpeg0.11.patch"
+ #patch -Np1 -i "${srcdir}/cherokee-1.2.101-ffmpeg0.11.patch"
# Use subdirectory for logs
- sed -i -r 's|(%localstatedir%/log)|\1/cherokee|' cherokee.conf.sample.pre
+ sed -r -e 's|(%localstatedir%/log)|\1/cherokee|' -i 'cherokee.conf.sample.pre'
# Use Python 2 in cherokee-admin
- sed -i 's/"python"/"python2"/' cherokee/main_admin.c
-
- ./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --disable-static \
- --with-wwwroot=/srv/http \
- --with-wwwuser=http \
- --with-wwwgroup=http \
- --with-python=python2 \
- --enable-os-string="Parabola GNU/Linux-libre"
- make
+ sed -e 's|"python"|"python2"|' -i 'cherokee/main_admin.c'
+
+ # Fix pid file location
+ sed -e 's:var/run/:run/:g' -i 'admin/PageNewConfig.py'
+}
+
+_configure() {
+ cd "${srcdir}/${_srcdir}"
+ if [ ! -s 'configure' ]; then
+ #CPPFLAGS="${CPPFLAGS} -I/usr/include/openssl-1.0"
+ CFLAGS="${CFLAGS} -I/usr/include/openssl-1.0" \
+ LDFLAGS="${LDFLAGS} -L/usr/lib/openssl-1.0" \
+ ./autogen.sh \
+ --prefix='/usr' \
+ --sysconfdir='/etc' \
+ --localstatedir='/var' \
+ --sbindir='/usr/bin' \
+ --with-wwwroot='/srv/cherokee/http' \
+ --with-cgiroot='/src/cherokee/cgi-bin' \
+ --with-wwwuser='http' \
+ --with-wwwgroup='http' \
+ --disable-static \
+ --with-php='/usr/bin/php-fpm' \
+ --with-python='python2' \
+ --enable-os-string='Parabola GNU/Linux-libre'
+ #sed -e 's:^\(LIBSSL_LIBS = \).*$:\1 -lopenssl-1.0/libssl:g' -i 'Makefile'
+ fi
+ set +u
+ cd "${srcdir}"
+}
+
+build() {
+ _configure
+ set -u
+ cd "${_srcdir}"
+ local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
+ nice make -s -j "${_nproc}"
+ set +u
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "${_srcdir}"
- make -j1 DESTDIR="$pkgdir" install
+ make -s -j1 DESTDIR="${pkgdir}" install
# PAM configuration file for cherokee
- install -D -m644 pam.d_cherokee "$pkgdir/etc/pam.d/$pkgname"
+ install -Dpm644 'pam.d_cherokee' "${pkgdir}/etc/pam.d/${pkgname}"
# Fix ownership of /var/lib/cherokee/graphs
- chown -R http:http "$pkgdir/var/lib/$pkgname/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"
+ # Use Python 2 (mostly fixed upstream, from the Cherokee PKGBUILD)
+ sed -e 's/env python$/&2/' -i "${pkgdir}/usr/bin/CTK-run"
+ #"${pkgdir}/usr/share/cherokee/admin/"{server,upgrade_config}.py
+ #"${pkgdir}/usr/bin/"{CTK-run,cherokee-{admin-launcher,tweak}}
+ #sed -r -e "s/['\"]python/&2/g" -i "${pkgdir}/usr/share/cherokee/admin/wizards/django.py"
# Compile Python scripts
- python2 -m compileall "$pkgdir"
- python2 -O -m compileall "$pkgdir"
+ 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"
- install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ install -d -o 'http' -g 'http' "${pkgdir}/var/log/${pkgname}"
+ #install -Dpm755 "${srcdir}/${pkgname}.rc" "${pkgdir}/etc/rc.d/${pkgname}"
+ install -Dpm644 "${srcdir}/${pkgname}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgname}"
+ install -Dpm644 "${srcdir}/${pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system/"
# Cleanup
- rm -rf "$pkgdir/srv"
+ rm -rf "${pkgdir}/srv"
+ rmdir "${pkgdir}/var/run"
+ set +u
}
# vim:set ts=2 sw=2 et: