33 lines
718 B
Plaintext
33 lines
718 B
Plaintext
# Contributor: Alex Denes <caskd@redxen.eu>
|
|
# Maintainer: Alex Denes <caskd@redxen.eu>
|
|
|
|
. ../APKBUILD-secret.template
|
|
|
|
pkgver="$pkgver.01"
|
|
pkgrel=0
|
|
makedepends="openssl"
|
|
subpackages="$pkgname-private $pkgname-public $pkgname-fullchain"
|
|
|
|
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 "$(rx_cpkgdir)"
|
|
}
|
|
|
|
private() {
|
|
pkgdesc="Private key"
|
|
rx_install private.key
|
|
}
|
|
fullchain() {
|
|
pkgdesc="Full chain of certificates (public and private)"
|
|
rx_install fullchain.crt
|
|
}
|
|
public() {
|
|
pkgdesc="Public key"
|
|
rx_install public.pem
|
|
}
|