summaryrefslogtreecommitdiff
path: root/boulder/PKGBUILD
blob: 01653c42d8598443949fd3d2dbfa6a3cb0cad547 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgname=boulder
pkgver='2019_08_26'
_pkgver="${pkgver//_/-}"
pkgrel=1
pkgdesc='ACME-compatible X.509 Certificate Authority'
arch=('x86_64' 'i686' 'pentium4')
url='https://github.com/letsencrypt/boulder'
license=('MPL2')
groups=()
depends=(
  'libtool'
)
makedepends=(
  'go'
)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=(
  "${pkgname}-${_pkgver}.tar.gz::https://github.com/letsencrypt/${pkgname}/archive/release-${_pkgver}.tar.gz"
)
sha512sums=(
  'd047e0398d616535aee98401d663ce1ec7f098e20ccda4b6b045166284488d3762526446623dda6a83634f936ffb1bf4be2915dd7d9ce84099298a3360533a50'
)

prepare() {

  cd "${pkgname}-release-${_pkgver}"
  sed -i '
    / go install / s/ \$(GO_BUILD_FLAGS) / -buildmode=pie /
  ' 'Makefile'

}

build() {

  cd "${pkgname}-release-${_pkgver}"
  make

}

package() {

  cd "${pkgname}-release-${_pkgver}"

  install -d -m755 "${pkgdir}/usr/bin"

  find cmd -maxdepth 1 -mindepth 1 -type d -printf 'bin/%f\n' \
  | grep -vxF 'bin/testdata' \
  | xargs -r install -m755 -t "${pkgdir}/usr/bin/"

  install -D -m755 -t "${pkgdir}/usr/lib/boulder/config" 'test/config/'*
  install -D -m755 -t "${pkgdir}/usr/lib/boulder/data" 'data/'*
  install -d -m755 "${pkgdir}/var/lib/boulder"
  mv sa/_db "${pkgdir}/var/lib/boulder"

}