2021-01-02 02:35:44 +00:00
|
|
|
# Contributor: Alex Denes <caskd@redxen.eu>
|
|
|
|
# Maintainer: Alex Denes <caskd@redxen.eu>
|
|
|
|
pkgname=redxen-secret-letsencrypt
|
2021-02-05 21:38:02 +00:00
|
|
|
pkgver=2021.02.05
|
2021-02-05 23:09:24 +00:00
|
|
|
pkgrel=1
|
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
|
2021-02-05 21:38:02 +00:00
|
|
|
84c69314788d2972d7b064c3fe666474b777333d660327f34404c598e5849989e659137adfec9d1e65eaa1c3fe9a161dbefd1e4c40e40ef9855dd142ba576ca2 public.pem
|
2021-02-05 23:09:24 +00:00
|
|
|
aca83fbc7ecf8c225c1145aec21cf70fb1ecd5b37c983e81e313436f0d7f4d1dcb7b89edd2293cb4a648f13b3042438be28d712145f7cc5896c0ff6e0ffc8db9 ca.pem"
|