summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f94b7a808b9bcefbf6cb00b5f618a2ca1d3a7da3 (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

# Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>

pkgname=acmetool
pkgver=0.0.67
pkgrel=1
pkgdesc="An easy-to-use command line tool for automatically acquiring certificates from ACME servers (such as Let's Encrypt)"
arch=(i686 x86_64 armv7h)
url="https://github.com/hlandau/acme"
license=('MIT')
depends=(glibc bash libcap)
makedepends=(go)

source=(acmetool-$pkgver.tar.gz::https://github.com/hlandau/acme/archive/v$pkgver.tar.gz
        LICENSE::https://raw.githubusercontent.com/hlandau/rilts/master/licences/COPYING.MIT
        acmetool.service
        acmetool.timer
        acmetool.tmpfile
        )

sha256sums=('01f78340006539c62bb86250433d2f819ab529ccd9a0aa74e140ff0fee839073'
            'fd80a26fbb3f644af1fa994134446702932968519797227e07a1368dea80f0bc'
            'de9d31c97000445e3da4dccca404efa9c23203d5fe345befdd9926bcdb6b36e3'
            '82cd724853507a6d96f7a432aa44c457e76f4d6c0f1ad35142287b7c383d5c0b'
            'ae82f90321f60f441f49227e8cc69c3bb1fc80f196bb6070b4617048adf1ca4d')

build() {
    GOPATH="${srcdir}/fakegopath"
    export GOPATH
    mkdir -p "${GOPATH}/src/github.com/hlandau/acme/"
    cd "${srcdir}/acme-${pkgver}"
    for i in `find . -maxdepth 1 -type d`
    do
    if [ "${i}" = "." ]
    then
    continue
    fi
    cp -rf "${i}" "${GOPATH}/src/github.com/hlandau/acme/"
    done
    go get -v github.com/hlandau/acme/cmd/acmetool
    cd "${GOPATH}/src/github.com/hlandau/acme/cmd/acmetool"
    go build -pkgdir "${pkgdir}"
}

package() {
    install -Dm0755 "${srcdir}/fakegopath/bin/acmetool" "${pkgdir}/usr/bin/acmetool"
    install -Dm644 -t "${pkgdir}/usr/lib/systemd/system" \
                        ${srcdir}/acmetool.service \
                        ${srcdir}/acmetool.timer
    install -Dm644 -t "${pkgdir}/usr/lib/tmpfiles.d" ${srcdir}/acmetool.tmpfile

    install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "${srcdir}/acme-${pkgver}/README.md" "${srcdir}/acme-${pkgver}/_doc/"*
    # copy the license
    install -Dm644  "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/acmetool/LICENSE"
}