summaryrefslogtreecommitdiff
path: root/acme2certifier/PKGBUILD
blob: dd12b4a52f6a3f7a45456f6389ee7d3d635c15cd (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
66
67
68
69
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgname=acme2certifier
pkgver=0.23.1.r17.g084c586
_commit="${pkgver##*.g}"
pkgrel=1
pkgdesc='experimental acme server written in python'
arch=('any')
url='https://github.com/grindsa/acme2certifier'
license=('GPL3')
depends=(
  'python-jwcrypto'
  'python-pyopenssl'
  'python-dnspython'
  'python-pytz'
  'python-dateutil'
  'python-requests'
  'python-deprecated'
  'python-socks'
)
makedepends=(
  'git'
#  'python-setuptools'
)
source=(
  "${pkgname}::git+https://github.com/grindsa/${pkgname}.git#commit=${_commit}"
  'systemd.patch'
  'ssl.conf'
)
sha512sums=('SKIP'
            '6700736f127297293067930e92b711c579d800c684b587ca2c5cbc2430dee241500932b57398d87a4dbf4111483bf0942814a06587bbe2a77958c9da18a18e63'
            '3ed87346bf0776f50e452b1928c8f24db5498a5af1010042e9680ca136242f49e78d30ebca5e4328f485d1c051ab51f859a1ae2f936e0c6eb5b1cde700b3b201')
install="${pkgname}.install"

pkgver() {
  git -C "${pkgname}" describe --tags "${_commit}" \
  | sed '
    s/-/.r/
    s/-/./
  '
}

#build() {
#  cd "${srcdir}/${pkgname}"
#  python setup.py build
#}

prepare() {
  cd "${srcdir}/${pkgname}"
  patch -p1 -i "${srcdir}/systemd.patch"
}

package() {
  cd "${srcdir}/${pkgname}"
#  python setup.py install --root="${pkgdir}"
  install -Dm644 \
    examples/nginx/uwsgi.service \
    "${pkgdir}/usr/lib/systemd/system/acme2certifier.service"
  backup+=('etc/uwsgi/acme2certifier.ini')
  install -Dm644 \
    examples/nginx/acme2certifier.ini \
    "${pkgdir}/etc/uwsgi/acme2certifier.ini"
  install -dm755 -o http -g http "${pkgdir}/var/lib/${pkgname}"
  mv acme_srv examples tools "${pkgdir}/var/lib/${pkgname}/"
  install -dm755 -o http -g http "${pkgdir}/var/lib/${pkgname}/acme_srv/ca"
  install -Dm644 -t "${pkgdir}/var/lib/${pkgname}/examples/" "${srcdir}/ssl.conf"
  chown -R http:http "${pkgdir}/var/lib/${pkgname}"
  install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" docs/*
}