diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-07 14:19:58 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-07 14:32:55 +0200 |
commit | f9bbb80e53c08d47ef2120b1e8e60e12f9c8f038 (patch) | |
tree | d2204c4d2d0a32e40d793fa8de71d5a5c120a130 /testing/unit/APKBUILD | |
parent | 831ba5bb1c17ad245490643e73b0ce57e0ac585d (diff) | |
download | aports-f9bbb80e53c08d47ef2120b1e8e60e12f9c8f038.tar.bz2 aports-f9bbb80e53c08d47ef2120b1e8e60e12f9c8f038.tar.xz |
testing/unit: add init script
Diffstat (limited to 'testing/unit/APKBUILD')
-rw-r--r-- | testing/unit/APKBUILD | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/testing/unit/APKBUILD b/testing/unit/APKBUILD index f0af7583b2..ad49406cf8 100644 --- a/testing/unit/APKBUILD +++ b/testing/unit/APKBUILD @@ -10,8 +10,12 @@ arch="all" license="Apache-2.0" _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" +install="$pkgname.pre-install" +subpackages="$pkgname-openrc" +source="https://unit.nginx.org/download/$pkgname-$pkgver.tar.gz + $pkgname.initd + $pkgname.confd + $pkgname.logrotate" builddir="$srcdir/$pkgname-$pkgver" for _mod in perl php$_phpver python3 ruby; do @@ -33,6 +37,8 @@ build() { --pid="/run/unit.pid" \ --log="/var/log/unit.log" \ --modules="$_modules_dir" \ + --user=unit \ + --group=unit \ --tests ./configure perl ./configure php --module=php$_phpver --config=php-config$_phpver @@ -55,7 +61,17 @@ check() { package() { cd "$builddir" + make unitd-install DESTDIR="$pkgdir" + + install -D -m 755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -D -m 644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + install -D -m 644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname +} + +openrc() { + default_openrc + depends="curl" } _module() { @@ -67,4 +83,7 @@ _module() { make $modname-install DESTDIR="$subpkgdir" } -sha512sums="89460e96d775df7f0c9d66011b59ca45ebe99e1e9e194f1800824ee1a3ae9c3f0207c9c749d34c250560ded6f1c3ad5b66fadcb3ffb2c62c5a6f5115944cea1f unit-1.1.tar.gz" +sha512sums="89460e96d775df7f0c9d66011b59ca45ebe99e1e9e194f1800824ee1a3ae9c3f0207c9c749d34c250560ded6f1c3ad5b66fadcb3ffb2c62c5a6f5115944cea1f unit-1.1.tar.gz +a835b83284d7bd4afb445dd93c84e2c6dd5906f137784ff3189edc82c3f14f07c5de00681125924138e3ac420cc849cc93e52cabbd6b550ded09d055d30e091c unit.initd +f85112726dfcace2b6d94b10669615fef517f5aa10ac858890dd9f5c868a6e2569500f7411f758fcb24c98c9630760d36a74bd33ea510ab0f8ca8cd6cb1fb1e8 unit.confd +723e465162dfdb31881680200221542add414e54ef4f4f1fc57e91b7b57777dfb21c2eee4727ecbba0c1943bb77a2597cc0225b16e334c38258c296d15b1df74 unit.logrotate" |