aboutsummaryrefslogtreecommitdiff
path: root/apks/genpass
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-30 19:58:09 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-30 19:58:09 +0200
commitcc9e4011f8a8514431d1685b0d723e186b4b24c9 (patch)
tree5a2d9d52eecf68979749c9bfcb3571cedb8301b3 /apks/genpass
parent8c9300cb9afc98be50111d10608fe5a4f10a905c (diff)
downloadapkbuilds-cc9e4011f8a8514431d1685b0d723e186b4b24c9.tar.gz
apkbuilds-cc9e4011f8a8514431d1685b0d723e186b4b24c9.tar.bz2
apkbuilds-cc9e4011f8a8514431d1685b0d723e186b4b24c9.zip
feat: Add caddyfile
Diffstat (limited to 'apks/genpass')
-rw-r--r--apks/genpass/APKBUILD16
-rw-r--r--apks/genpass/genpass.caddyfile4
2 files changed, 19 insertions, 1 deletions
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
+}