blob: e606e46ef324e0e60246b4e3eed66f3c08b597a6 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
pkgname=genpass
pkgver=0.1.0
pkgrel=1
pkgdesc="Website password generator in wasm"
url="https://git.gabrielgio.me/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
$pkgname-caddy:_caddy
"
source="
$pkgname-$pkgver.tar.gz::https://git.gabrielgio.me/$pkgname/snapshot/$pkgname-$pkgver.tar.gz
$pkgname.nginx.conf
$pkgname.caddyfile
"
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
}
_caddy() {
depends="caddy genpass"
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"/var/www
cp -dr public "$pkgdir"/var/www/"$pkgname"
}
sha512sums="
ea9780eaddb0f3ae5310df43032a342be3cd8ff6d4dfaf9a81d3aee770df34d23dbe5d0cbf1c436a3fd36daeee63637cecfc2588db3fbd3e822eacf9d9adab2e genpass-0.1.0.tar.gz
6e6b9d80b26006efd5b6e368bd3925425b2080bf88dca38c91a9dd8a1db2b3774b2cb8ecba67ac01d2c822f0ad75106d6e103cc3371076f3f40232dd38b57fd4 genpass.nginx.conf
8fd85d8c482595021f2592aa76f096a6ef97b56f8b89a39d65f1ddf799fe091f7ebeca735c1d9dfc44c17cd0f8300799e6cc4afc649221354c2021ecacab15fe genpass.caddyfile
"
|