aboutsummaryrefslogtreecommitdiff
path: root/genpass/APKBUILD
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-07-31 16:37:07 +0000
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-07-31 16:37:07 +0000
commit6557fe33e9928f70dff65b5d4cd75df60f2cb795 (patch)
treec254d352db5cd22f1198dfb2d146847549450936 /genpass/APKBUILD
parent2bac589ca6d0aa95e467df349ba4f608805510fe (diff)
downloadapkbuilds-6557fe33e9928f70dff65b5d4cd75df60f2cb795.tar.gz
apkbuilds-6557fe33e9928f70dff65b5d4cd75df60f2cb795.tar.bz2
apkbuilds-6557fe33e9928f70dff65b5d4cd75df60f2cb795.zip
feat: Add configuration for nginx
Add an extra pkg to build the nginx file.
Diffstat (limited to 'genpass/APKBUILD')
-rw-r--r--genpass/APKBUILD15
1 files changed, 14 insertions, 1 deletions
diff --git a/genpass/APKBUILD b/genpass/APKBUILD
index a9f99f0..3c74124 100644
--- a/genpass/APKBUILD
+++ b/genpass/APKBUILD
@@ -18,7 +18,12 @@ makedepends="
bzip2-dev
"
builddir="$srcdir/$pkgname-$pkgver/"
-source="https://artifacts.gabrielgio.me/"$pkgname"/"$pkgname"-"$pkgver".tar.gz"
+subpackages="$pkgname-nginx:_nginx"
+
+source="
+ https://artifacts.gabrielgio.me/$pkgname/$pkgname-$pkgver.tar.gz
+ $pkgname.nginx.conf
+"
build() {
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal --quiet -y
@@ -31,6 +36,13 @@ check() {
make test
}
+_nginx() {
+ depends="nginx"
+ pkgdesc="nginx configuration for $pkgname"
+ install -Dm644 "$srcdir"/"$package"/"$pkgname".nginx.conf \
+ "$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf
+}
+
package() {
mkdir -p "$pkgdir"/var/www
cp -dr public "$pkgdir"/var/www/"$pkgname"
@@ -38,4 +50,5 @@ package() {
sha512sums="
1b3079701557f97a0380dcfb4d67e7b96fb340a1c5f9b822a718a4c68b638ad09ba33afe33babc8bd4454390d128ed0b55bb1cd7aa513ced90fe443cddf022d1 genpass-0.1.0.tar.gz
+6e6b9d80b26006efd5b6e368bd3925425b2080bf88dca38c91a9dd8a1db2b3774b2cb8ecba67ac01d2c822f0ad75106d6e103cc3371076f3f40232dd38b57fd4 genpass.nginx.conf
"