summaryrefslogtreecommitdiff
path: root/simple-pki/PKGBUILD
blob: 56ead0e68e800051657d665fa5246e94ffb66184 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgbase=simple-pki
pkgname=(simple-pki-ca simple-pki-cb)
pkgver=0.0.4
pkgrel=1
arch=('any')
url="https://git.eckner.net/Erich/${pkgname}"
license=('GPL')
makedepends=()
source=(
    "https://git.eckner.net/Erich/${pkgbase}/snapshot/${pkgbase}-${pkgver}.tar.xz"
)
sha512sums=('44ab38ebc3bee91e605ca0d9aa7ba3f8ce158a480039e1740884c3c795c07efcee40c2ef3864855a57a83d83bebc3fe2d64dd332fcd44891732937f442eaf236')

build() {

  cd ${pkgbase}-${pkgver}
  make

}

package_simple-pki-ca() {

  backup=(
    "etc/${pkgbase}/ca.conf"
    "etc/${pkgbase}/ca-ssl.conf"
  )
  for suffix in '.crl.srl' '.crt.srl' '.db' '.db.attr'; do
    backup+=(
      "etc/${pkgbase}/ca/root-ca/db/root-ca${suffix}"
      "etc/${pkgbase}/ca/signing-ca/db/signing-ca${suffix}"
    )
  done
  pkgdesc="Scripts to manage a simple pki ca - including automatic renewal"
  depends=('openssl' 'rsync')

  cd ${pkgbase}-${pkgver}
  make DESTDIR=${pkgdir} install-ca

}

package_simple-pki-cb() {

  backup=(
    "etc/${pkgbase}/cb.conf"
    "etc/${pkgbase}/server-ssl.conf"
  )
  pkgdesc="Scripts to manage simple pki clients - including automatic renewal"
  depends=('openssl' 'nginx')

  cd ${pkgbase}-${pkgver}
  make DESTDIR=${pkgdir} install-cb

}