apkbuilds @ 8c9300cb9afc98be50111d10608fe5a4f10a905c

 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/archive/$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="
52b07c2eb4987d1e6bd369b8d329b15a770471e0ae18fe8bcbec45bcfc80f9658068dc47a3ab70028d6d47bb2d19729ca5e63bef2b8c9077f29fd8591ecbeaa3d0  genpass-0.1.0.tar.gz
536e6b9d80b26006efd5b6e368bd3925425b2080bf88dca38c91a9dd8a1db2b3774b2cb8ecba67ac01d2c822f0ad75106d6e103cc3371076f3f40232dd38b57fd4  genpass.nginx.conf
54"