summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild4
-rw-r--r--pciids-full.pkg/postinst6
-rw-r--r--pciids-full.pkg/prerm5
-rw-r--r--pciids-reduced.pkg/postinst6
-rw-r--r--pciids-reduced.pkg/prerm5
5 files changed, 24 insertions, 2 deletions
diff --git a/build b/build
index 8605614..5f55422 100755
--- a/build
+++ b/build
@@ -10,6 +10,6 @@ install:
install -d -o 0 -g 0 -m 0755 pciids-full.data/usr/share/misc/
install -d -o 0 -g 0 -m 0755 pciids-reduced.data/usr/share/misc/
sed '/^#/d; /^[ \t]*$$/d;' src/pci.ids | gzip -9cn \
- >pciids-full.data/usr/share/misc/pci.ids.gz
+ >pciids-full.data/usr/share/misc/pci.ids.full.gz
sed '/^#/d; /^[ \t]*$$/d; /^\t\t/d;' src/pci.ids | gzip -9cn \
- >pciids-reduced.data/usr/share/misc/pci.ids.gz
+ >pciids-reduced.data/usr/share/misc/pci.ids.reduced.gz
diff --git a/pciids-full.pkg/postinst b/pciids-full.pkg/postinst
new file mode 100644
index 0000000..c4d992f
--- /dev/null
+++ b/pciids-full.pkg/postinst
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xconfigure' ]; then
+ update-alternatives --install /usr/share/misc/pci.ids.gz pci.ids \
+ /usr/share/misc/pci.ids.full.gz 20
+fi
diff --git a/pciids-full.pkg/prerm b/pciids-full.pkg/prerm
new file mode 100644
index 0000000..fcbaf91
--- /dev/null
+++ b/pciids-full.pkg/prerm
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xremove' ]; then
+ update-alternatives --remove pci.ids /usr/share/misc/pci.ids.full.gz
+fi
diff --git a/pciids-reduced.pkg/postinst b/pciids-reduced.pkg/postinst
new file mode 100644
index 0000000..14a6298
--- /dev/null
+++ b/pciids-reduced.pkg/postinst
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xconfigure' ]; then
+ update-alternatives --install /usr/share/misc/pci.ids.gz pci.ids \
+ /usr/share/misc/pci.ids.reduced.gz 10
+fi
diff --git a/pciids-reduced.pkg/prerm b/pciids-reduced.pkg/prerm
new file mode 100644
index 0000000..9d8f883
--- /dev/null
+++ b/pciids-reduced.pkg/prerm
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xremove' ]; then
+ update-alternatives --remove pci.ids /usr/share/misc/pci.ids.reduced.gz
+fi