diff options
author | Дамјан Георгиевски | 2021-07-11 17:17:55 +0200 |
---|---|---|
committer | Дамјан Георгиевски | 2021-07-11 17:17:55 +0200 |
commit | 64bf39f1ea7d0c51931d8cced9d9afa6b1119c9b (patch) | |
tree | aa0245a0c11693b851c163903db3b53e2a11d66f | |
parent | 981dd153dea0a1d244067e5380edd164d2d65140 (diff) | |
download | aur-64bf39f1ea7d0c51931d8cced9d9afa6b1119c9b.tar.gz |
modernize PKGBUILD
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 35 |
2 files changed, 18 insertions, 20 deletions
@@ -1,7 +1,7 @@ pkgbase = nginx-mod-nchan pkgdesc = nchan nginx module pkgver = 1.2.8 - pkgrel = 1 + pkgrel = 2 url = https://nchan.io/ arch = i686 arch = x86_64 @@ -12,4 +12,3 @@ pkgbase = nginx-mod-nchan sha256sums = de42e8d4fef6aef9e4c7303a7480adfe9545992470a7f6be008de7a4bb64cc98 pkgname = nginx-mod-nchan - @@ -1,9 +1,9 @@ # Maintainer: Damjan Georgievski <gdamjan@gmail.com> -_mod_name=nchan -pkgname=nginx-mod-$_mod_name +_modname=nchan +pkgname=nginx-mod-$_modname pkgver=1.2.8 -pkgrel=1 +pkgrel=2 pkgdesc='nchan nginx module' arch=('i686' 'x86_64') @@ -13,31 +13,30 @@ url="https://nchan.io/" license=('MIT') source=( - https://github.com/slact/$_mod_name/archive/v${pkgver}.tar.gz + https://github.com/slact/$_modname/archive/v${pkgver}.tar.gz ) prepare() { - cp -r /usr/src/nginx . + mkdir -p build + cd build + ln -sf /usr/src/nginx/auto + ln -sf /usr/src/nginx/src } build() { - _module_dir="$srcdir"/$_mod_name-$pkgver - - cd "$srcdir"/nginx - ./configure --with-compat --add-dynamic-module=$_module_dir - make modules + cd build + /usr/src/nginx/configure --with-compat --add-dynamic-module=../$_modname-$pkgver + make modules } package() { - _module_dir="$srcdir"/$_mod_name-$pkgver - - install -Dm644 "${_module_dir}"/LICENCE \ - "$pkgdir"/usr/share/licenses/$pkgname/LICENCE + install -Dm644 "$srcdir"/$_modname-$pkgver/LICENCE \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENCE - cd "$srcdir"/nginx/objs - for _mod in ngx_*_module.so; do - install -Dm755 $_mod "$pkgdir"/usr/lib/nginx/modules/$_mod - done + cd build/objs + for mod in ngx_*.so; do + install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod + done } sha256sums=('de42e8d4fef6aef9e4c7303a7480adfe9545992470a7f6be008de7a4bb64cc98') |