2021-01-02 02:35:44 +00:00
|
|
|
# Contributor: Alex Denes <caskd@redxen.eu>
|
|
|
|
# Maintainer: Alex Denes <caskd@redxen.eu>
|
|
|
|
pkgname=redxen-secret-letsencrypt
|
|
|
|
pkgver=2020.12.18
|
2021-01-05 02:02:36 +00:00
|
|
|
pkgrel=4
|
2021-01-02 02:35:44 +00:00
|
|
|
pkgdesc="LetsEncrypt keys"
|
|
|
|
url="https://git.redxen.eu/RedXen"
|
|
|
|
arch="noarch"
|
|
|
|
license="none"
|
2021-01-05 02:02:36 +00:00
|
|
|
subpackages="$pkgname-private $pkgname-public $pkgname-full $pkgname-ca $pkgname-chain"
|
2021-01-02 02:35:44 +00:00
|
|
|
source="
|
|
|
|
private.key
|
|
|
|
public.pem
|
|
|
|
ca.pem
|
|
|
|
"
|
|
|
|
checkdepends="openssl"
|
2021-01-05 02:02:36 +00:00
|
|
|
install="$pkgname-private.pre-install $pkgname-full.pre-install"
|
2021-01-02 02:35:44 +00:00
|
|
|
builddir="$srcdir"
|
|
|
|
|
|
|
|
build() {
|
2021-01-05 02:02:36 +00:00
|
|
|
cat public.pem ca.pem > chain.crt
|
|
|
|
cat chain.crt private.key > full.crt
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
2021-01-05 02:02:36 +00:00
|
|
|
install -Dm640 -g 3005 "$srcdir"/private.key "$subpkgdir"/etc/ssl/redxen/letsencrypt/private.key
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
2021-01-05 02:02:36 +00:00
|
|
|
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
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public() {
|
|
|
|
pkgdesc="Public key"
|
2021-01-05 02:02:36 +00:00
|
|
|
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
|
2021-01-02 02:35:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="11d85953a19bbc4ccea99370d0c7bc1fea78398173602b2b0b4b393704887d9686705456c2b1c8857242c1ced6efe0dd3aca1b202ba5d72549185bd4d1a5feaf private.key
|
|
|
|
c215e38eb78e359f9a27170c936af9b6fb0b04344e5202aaf6128d178e665d3643dfb27fd57ad9cda30351769e43c7b1ce2189a87bf804ab3a90d3808dc8f954 public.pem
|
|
|
|
0fa893f751f0880c7d89c398cae9708f5ff04d466832fb6160a824395032259ac52e02a44da531d0f8bf7e310298b0067b1e8257f816d3223034f391ecba491d ca.pem"
|