Skip to content

Split installation into a two step process.

Ádám Maróti requested to merge 05storm26/mkinitcpio:separate-hooks into master

Now you can install mkinitcpio separatly from its pacman hooks.

As an alternative to merging !190 (closed), we could split the pacman hooks from this package into a separate package and allow a kernel-install pacman-hooks package to easly replace that.

The suggested change to the PKGBUILD corresponding to this change would be this:

diff --git a/PKGBUILD b/PKGBUILD
index 3e96ceb..4968d60 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,8 @@
 # Contributor: Dave Reisner <dreisner@archlinux.org>
 # Contributor: Thomas Bächler <thomas@archlinux.org>
 
-pkgname=mkinitcpio
+pkgbase=mkinitcpio
+pkgname=("mkinitcpio-generator" "pacman-mkinitcpio-hook")
 pkgver=35.2
 pkgrel=1
 pkgdesc="Modular initramfs image creation utility"
@@ -19,9 +20,11 @@ optdepends=('gzip: Use gzip compression for the initramfs image'
             'lzop: Use lzo compression for the initramfs image'
             'lz4: Use lz4 compression for the initramfs image'
             'mkinitcpio-nfs-utils: Support for root filesystem on NFS')
-provides=('initramfs')
+provides_mkinitcpio-generator=('initramfs')
+provides_pacman-mkinitcpio-hooks=('pacman-kernel-deploy-hook')
+replaces=('mkinitpcio')
 backup=('etc/mkinitcpio.conf')
-source=("https://sources.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig})
+source=("https://sources.archlinux.org/other/$pkgbase/$pkgbase-$pkgver.tar.gz"{,.sig})
 install=mkinitcpio.install
 sha512sums=('9ca8544bc5de3d215bf94ecf9a3bfb9265c9ed9871357af4b597a37e94c6951935641c11558470aaa934e8fbe9bc1f875dfa9d0fe8734a97f90154c9cbabfdba'
             'SKIP')
@@ -31,9 +34,13 @@ validpgpkeys=('ECCAC84C1BA08A6CC8E63FBBF22FB1D78A77AEAB'    # Giancarlo Razzolin
               'C100346676634E80C940FB9E9C02FF419FECBE16')   # Morten Linderud
 
 check() {
-  make -C "$pkgname-$pkgver" check
+  make -C "$pkgbase-$pkgver" check
 }
 
-package() {
-  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+package_mkinitcpio-generator() {
+  make -C "$pkgbase-$pkgver" DESTDIR="$pkgdir" install
+}
+
+package_pacman-mkinitcpio-hook() {
+  make -C "$pkgbase-$pkgver" DESTDIR="$pkgdir" install-hooks
 }
Edited by Ádám Maróti

Merge request reports

Loading