2021-01-02 02:35:44 +00:00
|
|
|
# Contributor: Alex Denes <caskd@redxen.eu>
|
|
|
|
# Maintainer: Alex Denes <caskd@redxen.eu>
|
|
|
|
pkgname=redxen-secret-selfsigned
|
2021-01-12 23:37:34 +00:00
|
|
|
pkgver=2021.01.13
|
|
|
|
pkgrel=0
|
2021-01-02 02:35:44 +00:00
|
|
|
pkgdesc="Self-signed keys"
|
|
|
|
url="https://git.redxen.eu/RedXen"
|
|
|
|
arch="noarch"
|
|
|
|
license="none"
|
|
|
|
options="!check"
|
|
|
|
makedepends="openssl"
|
|
|
|
subpackages="$pkgname-private $pkgname-public $pkgname-fullchain"
|
|
|
|
install="$pkgname-private.pre-install $pkgname-fullchain.pre-install"
|
|
|
|
builddir="$srcdir"
|
|
|
|
|
|
|
|
build() {
|
|
|
|
openssl genrsa -out private.key 4096
|
|
|
|
openssl req -new -key private.key -days 365 -out public.pem -x509 -subj '/C=DE/ST=Bavaria/L=Nurnberg/O=RedXen/CN=redxen.eu'
|
|
|
|
cat public.pem private.key > fullchain.crt
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
mkdir -p $pkgdir
|
|
|
|
}
|
|
|
|
|
|
|
|
private() {
|
|
|
|
pkgdesc="Private key"
|
|
|
|
install -Dm440 -g 3000 "$builddir"/private.key "$subpkgdir"/etc/ssl/redxen/selfsigned/private.key
|
|
|
|
}
|
|
|
|
fullchain() {
|
|
|
|
pkgdesc="Full chain of certificates (public and private)"
|
|
|
|
install -Dm440 -g 3000 "$builddir"/fullchain.crt "$subpkgdir"/etc/ssl/redxen/selfsigned/fullchain.crt
|
|
|
|
}
|
|
|
|
public() {
|
|
|
|
pkgdesc="Public key"
|
|
|
|
install -Dm444 -g 3000 "$builddir"/public.pem "$subpkgdir"/etc/ssl/redxen/selfsigned/public.pem
|
|
|
|
}
|