From cc9e4011f8a8514431d1685b0d723e186b4b24c9 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sat, 30 Sep 2023 19:58:09 +0200 Subject: feat: Add caddyfile --- apks/genpass/APKBUILD | 16 +++++++++++++++- apks/genpass/genpass.caddyfile | 4 ++++ apks/jnfilter/APKBUILD | 15 ++++++++++++++- apks/jnfilter/jnfilter.caddyfile | 3 +++ apks/midr/APKBUILD | 1 - apks/tres/APKBUILD | 15 ++++++++++++++- apks/tres/tres.caddyfile | 4 ++++ 7 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 apks/genpass/genpass.caddyfile create mode 100644 apks/jnfilter/jnfilter.caddyfile create mode 100644 apks/tres/tres.caddyfile (limited to 'apks') diff --git a/apks/genpass/APKBUILD b/apks/genpass/APKBUILD index 7bf999d..3060a2f 100644 --- a/apks/genpass/APKBUILD +++ b/apks/genpass/APKBUILD @@ -18,11 +18,15 @@ makedepends=" bzip2-dev " builddir="$srcdir/$pkgname-$pkgver/" -subpackages="$pkgname-nginx:_nginx" +subpackages=" + $pkgname-nginx:_nginx + $pkgname-caddy:_caddy +" source=" https://artifacts.gabrielgio.me/archive/$pkgname/$pkgname-$pkgver.tar.gz $pkgname.nginx.conf + $pkgname.caddyfile " build() { @@ -43,6 +47,15 @@ _nginx() { "$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf } + +_caddy() { + depends="caddy genpass" + pkgdesc="caddy configuration for $pkgname" + mkdir -p "$subpkgdir"/etc/caddy/sites/ + install -Dm644 "$srcdir"/"$package"/"$pkgname".caddyfile \ + "$subpkgdir"/etc/caddy/sites/"$pkgname".caddyfile +} + package() { mkdir -p "$pkgdir"/var/www cp -dr public "$pkgdir"/var/www/"$pkgname" @@ -51,4 +64,5 @@ package() { sha512sums=" b07c2eb4987d1e6bd369b8d329b15a770471e0ae18fe8bcbec45bcfc80f9658068dc47a3ab70028d6d47bb2d19729ca5e63bef2b8c9077f29fd8591ecbeaa3d0 genpass-0.1.0.tar.gz 6e6b9d80b26006efd5b6e368bd3925425b2080bf88dca38c91a9dd8a1db2b3774b2cb8ecba67ac01d2c822f0ad75106d6e103cc3371076f3f40232dd38b57fd4 genpass.nginx.conf +8fd85d8c482595021f2592aa76f096a6ef97b56f8b89a39d65f1ddf799fe091f7ebeca735c1d9dfc44c17cd0f8300799e6cc4afc649221354c2021ecacab15fe genpass.caddyfile " diff --git a/apks/genpass/genpass.caddyfile b/apks/genpass/genpass.caddyfile new file mode 100644 index 0000000..87cea89 --- /dev/null +++ b/apks/genpass/genpass.caddyfile @@ -0,0 +1,4 @@ +genpass.gabrielgio.me { + root * /var/www/genpass + file_server +} diff --git a/apks/jnfilter/APKBUILD b/apks/jnfilter/APKBUILD index 74ebc87..850f917 100644 --- a/apks/jnfilter/APKBUILD +++ b/apks/jnfilter/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Gabriel Arakaki Giovanini pkgname=jnfilter pkgver=0.1.1 -pkgrel=0 +pkgrel=1 pkgdesc="Filtro for Joven Nerd's podcast feed" url="https://git.sr.ht/~gabrielgio/jnfilter" arch="noarch" @@ -18,11 +18,13 @@ builddir="$srcdir/$pkgname-v$pkgver" subpackages=" $pkgname-openrc $pkgname-nginx:_nginx:noarch + $pkgname-caddy:_caddy:noarch " source=" $pkgname-$pkgver.tar.gz::https://git.sr.ht/~gabrielgio/$pkgname/archive/v$pkgver.tar.gz $pkgname.initd $pkgname.nginx.conf + $pkgname.caddyfile $pkgname.confd " provides="py3-jnfilter=$pkgver-r$pkgrel" @@ -39,6 +41,16 @@ _nginx() { "$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf } +_caddy() { + depends="caddy jnfilter" + pkgdesc="caddy configuration for $pkgname" + + mkdir -p "$subpkgdir"/etc/caddy/sites/ + + install -Dm644 "$srcdir"/"$package"/"$pkgname".caddyfile \ + "$subpkgdir"/etc/caddy/sites/"$pkgname".caddyfile +} + package() { # install scripts install -m755 -D "$srcdir"/$pkgname.initd \ @@ -53,5 +65,6 @@ sha512sums=" b7bba93dc85ffe9e86e1b0c7e3d1773d30aec9dd6797fc41b995a1a6b5687aa33e8f7ef26b9d26be6d5ffdbbe21d3750e97b15ebaf82dba4e63b9d82120f0cb2 jnfilter-0.1.1.tar.gz 4e9afb1c25218e78aa9ce033c76689613c55eeab2c3b460476ee64375c50b83f99e98ce504c9a9485ae55e186d02eb5d38715100343a8b59cab0f14aa7fa2346 jnfilter.initd 7edf3d3932a8af82aa5140523c517da2d697e10c197b784bd9d370baddccb66c25a67c4e2b1d64f7521e818258348e3153168256572ab5bc1b0f0bc73ffe6944 jnfilter.nginx.conf +6abd5060297c0bf38d3a12bbe34b01ee2e5df1b0600ac9458850f64d4647fe3c5eb9bdb4855645875e48fe74f64229abbdcc1b139ca14f89db6e795d3a09ebf6 jnfilter.caddyfile 00142d4a156bba4b714c2488674a53f82a95cbfd073aede159011de5aca415fe51481eee2bd225e376fd9cdf66ba95faa76beb038c896b6148454f940a58fffd jnfilter.confd " diff --git a/apks/jnfilter/jnfilter.caddyfile b/apks/jnfilter/jnfilter.caddyfile new file mode 100644 index 0000000..2670a08 --- /dev/null +++ b/apks/jnfilter/jnfilter.caddyfile @@ -0,0 +1,3 @@ +jnfilter.gabrielgio.me { + reverse_proxy http://localhost:32000 +} diff --git a/apks/midr/APKBUILD b/apks/midr/APKBUILD index 863dcd6..0a9b29e 100644 --- a/apks/midr/APKBUILD +++ b/apks/midr/APKBUILD @@ -32,7 +32,6 @@ build() { } package() { - install -Dm755 "$pkgname" "$pkgdir"/usr/lib/"$pkgname"/"$pkgname" mkdir -p "$pkgdir"/usr/bin diff --git a/apks/tres/APKBUILD b/apks/tres/APKBUILD index 547262b..cea6ed6 100644 --- a/apks/tres/APKBUILD +++ b/apks/tres/APKBUILD @@ -8,11 +8,15 @@ arch="noarch" license="MIT" options="!check" # this can't be tested builddir="$srcdir/$pkgname-$pkgver/" -subpackages="$pkgname-nginx:_nginx:noarch" +subpackages=" + $pkgname-nginx:_nginx:noarch + $pkgname-caddy:_caddy:noarch +" source=" https://artifacts.gabrielgio.me/archive/$pkgname/$pkgname-$pkgver.tar.gz "$pkgname".nginx.conf + "$pkgname".caddyfile " build() { @@ -26,6 +30,14 @@ _nginx() { "$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf } +_caddy() { + depends="caddy tres" + pkgdesc="caddy configuration for $pkgname" + mkdir -p "$subpkgdir"/etc/caddy/sites/ + install -Dm644 "$srcdir"/"$package"/"$pkgname".caddyfile \ + "$subpkgdir"/etc/caddy/sites/"$pkgname".caddyfile +} + package() { mkdir -p "$pkgdir"/usr/share/webapps/"$pkgname" cp -dr index.html "$pkgdir"/usr/share/webapps/"$pkgname" @@ -34,4 +46,5 @@ package() { sha512sums=" c8a10539b56026804843c62ff423ad5cc596fd49a04be4642f6319f2110679388554d0e45ea1928d7d2b8791e46b49d3d3a8d43c9c9d79d5ca96af5eea6ead64 tres-0.1.0.tar.gz 8dcf6312a400ce876d09bf2e050f50151c6a8f56bc8d7157e2769274ea472831601a7a2c9795d3eba64fe33ca0eaf723681e7ec3944b8ba61fde8df8a067cba0 tres.nginx.conf +5d3a0e00f7390f0f2a046c3012f0e5403108c8853c7dfcc4adaba1d3fbc30f73cea46148a8da498164eaad2473099c2b57ab28836c76d54fce1bc7c5533f0d0c tres.caddyfile " diff --git a/apks/tres/tres.caddyfile b/apks/tres/tres.caddyfile new file mode 100644 index 0000000..8bb21da --- /dev/null +++ b/apks/tres/tres.caddyfile @@ -0,0 +1,4 @@ +tres.gabrielgio.me { + root * /usr/share/webapps/tres + file_server +} -- cgit v1.2.3