aboutsummaryrefslogtreecommitdiff
path: root/apks/tres
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/tres
parent8c9300cb9afc98be50111d10608fe5a4f10a905c (diff)
downloadapkbuilds-cc9e4011f8a8514431d1685b0d723e186b4b24c9.tar.gz
apkbuilds-cc9e4011f8a8514431d1685b0d723e186b4b24c9.tar.bz2
apkbuilds-cc9e4011f8a8514431d1685b0d723e186b4b24c9.zip
feat: Add caddyfile
Diffstat (limited to 'apks/tres')
-rw-r--r--apks/tres/APKBUILD15
-rw-r--r--apks/tres/tres.caddyfile4
2 files changed, 18 insertions, 1 deletions
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
+}