[arch-commits] Commit in nginx/trunk (PKGBUILD)
Sébastien Luttringer
seblu at nymeria.archlinux.org
Sat Jul 27 03:51:50 UTC 2013
Date: Saturday, July 27, 2013 @ 05:51:50
Author: seblu
Revision: 94554
Start adding split packages in nginx. Needs testing.
- Move lock and pid into /run
- Add auth-pam module into extra (external module)
- Move passenger into extra (external modules)
- Move geoip into extra (because optional module and heavy dep)
- Add vim modeset
- Enable a lot of optional modules into extra (token,flv,mp4)
Maybe a version without imap proxy might be done.
Modified:
nginx/trunk/PKGBUILD
----------+
PKGBUILD | 174 +++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 101 insertions(+), 73 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2013-07-26 22:51:51 UTC (rev 94553)
+++ PKGBUILD 2013-07-27 03:51:50 UTC (rev 94554)
@@ -2,101 +2,129 @@
# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
# Maintainer: Bartłomiej Piotrowski <nospam at bpiotrowski.pl>
# Contributor: Miroslaw Szot <mss at czlug.icis.pcz.pl>
+# Contributor: Sébastien Luttringer
_cfgdir=/etc/nginx
_tmpdir=/var/lib/nginx
-pkgname=nginx
+pkgbase=nginx
+pkgname=(nginx nginx-extra)
pkgver=1.4.2
-pkgrel=1
-pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server'
+pkgrel=1.1
arch=('i686' 'x86_64')
-depends=('pcre' 'zlib' 'openssl' 'geoip')
-makedepends=('passenger')
-url="http://nginx.org"
+makedepends=('pcre' 'zlib' 'openssl' 'gd' 'geoip' 'passenger')
+url='http://nginx.org'
license=('custom')
install=nginx.install
backup=(${_cfgdir:1}/fastcgi.conf
- ${_cfgdir:1}/fastcgi_params
- ${_cfgdir:1}/koi-win
- ${_cfgdir:1}/koi-utf
- ${_cfgdir:1}/mime.types
- ${_cfgdir:1}/nginx.conf
- ${_cfgdir:1}/scgi_params
- ${_cfgdir:1}/uwsgi_params
- ${_cfgdir:1}/win-utf
- etc/logrotate.d/nginx)
-source=(http://nginx.org/download/nginx-$pkgver.tar.gz
- service
- logrotate)
+ ${_cfgdir:1}/fastcgi_params
+ ${_cfgdir:1}/koi-win
+ ${_cfgdir:1}/koi-utf
+ ${_cfgdir:1}/mime.types
+ ${_cfgdir:1}/nginx.conf
+ ${_cfgdir:1}/scgi_params
+ ${_cfgdir:1}/uwsgi_params
+ ${_cfgdir:1}/win-utf
+ etc/logrotate.d/nginx)
+source=("http://nginx.org/download/nginx-$pkgver.tar.gz"
+ 'http://web.iti.upv.es/~sto/nginx/ngx_http_auth_pam_module-1.2.tar.gz'
+ 'service'
+ 'logrotate')
sha256sums=('5361ffb7b0ebf8b1a04369bc3d1295eaed091680c1c58115f88d56c8e51f3611'
+ '5a85970ba61a99f55a26d2536a11d512b39bbd622f5737d25a9a8c10db81efa9'
'05fdc0c0483410944b988d7f4beabb00bec4a44a41bd13ebc9b78585da7d3f9b'
'9523a1fdd5eb61bf62f3049f6ee088b198e36d5edcce2d9b08bbeb2930aa5a16')
+_base_options=(
+ "--prefix=$_cfgdir"
+ "--conf-path=$_cfgdir/nginx.conf"
+ '--sbin-path=/usr/bin/nginx'
+ '--pid-path=/run/nginx.pid'
+ '--lock-path=/run/lock/nginx.lock'
+ '--user=http'
+ '--group=http'
+ '--http-log-path=/var/log/nginx/access.log'
+ '--error-log-path=/var/log/nginx/error.log'
+ "--http-client-body-temp-path=$_tmpdir/client-body"
+ "--http-proxy-temp-path=$_tmpdir/proxy"
+ "--http-fastcgi-temp-path=$_tmpdir/fastcgi"
+ "--http-scgi-temp-path=$_tmpdir/scgi"
+ "--http-uwsgi-temp-path=$_tmpdir/uwsgi"
+ '--with-imap'
+ '--with-imap_ssl_module'
+ '--with-ipv6'
+ '--with-pcre-jit'
+ '--with-file-aio'
+ '--with-http_dav_module'
+ '--with-http_gunzip_module'
+ '--with-http_gzip_static_module'
+ '--with-http_realip_module'
+ '--with-http_spdy_module'
+ '--with-http_ssl_module'
+ '--with-http_stub_status_module'
+)
+
+prepare() {
+ cp -a $pkgname-$pkgver $pkgname-extra-$pkgver
+}
+
build() {
- cd "$srcdir"/$pkgname-$pkgver
+ msg2 'Build standard version'
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure "${_base_options[@]}"
+ make
- ./configure \
- --prefix=$_cfgdir \
- --conf-path=$_cfgdir/nginx.conf \
- --sbin-path=/usr/bin/nginx \
- --pid-path=/var/run/nginx.pid \
- --lock-path=/var/lock/nginx.lock \
- --user=http --group=http \
- --http-log-path=/var/log/nginx/access.log \
- --error-log-path=/var/log/nginx/error.log \
- --http-client-body-temp-path=$_tmpdir/client-body \
- --http-proxy-temp-path=$_tmpdir/proxy \
- --http-fastcgi-temp-path=$_tmpdir/fastcgi \
- --http-scgi-temp-path=$_tmpdir/scgi \
- --http-uwsgi-temp-path=$_tmpdir/uwsgi \
- --with-imap --with-imap_ssl_module \
- --with-ipv6 --with-pcre-jit \
- --with-file-aio \
- --with-http_dav_module \
+ msg2 'Build extra version'
+ cd "$srcdir/$pkgname-extra-$pkgver"
+ ./configure "${_base_options[@]}" \
+ --with-http_addition_module \
+ --with-http_degradation_module \
+ --with-http_flv_module \
--with-http_geoip_module \
- --with-http_gunzip_module \
- --with-http_gzip_static_module \
- --with-http_realip_module \
- --with-http_spdy_module \
- --with-http_ssl_module \
- --with-http_stub_status_module \
+ --with-http_image_filter_module \
+ --with-http_mp4_module \
+ --with-http_secure_link_module \
+ --with-http_sub_module \
--add-module=/usr/lib/passenger/ext/nginx \
- #--with-http_mp4_module \
- #--with-http_addition_module \
- #--with-http_xslt_module \
- #--with-http_image_filter_module \
- #--with-http_sub_module \
- #--with-http_flv_module \
- #--with-http_random_index_module \
- #--with-http_secure_link_module \
- #--with-http_degradation_module \
- #--with-http_perl_module \
-
- make
+ --add-module=../ngx_http_auth_pam_module-1.2
+ make
}
-package() {
- cd "$srcdir"/$pkgname-$pkgver
- make DESTDIR="$pkgdir" install
+package_nginx() {
+ pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server'
+ conflicts=('nginx-extra')
+ depends=('pcre' 'zlib' 'openssl')
- sed -e 's|\<user\s\+\w\+;|user html;|g' \
- -e '44s|html|/usr/share/nginx/html|' \
- -e '54s|html|/usr/share/nginx/html|' \
- -i "$pkgdir"/etc/nginx/nginx.conf
- rm "$pkgdir"/etc/nginx/*.default
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
- install -d "$pkgdir"/$_tmpdir
- install -dm700 "$pkgdir"/$_tmpdir/proxy
+ sed -e 's|\<user\s\+\w\+;|user html;|g' \
+ -e '44s|html|/usr/share/nginx/html|' \
+ -e '54s|html|/usr/share/nginx/html|' \
+ -i "$pkgdir"/etc/nginx/nginx.conf
+ rm "$pkgdir"/etc/nginx/*.default
- chmod 750 "$pkgdir"/var/log/nginx
- chown http:log "$pkgdir"/var/log/nginx
+ install -d "$pkgdir"/$_tmpdir
+ install -dm700 "$pkgdir"/$_tmpdir/proxy
- install -d "$pkgdir"/usr/share/nginx
- mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
+ chmod 750 "$pkgdir"/var/log/nginx
+ chown http:log "$pkgdir"/var/log/nginx
- install -Dm644 "$srcdir"/logrotate "$pkgdir"/etc/logrotate.d/nginx
- install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/nginx.service
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/nginx/LICENSE
- rm -rf "$pkgdir"/var/run
+ install -d "$pkgdir"/usr/share/nginx
+ mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
+
+ install -Dm644 "$srcdir"/logrotate "$pkgdir"/etc/logrotate.d/nginx
+ install -Dm644 "$srcdir"/service "$pkgdir"/usr/lib/systemd/system/nginx.service
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ rmdir "$pkgdir/run"
}
+
+package_nginx-extra() {
+ package_nginx
+
+ pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server with extra modules'
+ conflicts=('nginx')
+ depends=('pcre' 'zlib' 'openssl' 'gd' 'geoip')
+}
+
+# vim:set ts=4 sw=4 et:
More information about the arch-commits
mailing list