apkbuilds @ 5ae86d77daf952ef6fb5c48128d23d83b60d5119

 1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
 2pkgname=genpass
 3pkgver=0.1.0
 4pkgrel=0
 5pkgdesc="Website password generator in wasm"
 6url="https://git.sr.ht/~gabrielgio/genpass"
 7arch="all"
 8license="MIT"
 9depends=""
10makedepends="
11    curl
12    build-base
13    firefox
14    make
15    npm
16    cargo
17    openssl-dev
18    bzip2-dev
19"
20builddir="$srcdir/$pkgname-$pkgver/"
21subpackages="$pkgname-nginx:_nginx"
22
23source="
24    https://artifacts.gabrielgio.me/$pkgname/$pkgname-$pkgver.tar.gz
25    $pkgname.nginx.conf
26"
27
28build() {
29    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal --quiet -y
30    source $HOME/.cargo/env
31    curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
32    make
33}
34
35check() {
36    make test
37}
38
39_nginx() {
40	depends="nginx"
41	pkgdesc="nginx configuration for $pkgname"
42	install -Dm644 "$srcdir"/"$package"/"$pkgname".nginx.conf \
43		"$subpkgdir"/etc/nginx/http.d/"$pkgname".nginx.conf
44}
45
46package() {
47    mkdir -p "$pkgdir"/var/www
48    cp -dr public "$pkgdir"/var/www/"$pkgname"
49}
50
51sha512sums="
521b3079701557f97a0380dcfb4d67e7b96fb340a1c5f9b822a718a4c68b638ad09ba33afe33babc8bd4454390d128ed0b55bb1cd7aa513ced90fe443cddf022d1  genpass-0.1.0.tar.gz
536e6b9d80b26006efd5b6e368bd3925425b2080bf88dca38c91a9dd8a1db2b3774b2cb8ecba67ac01d2c822f0ad75106d6e103cc3371076f3f40232dd38b57fd4  genpass.nginx.conf
54"