Build against -src

This commit is contained in:
Ivan Shapovalov
2022-12-14 01:12:56 +03:00
parent 4d5a14b1f8
commit 31c6873e66
2 changed files with 21 additions and 17 deletions

View File

@@ -1,15 +1,14 @@
pkgbase = nginx-mainline-mod-vts
pkgdesc = Nginx virtual host traffic status module (module for mainline nginx)
pkgver = 0.2.1
pkgrel = 2
pkgrel = 3
url = https://github.com/vozlt/nginx-module-vts
arch = i686
arch = x86_64
license = BSD
source = https://nginx.org/download/nginx-1.23.2.tar.gz
source = nginx-mainline-mod-vts-0.2.1.tar.gz::https://github.com/vozlt/nginx-module-vts/archive/v0.2.1.tar.gz
sha256sums = a80cc272d3d72aaee70aa8b517b4862a635c0256790434dbfc4d618a999b0b46
makedepends = nginx-mainline-src
source = nginx-module-vts-0.2.1.tar.gz::https://github.com/vozlt/nginx-module-vts/archive/v0.2.1.tar.gz
sha256sums = 1a63d78d3ae4df18b3a57a616eeee006cdc0bd71aa7ea2947046004b123704f4
pkgname = nginx-mainline-mod-vts
depends = nginx-mainline=1.23.2
depends = nginx-mainline

View File

@@ -3,37 +3,42 @@
pkgname=nginx-mainline-mod-vts
pkgver=0.2.1
pkgrel=2
pkgrel=3
_modname="${pkgname#nginx-mainline-mod-}"
_nginxver=1.23.2
_modname="nginx-module-${pkgname#nginx-mainline-mod-}"
pkgdesc='Nginx virtual host traffic status module (module for mainline nginx)'
arch=('i686' 'x86_64')
depends=() # the build process doesn't require or use installed nginx, so add the dependency in package() to break the cycle
makedepends=('nginx-mainline-src')
url="https://github.com/vozlt/nginx-module-vts"
license=('BSD')
source=(
https://nginx.org/download/nginx-$_nginxver.tar.gz
$pkgname-$pkgver.tar.gz::https://github.com/vozlt/nginx-module-vts/archive/v$pkgver.tar.gz
$_modname-$pkgver.tar.gz::https://github.com/vozlt/nginx-module-vts/archive/v$pkgver.tar.gz
)
sha256sums=('a80cc272d3d72aaee70aa8b517b4862a635c0256790434dbfc4d618a999b0b46'
'1a63d78d3ae4df18b3a57a616eeee006cdc0bd71aa7ea2947046004b123704f4')
sha256sums=('1a63d78d3ae4df18b3a57a616eeee006cdc0bd71aa7ea2947046004b123704f4')
prepare() {
mkdir -p build
cd build
ln -sf /usr/src/nginx/auto
ln -sf /usr/src/nginx/src
}
build() {
cd "$srcdir"/nginx-$_nginxver
./configure --with-compat --add-dynamic-module=../nginx-module-vts-$pkgver
cd build
/usr/src/nginx/configure --with-compat --add-dynamic-module=../$_modname-$pkgver
make modules
}
package() {
depends=("nginx-mainline=$_nginxver")
install -Dm644 "$srcdir"/nginx-module-vts-$pkgver/LICENSE \
depends=("nginx-mainline")
install -Dm644 "$srcdir"/$_modname-$pkgver/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
cd "$srcdir"/nginx-$_nginxver/objs
cd build/objs
for mod in *.so; do
install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod
done