aboutsummaryrefslogtreecommitdiff
path: root/apks/genpass/APKBUILD
blob: 7bf999d4d6edf4e99ae05381aafde547b95f51ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
pkgname=genpass
pkgver=0.1.0
pkgrel=0
pkgdesc="Website password generator in wasm"
url="https://git.sr.ht/~gabrielgio/genpass"
arch="all"
license="MIT"
depends=""
makedepends="
    curl
    build-base
    firefox
    make
    npm
    cargo
    openssl-dev
    bzip2-dev
"
builddir="$srcdir/$pkgname-$pkgver/"
subpackages="$pkgname-nginx:_nginx"

source="
    https://artifacts.gabrielgio.me/archive/$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
    source $HOME/.cargo/env
    curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
    make
}

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"
}

sha512sums="
b07c2eb4987d1e6bd369b8d329b15a770471e0ae18fe8bcbec45bcfc80f9658068dc47a3ab70028d6d47bb2d19729ca5e63bef2b8c9077f29fd8591ecbeaa3d0  genpass-0.1.0.tar.gz
6e6b9d80b26006efd5b6e368bd3925425b2080bf88dca38c91a9dd8a1db2b3774b2cb8ecba67ac01d2c822f0ad75106d6e103cc3371076f3f40232dd38b57fd4  genpass.nginx.conf
"