From 45ce5cff7cbdc689fe46fb227bb794fa1253ba7e Mon Sep 17 00:00:00 2001
From: Frank Steinborn <steinex@nognu.de>
Date: Fri, 7 Jun 2019 22:14:27 +0200
Subject: [PATCH] linux-firmware: add initramfs triggers

---
 srcpkgs/linux-firmware/linux-firmware-amd.INSTALL     | 7 +++++++
 srcpkgs/linux-firmware/linux-firmware-amd.REMOVE      | 7 +++++++
 srcpkgs/linux-firmware/linux-firmware-intel.INSTALL   | 1 +
 srcpkgs/linux-firmware/linux-firmware-intel.REMOVE    | 1 +
 srcpkgs/linux-firmware/linux-firmware-network.INSTALL | 1 +
 srcpkgs/linux-firmware/linux-firmware-network.REMOVE  | 1 +
 srcpkgs/linux-firmware/linux-firmware-nvidia.INSTALL  | 1 +
 srcpkgs/linux-firmware/linux-firmware-nvidia.REMOVE   | 1 +
 srcpkgs/linux-firmware/template                       | 2 +-
 9 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/linux-firmware/linux-firmware-amd.INSTALL
 create mode 100644 srcpkgs/linux-firmware/linux-firmware-amd.REMOVE
 create mode 120000 srcpkgs/linux-firmware/linux-firmware-intel.INSTALL
 create mode 120000 srcpkgs/linux-firmware/linux-firmware-intel.REMOVE
 create mode 120000 srcpkgs/linux-firmware/linux-firmware-network.INSTALL
 create mode 120000 srcpkgs/linux-firmware/linux-firmware-network.REMOVE
 create mode 120000 srcpkgs/linux-firmware/linux-firmware-nvidia.INSTALL
 create mode 120000 srcpkgs/linux-firmware/linux-firmware-nvidia.REMOVE

diff --git a/srcpkgs/linux-firmware/linux-firmware-amd.INSTALL b/srcpkgs/linux-firmware/linux-firmware-amd.INSTALL
new file mode 100644
index 00000000000..6b065bedb4a
--- /dev/null
+++ b/srcpkgs/linux-firmware/linux-firmware-amd.INSTALL
@@ -0,0 +1,7 @@
+# Regenerate initramfs.
+case ${ACTION} in
+post)
+	echo "Regenerating initramfs, please wait..."
+	dracut -f -q --regenerate-all
+	;;
+esac
diff --git a/srcpkgs/linux-firmware/linux-firmware-amd.REMOVE b/srcpkgs/linux-firmware/linux-firmware-amd.REMOVE
new file mode 100644
index 00000000000..e4d494ca015
--- /dev/null
+++ b/srcpkgs/linux-firmware/linux-firmware-amd.REMOVE
@@ -0,0 +1,7 @@
+# Regenerate initramfs.
+case ${ACTION} in
+purge)
+	echo "Regenerating initramfs, please wait..."
+	dracut -f -q --regenerate-all
+	;;
+esac
diff --git a/srcpkgs/linux-firmware/linux-firmware-intel.INSTALL b/srcpkgs/linux-firmware/linux-firmware-intel.INSTALL
new file mode 120000
index 00000000000..2495de61aa3
--- /dev/null
+++ b/srcpkgs/linux-firmware/linux-firmware-intel.INSTALL
@@ -0,0 +1 @@
+linux-firmware-amd.INSTALL
\ No newline at end of file
diff --git a/srcpkgs/linux-firmware/linux-firmware-intel.REMOVE b/srcpkgs/linux-firmware/linux-firmware-intel.REMOVE
new file mode 120000
index 00000000000..88d38152c46
--- /dev/null
+++ b/srcpkgs/linux-firmware/linux-firmware-intel.REMOVE
@@ -0,0 +1 @@
+linux-firmware-amd.REMOVE
\ No newline at end of file
diff --git a/srcpkgs/linux-firmware/linux-firmware-network.INSTALL b/srcpkgs/linux-firmware/linux-firmware-network.INSTALL
new file mode 120000
index 00000000000..2495de61aa3
--- /dev/null
+++ b/srcpkgs/linux-firmware/linux-firmware-network.INSTALL
@@ -0,0 +1 @@
+linux-firmware-amd.INSTALL
\ No newline at end of file
diff --git a/srcpkgs/linux-firmware/linux-firmware-network.REMOVE b/srcpkgs/linux-firmware/linux-firmware-network.REMOVE
new file mode 120000
index 00000000000..88d38152c46
--- /dev/null
+++ b/srcpkgs/linux-firmware/linux-firmware-network.REMOVE
@@ -0,0 +1 @@
+linux-firmware-amd.REMOVE
\ No newline at end of file
diff --git a/srcpkgs/linux-firmware/linux-firmware-nvidia.INSTALL b/srcpkgs/linux-firmware/linux-firmware-nvidia.INSTALL
new file mode 120000
index 00000000000..2495de61aa3
--- /dev/null
+++ b/srcpkgs/linux-firmware/linux-firmware-nvidia.INSTALL
@@ -0,0 +1 @@
+linux-firmware-amd.INSTALL
\ No newline at end of file
diff --git a/srcpkgs/linux-firmware/linux-firmware-nvidia.REMOVE b/srcpkgs/linux-firmware/linux-firmware-nvidia.REMOVE
new file mode 120000
index 00000000000..88d38152c46
--- /dev/null
+++ b/srcpkgs/linux-firmware/linux-firmware-nvidia.REMOVE
@@ -0,0 +1 @@
+linux-firmware-amd.REMOVE
\ No newline at end of file
diff --git a/srcpkgs/linux-firmware/template b/srcpkgs/linux-firmware/template
index 65cc75569cb..d2b5c59bc2c 100644
--- a/srcpkgs/linux-firmware/template
+++ b/srcpkgs/linux-firmware/template
@@ -1,7 +1,7 @@
 # Template file for 'linux-firmware'
 pkgname=linux-firmware
 version=20190514
-revision=1
+revision=2
 _githash=711d3297bac870af42088a467459a0634c1970ca
 archs=noarch
 wrksrc="${pkgname}-${_githash}"
