aboutsummaryrefslogtreecommitdiffstats
path: root/main/nginx/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-08-10 02:08:32 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-15 20:47:27 +0200
commit300aa7e138f99667f4b259e9378e57ec3ad9791e (patch)
treeabd7e8298d8f6405ce402f6b5ab1397a8b13f077 /main/nginx/APKBUILD
parent7a5dba72e38b4ea67b54216e490488fdf0a78714 (diff)
downloadaports-300aa7e138f99667f4b259e9378e57ec3ad9791e.tar.bz2
aports-300aa7e138f99667f4b259e9378e57ec3ad9791e.tar.xz
main/nginx: some cosmetic changes
Just prepare for upcoming changes to make it more clear. Reorder compile options to be in the same order as in ./configure --help (and also Fedora package and others) to make it easier locate what is omitted. Directory /etc/default.d is useless on Alpine, so removed.
Diffstat (limited to 'main/nginx/APKBUILD')
-rw-r--r--main/nginx/APKBUILD124
1 files changed, 65 insertions, 59 deletions
diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD
index 14b52b29de..8cfbdace40 100644
--- a/main/nginx/APKBUILD
+++ b/main/nginx/APKBUILD
@@ -9,43 +9,42 @@ pkgdesc="HTTP and reverse proxy server"
url="http://www.nginx.org/en"
arch="all"
license="custom"
-pkgusers="nginx"
-_grp_ngx="nginx"
-_grp_www="www-data"
-pkggroups="$_grp_ngx $_grp_www"
-install="$pkgname-common.pre-install"
-depends="$pkgname-common !$pkgname-rtmp !$pkgname-lua"
# Modules
-_lua_mod=lua-nginx-module
-_lua_dir=$_lua_mod
-_lua_ver=0.10.5
+_devel_kit_name=ngx_devel_kit
+_devel_kit_ver=0.3.0
+_devel_kit_dir="$srcdir/$_devel_kit_name-$_devel_kit_ver"
-_rtmp_mod=nginx-rtmp-module
-_rtmp_dir=$_rtmp_mod
-_rtmp_ver=1.1.7
+_http_lua_name=lua-nginx-module
+_http_lua_ver=0.10.5
+_http_lua_dir="$srcdir/$_http_lua_name-$_http_lua_ver"
-_devkit_mod=nginx-devel-kit
-_devkit_dir=ngx_devel_kit
-_devkit_ver=0.3.0
+_rtmp_name=nginx-rtmp-module
+_rtmp_ver=1.1.7
+_rtmp_dir="$srcdir/$_rtmp_name-$_rtmp_ver"
+depends="$pkgname-common !$pkgname-rtmp !$pkgname-lua"
makedepends="perl-dev pcre-dev openssl-dev zlib-dev luajit-dev paxmark linux-headers"
+pkgusers="nginx"
+_grp_ngx="nginx"
+_grp_www="www-data"
+pkggroups="$_grp_ngx $_grp_www"
+install="$pkgname-common.pre-install"
subpackages="$pkgname-doc $pkgname-common $pkgname-vim $pkgname-rtmp $pkgname-lua"
-
source="http://nginx.org/download/$pkgname-$pkgver.tar.gz
- $_lua_mod-$_lua_ver.tar.gz::https://github.com/openresty/$_lua_mod/archive/v$_lua_ver.tar.gz
- $_rtmp_mod-$_rtmp_ver.tar.gz::https://github.com/arut/$_rtmp_mod/archive/v$_rtmp_ver.tar.gz
- $_devkit_mod-$_devkit_ver.tar.gz::https://github.com/simpl/$_devkit_dir/archive/v$_devkit_ver.tar.gz
+ $_devel_kit_name-$_devel_kit_ver.tar.gz::https://github.com/simpl/$_devel_kit_name/archive/v$_devel_kit_ver.tar.gz
+ $_http_lua_name-$_http_lua_ver.tar.gz::https://github.com/openresty/$_http_lua_name/archive/v$_http_lua_ver.tar.gz
+ $_rtmp_name-$_rtmp_ver.tar.gz::https://github.com/arut/$_rtmp_name/archive/v$_rtmp_ver.tar.gz
$pkgname.logrotate
$pkgname.initd
ipv6.patch
"
-
-builddir="$srcdir"/$pkgname-$pkgver
+builddir="$srcdir/$pkgname-$pkgver"
_build() {
local binary=$1
shift
+
./configure \
--prefix=/var/lib/$pkgname \
--sbin-path=/usr/sbin/$pkgname \
@@ -57,9 +56,15 @@ _build() {
--http-fastcgi-temp-path=/var/lib/$pkgname/tmp/fastcgi \
--http-uwsgi-temp-path=/var/lib/$pkgname/tmp/uwsgi \
--http-scgi-temp-path=/var/lib/$pkgname/tmp/scgi \
+ \
--user=$pkgusers \
--group=$_grp_ngx \
+ --with-threads \
+ --with-file-aio \
+ --with-ipv6 \
+ \
--with-http_ssl_module \
+ --with-http_v2_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
@@ -68,19 +73,15 @@ _build() {
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
+ --with-http_auth_request_module \
--with-http_random_index_module \
--with-http_secure_link_module \
- --with-http_stub_status_module \
- --with-http_auth_request_module \
- --with-threads \
- --with-stream \
- --with-stream_ssl_module \
--with-http_slice_module \
+ --with-http_stub_status_module \
--with-mail \
--with-mail_ssl_module \
- --with-file-aio \
- --with-http_v2_module \
- --with-ipv6 \
+ --with-stream \
+ --with-stream_ssl_module \
$@ || return 1
make || return 1
@@ -92,51 +93,56 @@ build() {
cd "$builddir"
_build $pkgname-lua --build="rtmp,lua" \
- --add-module="$srcdir/$_devkit_dir-$_devkit_ver" \
- --add-module="$srcdir/$_rtmp_dir-$_rtmp_ver" \
- --add-module="$srcdir/$_lua_dir-$_lua_ver" \
- || return 1
+ --add-module="$_devel_kit_dir" \
+ --add-module="$_rtmp_dir" \
+ --add-module="$_http_lua_dir" \
+ || return 1
_build $pkgname-rtmp --build="rtmp" \
- --add-module="$srcdir/$_rtmp_dir-$_rtmp_ver" \
- || return 1
+ --add-module="$_rtmp_dir" \
+ || return 1
_build $pkgname || return 1
}
package() {
cd "$builddir"
+
make DESTDIR="$pkgdir" install || return 1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
- install -Dm644 objs/$pkgname.8 "$pkgdir"/usr/share/man/man8/$pkgname.8
-
install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
- cp -r "$srcdir"/$_lua_dir-$_lua_ver/doc \
- "$pkgdir"/usr/share/doc/$pkgname/$_lua_mod || return 1
- cp -r "$srcdir"/$_rtmp_dir-$_rtmp_ver/doc \
- "$pkgdir"/usr/share/doc/$pkgname/$_rtmp_mod
- cp -r "$srcdir"/$_devkit_dir-$_devkit_ver/docs \
- "$pkgdir"/usr/share/doc/$pkgname/$_devkit_mod
- install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
+ install -Dm644 objs/$pkgname.8 \
+ "$pkgdir"/usr/share/man/man8/$pkgname.8 || return 1
+
+ cp -r "$_devel_kit_dir"/docs \
+ "$pkgdir"/usr/share/doc/$pkgname/$_devel_kit_name || return 1
+ cp -r "$_http_lua_dir"/doc \
+ "$pkgdir"/usr/share/doc/$pkgname/$_http_lua_name || return 1
+ cp -r "$_rtmp_dir"/doc \
+ "$pkgdir"/usr/share/doc/$pkgname/$_rtmp_name || return 1
+
+ cd "$pkgdir"
+
+ install -Dm755 "$srcdir"/$pkgname.initd ./etc/init.d/$pkgname
+ install -Dm644 "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname
- install -dm755 "$pkgdir"/etc/$pkgname/conf.d
- install -dm755 "$pkgdir"/etc/$pkgname/default.d
+ install -dm755 ./etc/$pkgname/conf.d
+ install -dm750 -o $pkgusers -g $_grp_ngx ./var/lib/$pkgname
+ install -dm700 -o $pkgusers -g $_grp_ngx ./var/lib/$pkgname/tmp
+ install -dm755 -g $_grp_www ./var/www/localhost/htdocs
- install -dm750 -o $pkgusers -g $_grp_ngx "$pkgdir"/var/lib/$pkgname
- install -dm700 -o $pkgusers -g $_grp_ngx "$pkgdir"/var/lib/$pkgname/tmp
- install -dm755 -g $_grp_www "$pkgdir"/var/www/localhost/htdocs
+ install -dm755 ./var/log
+ mv ./var/lib/$pkgname/logs ./var/log/$pkgname || return 1
- install -dm755 "$pkgdir"/var/log
- mv "$pkgdir"/var/lib/$pkgname/logs "$pkgdir"/var/log/$pkgname
- ln -sf /var/log/$pkgname "$pkgdir"/var/lib/$pkgname/logs
- ln -sf /run/$pkgname "$pkgdir"/var/lib/$pkgname/run
+ ln -sf /var/log/$pkgname ./var/lib/$pkgname/logs
+ ln -sf /run/$pkgname ./var/lib/$pkgname/run
- sed -i -E "s~logs(/nginx.pid.*$)~run\1~" "$pkgdir"/etc/$pkgname/$pkgname.conf
+ sed -Ei "s|logs(/nginx.pid.*$)|run\1|" \
+ ./etc/$pkgname/$pkgname.conf || return 1
- rm -rf "$pkgdir"/run "$pkgdir"/etc/$pkgname/*.default
+ rm -rf ./run ./etc/$pkgname/*.default
}
common() {
@@ -175,21 +181,21 @@ lua() {
md5sums="088292d9caf6059ef328aa7dda332e44 nginx-1.10.1.tar.gz
9824498b35e879e40d05b9c8348dc4ff lua-nginx-module-0.10.5.tar.gz
8006de2560db3e55bb15d110220076ac nginx-rtmp-module-1.1.7.tar.gz
-76c503918c003fcc55005b7688f47add nginx-devel-kit-0.3.0.tar.gz
+76c503918c003fcc55005b7688f47add ngx_devel_kit-0.3.0.tar.gz
db194cf3c6c4be12c70c757e0c9ad995 nginx.logrotate
16dcac0d7a2b406807d3377841d9b480 nginx.initd
801a87f7f9d27f8ad85b41a78b4c4461 ipv6.patch"
sha256sums="1fd35846566485e03c0e318989561c135c598323ff349c503a6c14826487a801 nginx-1.10.1.tar.gz
4f0292c37ab3d7cb980c994825040be1bda2c769cbd800e79c43eb37458347d4 lua-nginx-module-0.10.5.tar.gz
7922b0e3d5f3d9c4b275e4908cfb8f5fb1bfb3ac2df77f4c262cda56df21aab3 nginx-rtmp-module-1.1.7.tar.gz
-88e05a99a8a7419066f5ae75966fb1efc409bad4522d14986da074554ae61619 nginx-devel-kit-0.3.0.tar.gz
+88e05a99a8a7419066f5ae75966fb1efc409bad4522d14986da074554ae61619 ngx_devel_kit-0.3.0.tar.gz
b063611c6cb2d33bd43c4b17bf4135dda25f209bb77e4e66d1b156cffc37fbe6 nginx.logrotate
3d8a90d2f75b7f24c4d74722b5b3ac11d85f416c2d7641b4280d7c126bfe8395 nginx.initd
a24ef5843ae0afa538b00c37eb7da7870f9d7f146f52a9668678f7296cf71d9b ipv6.patch"
sha512sums="fa1329d40e83340380332dd5e2ed66f08dd59cc7f7582dd0e0193c493353ba550e80dc80e5165c225d70532d4197abc49cc8c760e8ab72e48f630cb57c2803e1 nginx-1.10.1.tar.gz
a02b8614fdcd063b1087a3114f05402c707343ff3bceabaca1fb98531ba30edea1a525fc45e2f5a49ff155de8d6f9e1155e8870e463476da5703acfd5f8fc3fc lua-nginx-module-0.10.5.tar.gz
9883462a04683f1e7af175da04b86d259ff6d677864667588fb073143f7130969eb2a5a5a48ddceda7a555b908580f179bdcacb7f0111413d51db5bfe43b396e nginx-rtmp-module-1.1.7.tar.gz
-558764c9be913a4f61d0e277d07bf3c272e1ce086b3fadb85b693a7e92805cd9fca4da7a8d29c96e53fc0d23b331327d3b2561ff61f19d2330e7d5d35ac7d614 nginx-devel-kit-0.3.0.tar.gz
+558764c9be913a4f61d0e277d07bf3c272e1ce086b3fadb85b693a7e92805cd9fca4da7a8d29c96e53fc0d23b331327d3b2561ff61f19d2330e7d5d35ac7d614 ngx_devel_kit-0.3.0.tar.gz
09b110693e3f4377349ccea3c43cb8199c8579ee351eae34283299be99fdf764b0c1bddd552e13e4d671b194501618b29c822e1ad53b34101a73a63954363dbb nginx.logrotate
1ea032cf88021ec8aa1401d284ea738364511cdb9f8c01670deb8e59aae570f5bbe17f0cbab73c0e08d6b342a621b6a9c014832168ed41f6028ecfa4211b60cf nginx.initd
68d64a84568ec2df0366925ab282a05ebe21a85044b6c7844a47573cfd8cc8ed119cc772358bc3fff36e2d4fdf583a730592825f5f98632993ca86d1f8438d5f ipv6.patch"