summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Kuntze2018-07-24 15:05:14 +0200
committerNoel Kuntze2018-07-24 15:05:14 +0200
commit955d90227e063624550b23fe7ee277c54392433e (patch)
treefb0a037fd188fc5b8ad20aabfa521261ea98bd7b
parent6e3d6b53275bb07b082be53866c1881e73292225 (diff)
downloadaur-955d90227e063624550b23fe7ee277c54392433e.tar.gz
Update PKGBUILD to incorporate changes contributed by Stephan Eisvogel
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD52
-rw-r--r--acmetool.conf2
-rw-r--r--acmetool.install7
-rw-r--r--acmetool.service7
-rw-r--r--acmetool.tmpfile1
6 files changed, 48 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 745f0a92173..92de7de6288 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,28 +1,30 @@
# Generated by mksrcinfo v8
-# Sat Jun 30 19:00:14 UTC 2018
+# Tue Jul 24 13:02:25 UTC 2018
pkgbase = acmetool
pkgdesc = An easy-to-use command line tool for automatically acquiring certificates from ACME servers (such as Let's Encrypt)
pkgver = 0.0.67
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/hlandau/acme
+ install = acmetool.install
arch = i686
arch = x86_64
arch = armv7h
license = MIT
makedepends = go
- depends = glibc
depends = bash
depends = libcap
source = acmetool-0.0.67.tar.gz::https://github.com/hlandau/acme/archive/v0.0.67.tar.gz
source = LICENSE::https://raw.githubusercontent.com/hlandau/rilts/master/licences/COPYING.MIT
source = acmetool.service
source = acmetool.timer
- source = acmetool.tmpfile
+ source = acmetool.conf
+ source = acmetool.install
sha256sums = 01f78340006539c62bb86250433d2f819ab529ccd9a0aa74e140ff0fee839073
sha256sums = fd80a26fbb3f644af1fa994134446702932968519797227e07a1368dea80f0bc
- sha256sums = de9d31c97000445e3da4dccca404efa9c23203d5fe345befdd9926bcdb6b36e3
+ sha256sums = bf0052ea1a94919455fc364c6e9ff66f9268b7f80c42e9a73249919a6b369d9c
sha256sums = 82cd724853507a6d96f7a432aa44c457e76f4d6c0f1ad35142287b7c383d5c0b
- sha256sums = ae82f90321f60f441f49227e8cc69c3bb1fc80f196bb6070b4617048adf1ca4d
+ sha256sums = 91f8999341dd8dcc1170231f977ae8f93fc671cd4d2b87c56b9e44c4ec0a13a2
+ sha256sums = ef50df6362af250c648433477fff6b1bc40bea2dfd7aff34cf9ec4f33a76e9fc
pkgname = acmetool
diff --git a/PKGBUILD b/PKGBUILD
index f94b7a808b9..96a8e123751 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,55 +1,59 @@
-
-# Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>
+# Maintainer: Noel Kuntze <noel.kuntze at thermi dot consulting>
+# Contributor: Mikael Eriksson <mikael_eriksson@miffe.org>
+# Contributor: Stephan Eisvogel <eisvogel at embinet dot de
pkgname=acmetool
pkgver=0.0.67
-pkgrel=1
+pkgrel=2
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)
+depends=(bash libcap)
makedepends=(go)
+install=acmetool.install
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
+ acmetool.conf
+ acmetool.install
)
sha256sums=('01f78340006539c62bb86250433d2f819ab529ccd9a0aa74e140ff0fee839073'
'fd80a26fbb3f644af1fa994134446702932968519797227e07a1368dea80f0bc'
- 'de9d31c97000445e3da4dccca404efa9c23203d5fe345befdd9926bcdb6b36e3'
+ 'bf0052ea1a94919455fc364c6e9ff66f9268b7f80c42e9a73249919a6b369d9c'
'82cd724853507a6d96f7a432aa44c457e76f4d6c0f1ad35142287b7c383d5c0b'
- 'ae82f90321f60f441f49227e8cc69c3bb1fc80f196bb6070b4617048adf1ca4d')
+ '91f8999341dd8dcc1170231f977ae8f93fc671cd4d2b87c56b9e44c4ec0a13a2'
+ 'ef50df6362af250c648433477fff6b1bc40bea2dfd7aff34cf9ec4f33a76e9fc')
-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
+prepare() {
+ export GOPATH="${srcdir}/build"
+ mkdir -p "${GOPATH}/src/github.com/hlandau/"
+ mv "${srcdir}/acme-${pkgver}" "${GOPATH}/src/github.com/hlandau/acme"
go get -v github.com/hlandau/acme/cmd/acmetool
+}
+
+build() {
+ export GOPATH="${srcdir}/build"
cd "${GOPATH}/src/github.com/hlandau/acme/cmd/acmetool"
- go build -pkgdir "${pkgdir}"
+ go build -pkgdir "${pkgdir}" \
+ -ldflags "-X github.com/hlandau/acme/responder.StandardWebrootPath=\"/run/acme/acme-challenge\""
}
package() {
- install -Dm0755 "${srcdir}/fakegopath/bin/acmetool" "${pkgdir}/usr/bin/acmetool"
+ # copy binary
+ install -Dm0755 "${srcdir}/build/bin/acmetool" "${pkgdir}/usr/bin/acmetool"
+ # copy systemd units (service and timer)
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
+ # copy acmetool.tmpfiles
+ install -Dm644 -t "${pkgdir}/usr/lib/tmpfiles.d/" ${srcdir}/acmetool.conf
- install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "${srcdir}/acme-${pkgver}/README.md" "${srcdir}/acme-${pkgver}/_doc/"*
+ # copy README.md and other documentation
+ install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "${srcdir}/build/src/github.com/hlandau/acme/README.md" "${srcdir}/build/src/github.com/hlandau/acme/_doc/"*
# copy the license
install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/acmetool/LICENSE"
}
diff --git a/acmetool.conf b/acmetool.conf
new file mode 100644
index 00000000000..864df4a0d72
--- /dev/null
+++ b/acmetool.conf
@@ -0,0 +1,2 @@
+d /run/acme 0755 root root - -
+
diff --git a/acmetool.install b/acmetool.install
new file mode 100644
index 00000000000..7f7c0193dd8
--- /dev/null
+++ b/acmetool.install
@@ -0,0 +1,7 @@
+post_install() {
+ systemd-tmpfiles --create
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/acmetool.service b/acmetool.service
index 90a6e8164a4..151341421d6 100644
--- a/acmetool.service
+++ b/acmetool.service
@@ -1,8 +1,7 @@
[Unit]
Description=Reconcile Let's Encrypt certificates
Documentation=man:acmetool(8)
-After=nss-lookup.target
-After=apache2.service nginx.service
+After=nss-lookup.target apache2.service nginx.service openresty.service
[Service]
Type=oneshot
@@ -13,9 +12,9 @@ NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=strict
-ReadWritePaths=/var/lib/acme /var/run/acme
+ReadWritePaths=/var/lib/acme /run/acme
ProtectHome=yes
ProtectKernelTunables=yes
ProtectControlGroups=yes
RestrictRealtime=yes
-RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 \ No newline at end of file
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
diff --git a/acmetool.tmpfile b/acmetool.tmpfile
deleted file mode 100644
index 4e6f6c764ab..00000000000
--- a/acmetool.tmpfile
+++ /dev/null
@@ -1 +0,0 @@
-d /var/run/acme 0755 root root - - \ No newline at end of file