forked from archlinux/svntogit-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
67 lines (57 loc) · 2.67 KB
/
PKGBUILD
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
# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
pkgname=acme-redirect
pkgver=0.4.0
pkgrel=1
pkgdesc='Minimal http daemon that answers acme challenges and redirects everything else to https'
url='https://github.com/kpcyrd/acme-redirect'
arch=('x86_64')
license=('GPL3')
depends=('openssl')
makedepends=('cargo' 'scdoc')
backup=('etc/acme-redirect.conf')
source=(https://github.com/kpcyrd/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz
https://github.com/kpcyrd/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz.asc)
sha512sums=('726cb8a28e93743ff6bb28b3f134b11980ba7731ed18900602401e595c21ff7c51f935e0cca1a98f4e69cc08bdd8ca3f5437c4450c296313d631fa9df81f8fa1'
'SKIP')
b2sums=('8446bc7b291c8f96797328f21c152616ae57162aa31c6205cfb1b91b30a5cb5212bdc83c8af0b23abe92436360c9c05ca79a4972587966dd579a8777a782128e'
'SKIP')
validpgpkeys=("64B13F7117D6E07D661BBCE0FE763A64F5E54FD6")
build() {
cd "${pkgname}-${pkgver}"
cargo build --release --locked
make docs
}
check() {
cd "${pkgname}-${pkgver}"
cargo test --release --locked
}
package() {
cd "${pkgname}-${pkgver}"
install -Dm 755 -t "${pkgdir}/usr/bin" \
target/release/acme-redirect
# install completions
install -d "${pkgdir}/usr/share/bash-completion/completions" \
"${pkgdir}/usr/share/zsh/site-functions" \
"${pkgdir}/usr/share/fish/vendor_completions.d"
"${pkgdir}/usr/bin/acme-redirect" completions bash > "${pkgdir}/usr/share/bash-completion/completions/acme-redirect"
"${pkgdir}/usr/bin/acme-redirect" completions zsh > "${pkgdir}/usr/share/zsh/site-functions/_acme-redirect"
"${pkgdir}/usr/bin/acme-redirect" completions fish > "${pkgdir}/usr/share/fish/vendor_completions.d/acme-redirect.fish"
# install configs
install -Dm 644 contrib/confs/acme-redirect.conf -t "${pkgdir}/etc"
install -Dm 644 contrib/confs/certs.d/example.com.conf "${pkgdir}/etc/acme-redirect.d/example.com.conf.sample"
# install systemd configs
install -Dm 644 -t "${pkgdir}/usr/lib/systemd/system" \
contrib/systemd/acme-redirect-renew.service \
contrib/systemd/acme-redirect-renew.timer \
contrib/systemd/acme-redirect.service
install -Dm 644 contrib/systemd/acme-redirect.sysusers "${pkgdir}/usr/lib/sysusers.d/acme-redirect.conf"
install -Dm 644 contrib/systemd/acme-redirect.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/acme-redirect.conf"
# install docs
install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
install -Dm 644 -t "${pkgdir}/usr/share/man/man1" \
contrib/docs/acme-redirect.1
install -Dm 644 -t "${pkgdir}/usr/share/man/man5" \
contrib/docs/acme-redirect.conf.5 \
contrib/docs/acme-redirect.d.5
}
# vim: ts=2 sw=2 et: