summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD69
2 files changed, 48 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cacb73c1585..590c2173026 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Sun Jul 9 18:10:40 UTC 2017
pkgbase = cherokee
pkgdesc = A very fast, flexible and easy to configure Web server
pkgver = 1.2.103.d021376
- pkgrel = 1
+ pkgrel = 2
url = http://cherokee-project.com
arch = i686
arch = x86_64
@@ -13,7 +15,8 @@ pkgbase = cherokee
makedepends = ffmpeg
makedepends = geoip
makedepends = rrdtool
- depends = openssl
+ makedepends = wget
+ depends = openssl-1.0
depends = pcre
depends = python2
optdepends = libldap: ldap validator
diff --git a/PKGBUILD b/PKGBUILD
index 84c74859736..06fdd127b96 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,15 +6,14 @@
# Contributor: Pierre Bourdin <pierre@pi3rrot.net>
set -u
-pkgname=cherokee
+pkgname='cherokee'
pkgver=1.2.103.d021376
-pkgrel=1
+pkgrel=2
pkgdesc='A very fast, flexible and easy to configure Web server'
arch=('i686' 'x86_64')
url='http://cherokee-project.com'
license=('GPL2')
-depends=('openssl' 'pcre' 'python2')
-makedepends=('libldap' 'pam' 'libmariadbclient' 'php-fpm' 'ffmpeg' 'geoip' 'rrdtool')
+depends=('openssl-1.0' 'pcre' 'python2')
optdepends=('libldap: ldap validator'
'pam: pam validator'
'php-fpm: php5 support'
@@ -22,12 +21,13 @@ optdepends=('libldap: ldap 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')
_srcdir="webserver-${pkgver}"
-_verwatch=("${url}/downloads" 'Version \(.*\)' 't')
+_verwatch=("${url}/downloads.html" 'Version \(.\+\)' 't')
_srcfile="v${pkgver}.zip"
source=("${pkgname}-${_srcfile}::https://github.com/cherokee/webserver/archive/${_srcfile}"
'cherokee.rc'
@@ -51,31 +51,48 @@ prepare() {
#patch -Np1 -i "${srcdir}/cherokee-1.2.101-ffmpeg0.11.patch"
# Use subdirectory for logs
- sed -i -r -e '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 -e 's|"python"|"python2"|' 'cherokee/main_admin.c'
-
- ./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='Arch Linux'
+ 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'
+ set +u
+}
+
+_configure() {
+ set -u
+ 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='Arch Linux'
+ #sed -e 's:^\(LIBSSL_LIBS = \).*$:\1 -lopenssl-1.0/libssl:g' -i 'Makefile'
+ fi
set +u
+ cd "${srcdir}"
}
build() {
+ _configure
set -u
cd "${_srcdir}"
- make -s -j "$(nproc)"
+ local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
+ nice make -s -j "${_nproc}"
set +u
}
@@ -83,7 +100,7 @@ package() {
set -u
cd "${_srcdir}"
- make DESTDIR="${pkgdir}" install
+ make -s -j1 DESTDIR="${pkgdir}" install
# PAM configuration file for cherokee
install -Dpm644 'pam.d_cherokee' "${pkgdir}/etc/pam.d/${pkgname}"
@@ -92,11 +109,10 @@ package() {
chown -R 'http:http' "${pkgdir}/var/lib/${pkgname}/graphs"
# Use Python 2 (mostly fixed upstream, from the Cherokee PKGBUILD)
- sed -i -e 's/env python$/&2/' "${pkgdir}/usr/bin/CTK-run"
+ 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 -i -r -e "s/['\"]python/&2/g" \
- # "${pkgdir}/usr/share/cherokee/admin/wizards/django.py"
+ #sed -r -e "s/['\"]python/&2/g" -i "${pkgdir}/usr/share/cherokee/admin/wizards/django.py"
# Compile Python scripts
python2 -m 'compileall' "${pkgdir}"
@@ -109,6 +125,7 @@ package() {
# Cleanup
rm -rf "${pkgdir}/srv"
+ rmdir "${pkgdir}/var/run"
set +u
}
set +u