diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-07 00:39:38 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-07 14:32:55 +0200 |
commit | 831ba5bb1c17ad245490643e73b0ce57e0ac585d (patch) | |
tree | 6b8f16c060cad2b32d80228242b1c42f467b41c4 /testing | |
parent | eae3085afd6e414eeb09a21e044107ed33e5d6f6 (diff) | |
download | aports-831ba5bb1c17ad245490643e73b0ce57e0ac585d.tar.bz2 aports-831ba5bb1c17ad245490643e73b0ce57e0ac585d.tar.xz |
testing/unit: build all modules and move them to subpackages
Diffstat (limited to 'testing')
-rw-r--r-- | testing/unit/APKBUILD | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/testing/unit/APKBUILD b/testing/unit/APKBUILD index d299f9ed9e..f0af7583b2 100644 --- a/testing/unit/APKBUILD +++ b/testing/unit/APKBUILD @@ -1,4 +1,5 @@ # Contributor: André Klitzing <aklitzing@gmail.com> +# Contributor: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: André Klitzing <aklitzing@gmail.com> pkgname=unit pkgver=1.1 @@ -7,24 +8,37 @@ pkgdesc="NGINX Unit is a dynamic web application server" url="https://unit.nginx.org/" arch="all" license="Apache-2.0" -depends="" -makedepends="python3-dev" +_phpver=7 +makedepends="perl-dev php$_phpver-dev php$_phpver-embed python3-dev ruby-dev" +subpackages="" source="https://unit.nginx.org/download/$pkgname-$pkgver.tar.gz" builddir="$srcdir/$pkgname-$pkgver" +for _mod in perl php$_phpver python3 ruby; do + subpackages="$subpackages $pkgname-$_mod:_module" +done + +_modules_dir="/usr/lib/unit/modules" + build() { cd "$builddir" + # Needed for building perl module. + export CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" + ./configure \ --prefix="/usr" \ --state="/var/lib/unit" \ --control="unix:/run/control.unit.sock" \ --pid="/run/unit.pid" \ --log="/var/log/unit.log" \ - --modules="/usr/lib/unit/modules" \ + --modules="$_modules_dir" \ --tests - ./configure python \ - --config=python3-config + ./configure perl + ./configure php --module=php$_phpver --config=php-config$_phpver + ./configure python --config=python3-config + ./configure ruby + make make tests } @@ -41,7 +55,16 @@ check() { package() { cd "$builddir" - make DESTDIR="$pkgdir" install + make unitd-install DESTDIR="$pkgdir" +} + +_module() { + local modname=${subpkgname#$pkgname-} + pkgdesc="$modname module for NGINX Unit" + depends="$pkgname=$pkgver-r$pkgrel" + + cd "$builddir" + make $modname-install DESTDIR="$subpkgdir" } sha512sums="89460e96d775df7f0c9d66011b59ca45ebe99e1e9e194f1800824ee1a3ae9c3f0207c9c749d34c250560ded6f1c3ad5b66fadcb3ffb2c62c5a6f5115944cea1f unit-1.1.tar.gz" |