apkbuilds @ e73a50263de75a541e481c3f5949ed0f8eaa403a

 1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
 2pkgname=tres
 3pkgver=0.1.0
 4pkgrel=1
 5pkgdesc="Simple rule of tree"
 6url="https://git.sr.ht/~gabrielgio/tres"
 7arch="noarch"
 8license="MIT"
 9options="!check" # this can't be tested
10builddir="$srcdir/$pkgname-$pkgver/"
11subpackages="
12    $pkgname-nginx:_nginx:noarch
13    $pkgname-caddy:_caddy:noarch
14"
15
16source="
17    https://artifacts.gabrielgio.me/archive/$pkgname/$pkgname-$pkgver.tar.gz
18    "$pkgname".nginx.conf
19    "$pkgname".caddyfile
20"
21
22build() {
23    echo "skipping build"
24}
25
26_nginx() {
27	depends="nginx tres"
28	pkgdesc="nginx configuration for $pkgname"
29	install -Dm644 "$srcdir"/"$package"/"$pkgname".nginx.conf \
30		"$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf
31}
32
33_caddy() {
34	depends="caddy tres"
35	pkgdesc="caddy configuration for $pkgname"
36    mkdir -p "$subpkgdir"/etc/caddy/sites/
37	install -Dm644 "$srcdir"/"$package"/"$pkgname".caddyfile \
38		"$subpkgdir"/etc/caddy/sites/"$pkgname".caddyfile
39}
40
41package() {
42    mkdir -p "$pkgdir"/usr/share/webapps/"$pkgname"
43    cp -dr index.html "$pkgdir"/usr/share/webapps/"$pkgname"
44}
45
46sha512sums="
47c8a10539b56026804843c62ff423ad5cc596fd49a04be4642f6319f2110679388554d0e45ea1928d7d2b8791e46b49d3d3a8d43c9c9d79d5ca96af5eea6ead64  tres-0.1.0.tar.gz
488dcf6312a400ce876d09bf2e050f50151c6a8f56bc8d7157e2769274ea472831601a7a2c9795d3eba64fe33ca0eaf723681e7ec3944b8ba61fde8df8a067cba0  tres.nginx.conf
495d3a0e00f7390f0f2a046c3012f0e5403108c8853c7dfcc4adaba1d3fbc30f73cea46148a8da498164eaad2473099c2b57ab28836c76d54fce1bc7c5533f0d0c  tres.caddyfile
50"