summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b49a0e8e3386fbb9d58b96d88246f7cdfafc85f2 (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
# Maintainer: surefire@cryptomile.net
pkgname=acme-client-git
pkgver=0.1.16+14+gba153da
pkgrel=1
arch=('x86_64' 'i686' 'armv7h')
license=('custom:ISC')
pkgdesc="Yet another ACME client, specifically for Let's Encrypt, but one with a strong focus on security. Written in C."
url='https://kristaps.bsd.lv/acme-client/'

_sslver=2.8.3

source=(${pkgname}::'git+https://github.com/kristapsdz/acme-client-portable.git'
        "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${_sslver}.tar.gz"{,.asc}
        'acme@.timer'
        'acme@.service'
        'example.conf'
        'example.hook')

validpgpkeys=('A1EB079B8D3EB92B4EBD3139663AF51BD5E4D8D5')

sha256sums=('SKIP'
            '9b640b13047182761a99ce3e4f000be9687566e0828b4a72709e9e6a3ef98477'
            'SKIP'
            'c7d852229ae8a1b816ec476554c5d703a5513e6578a38672a52f7e7fca653b73'
            'a5bed5c3ef2e0be2faf160132972d7d948810a3c3aae262ab65fe251a0a24746'
            '8a14e7904ba3dfa65f30890c8c563b15597d4e60c39f42c9c79f52db80b8ee90'
            '40d7cf2596fdc6f2c94998dd93aba76107828e7cf4dbd77b99fd1b4c36712dc4')

depends=('libbsd')
makedepends=('git')

conflicts=('acme-client' 'letskencrypt')
provides=('acme-client' 'letskencrypt')

options=('emptydirs')

pkgver() {
	cd "${pkgname}"
	git describe --long --tags | sed 's/^VERSION_//; s/_/./g; s/-/+/g'
}

build() {
	cd "$srcdir/libressl-${_sslver}"
	./configure --disable-shared --enable-static
	make

	cd "$srcdir/$pkgname"
	make \
		CPPFLAGS="-I../libressl-${_sslver}/include -pthread" \
		LDFLAGS="-L../libressl-${_sslver}/{tls,ssl,crypto}/.libs -pthread"
}

package() {
	cd "${pkgname}"

	install -Dm755 -t "${pkgdir}/usr/bin" acme-client
	install -Dm644 -t "${pkgdir}/usr/share/man/man1" acme-client.1
	install -Dm644 -t "${pkgdir}/usr/share/licenses/acme-client" LICENSE.md

	install -Dm644 -t "${pkgdir}/usr/lib/systemd/system" ../acme@.{timer,service}
	install -Dm644 -t "${pkgdir}/etc/acme" ../example.conf
	install -Dm755 -t "${pkgdir}/etc/acme" ../example.hook

	install -dm755 "${pkgdir}/var/lib/acme"/{accounts,certs}
}