# Contributor: Alex Denes # Maintainer: Alex Denes pkgname=redxen-secret-letsencrypt pkgver=2020.12.18 pkgrel=4 pkgdesc="LetsEncrypt keys" url="https://git.redxen.eu/RedXen" arch="noarch" license="none" subpackages="$pkgname-private $pkgname-public $pkgname-full $pkgname-ca $pkgname-chain" source=" private.key public.pem ca.pem " checkdepends="openssl" install="$pkgname-private.pre-install $pkgname-full.pre-install" builddir="$srcdir" build() { cat public.pem ca.pem > chain.crt cat chain.crt private.key > full.crt } package() { mkdir -p $pkgdir } check() { openssl x509 -in public.pem -noout -checkend 0 >/dev/null && return error "You have provided a expired certificate!" return 1 } private() { pkgdesc="Private key" install -Dm640 -g 3005 "$srcdir"/private.key "$subpkgdir"/etc/ssl/redxen/letsencrypt/private.key } full() { pkgdesc="Complete certificate chain" install -Dm640 -g 3005 "$builddir"/full.crt "$subpkgdir"/etc/ssl/redxen/letsencrypt/full.crt } chain() { pkgdesc="Complete public certificate chain" install -Dm640 -g 3005 "$builddir"/chain.crt "$subpkgdir"/etc/ssl/redxen/letsencrypt/chain.crt } public() { pkgdesc="Public key" install -Dm644 -g 3005 "$srcdir"/public.pem "$subpkgdir"/etc/ssl/redxen/letsencrypt/public.pem } ca() { pkgdesc="Certificate authority" install -Dm644 -g 3005 "$srcdir"/ca.pem "$subpkgdir"/etc/ssl/redxen/letsencrypt/ca.pem } sha512sums="11d85953a19bbc4ccea99370d0c7bc1fea78398173602b2b0b4b393704887d9686705456c2b1c8857242c1ced6efe0dd3aca1b202ba5d72549185bd4d1a5feaf private.key c215e38eb78e359f9a27170c936af9b6fb0b04344e5202aaf6128d178e665d3643dfb27fd57ad9cda30351769e43c7b1ce2189a87bf804ab3a90d3808dc8f954 public.pem 0fa893f751f0880c7d89c398cae9708f5ff04d466832fb6160a824395032259ac52e02a44da531d0f8bf7e310298b0067b1e8257f816d3223034f391ecba491d ca.pem"