void-packages/srcpkgs/mkinitcpio/template
Đoàn Trần Công Danh f4ae50fbbb mkinitcpio: remove noarch
2020-11-29 11:30:26 +07:00

76 lines
2.5 KiB
Bash

# Template file for 'mkinitcpio'
pkgname=mkinitcpio
version=28
revision=2
build_style=gnu-makefile
depends="busybox-static bsdtar bash"
short_desc="Next generation of initramfs creation"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-2.0-only"
homepage="https://wiki.archlinux.org/index.php/Mkinitcpio"
distfiles="https://sources.archlinux.org/other/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=bf83a158786d272d8046a4dd48bfcc343ec37de2cae0ae65c59132a45744808c
conf_files="/etc/mkinitcpio.conf"
patch_args="-Np1"
post_install() {
rm -rf ${DESTDIR}/usr/lib/kernel
rm -rf ${DESTDIR}/usr/lib/systemd
rm -rf ${DESTDIR}/usr/lib/initcpio/install/sd*
rm -rf ${DESTDIR}/usr/lib/tmpfiles.d
ln -s /usr/bin/busybox.static $DESTDIR/usr/lib/initcpio/busybox
vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-mkinitcpio
vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-mkinitcpio
}
mkinitcpio-udev_package() {
depends="${sourcepkg}>=${version}_${revision} eudev"
short_desc+=" - udev support"
pkg_install() {
vinstall ${FILESDIR}/udev_hook 644 usr/lib/initcpio/hooks udev
vinstall ${FILESDIR}/udev_install 644 usr/lib/initcpio/install udev
}
}
mkinitcpio-lvm2_package() {
depends="${sourcepkg}>=${version}_${revision} lvm2 thin-provisioning-tools"
short_desc+=" - lvm2 support"
pkg_install() {
vinstall ${FILESDIR}/lvm2_hook 644 usr/lib/initcpio/hooks lvm2
vinstall ${FILESDIR}/lvm2_install 644 usr/lib/initcpio/install lvm2
for RULES in ${FILESDIR}/*.rules; do
vinstall $RULES 644 usr/lib/initcpio/udev $(basename $RULES)
done
}
}
mkinitcpio-encrypt_package() {
depends="${sourcepkg}>=${version}_${revision}
${sourcepkg}-lvm2>=${version}_${revision} cryptsetup"
short_desc+=" - encrypt support"
pkg_install() {
vinstall ${FILESDIR}/encrypt_hook 644 usr/lib/initcpio/hooks encrypt
vinstall ${FILESDIR}/encrypt_install 644 usr/lib/initcpio/install encrypt
}
}
mkinitcpio-mdadm_package() {
depends="${sourcepkg}>=${version}_${revision} mdadm"
short_desc+=" - mdadm support"
pkg_install() {
vinstall ${FILESDIR}/mdadm_hook 644 usr/lib/initcpio/hooks mdadm
vinstall ${FILESDIR}/mdadm_install 644 usr/lib/initcpio/install mdadm
vinstall ${FILESDIR}/mdadm_udev_install 644 usr/lib/initcpio/install mdadm_udev
}
}
mkinitcpio-xbps_package() {
depends="${sourcepkg}>=${version}_${revision} xbps"
short_desc+=" - xbps support"
pkg_install() {
vinstall ${FILESDIR}/xbps_install 644 usr/lib/initcpio/install xbps
}
}