# Template file for 'mkinitcpio-encryptssh'
pkgname=mkinitcpio-encryptssh
version=0.16
revision=3
_version_suffix=1
wrksrc="dropbear_initrd_encrypt-${version}-${_version_suffix}"
depends="mkinitcpio cryptsetup dropbear mkinitcpio-nfs-utils psmisc iproute2"
short_desc="Allows for an encrypted root device to be unlocked remotely over SSH"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="BSD-3-Clause"
homepage="https://github.com/grazzolini/dropbear_initrd_encrypt"
# This package is splited into 3 repositories upstream.
distfiles="https://github.com/grazzolini/dropbear_initrd_encrypt/archive/v${version}-${_version_suffix}.tar.gz
 https://raw.githubusercontent.com/grazzolini/mkinitcpio-dropbear/d944b72807725ac219877359de17097ef38b70ef/LICENSE"
checksum="6b24ea3d6e1ee55d304ca31707fe17c545f7ea843a13b764e22475f838c41eae
 f07bbe0b6023321d75fde5ac5a3107a62f1f96f9384afaf28112dbf7a86975a8"
skip_extraction="LICENSE"

do_install() {
	vinstall dropbear_hook 644 usr/lib/initcpio/hooks dropbear
	vinstall dropbear_install 644 usr/lib/initcpio/install dropbear
	vinstall encryptssh_hook 644 usr/lib/initcpio/hooks encryptssh
	vinstall encryptssh_install 644 usr/lib/initcpio/install encryptssh
	vlicense $XBPS_SRCDISTDIR/$pkgname-$version/LICENSE
}
