summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTids2017-11-12 22:23:41 +0100
committerTids2017-11-12 22:23:41 +0100
commit6b7089fca67ef0e1caa629a613a65f0259faad1e (patch)
tree9a97500ba2423d98f644f0d3834a9db2f53da478
downloadaur-blacklist_pcspkr.tar.gz
initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD25
-rw-r--r--blacklist_pcspkr.conf3
-rw-r--r--blacklist_pcspkr.hook10
-rw-r--r--blacklist_pcspkr.install15
5 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dff0d3825ed9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = blacklist_pcspkr
+ pkgdesc = Disables the pcspkr completely
+ pkgver = 1
+ pkgrel = 1
+ install = blacklist_pcspkr.install
+ arch = any
+ license = GPL3
+ source = blacklist_pcspkr.hook
+ source = blacklist_pcspkr.conf
+ source = blacklist_pcspkr.install
+ sha512sums = 06e650611a64016f6f4db20ecb73e630d9baaf8df6035a4fe75d13d9024e307847c5473f2d2913f2052207e163f24e480979994567842ca361398a5656759341
+ sha512sums = 64db688ca3d30cb8a311dab26c291c4b4cb6dc52f4c4da318d051a3a89be95331217ba0d846ab06e3d124c36d2d486e81a212da0eb20067aa81fae571212b087
+ sha512sums = 9fbd730a6541d31d36128906a9eb66204e7bd12b2f5e70d170ab1ec2005e3ab8519cf1834dbfe95adcffe1df98405561b59030e43f5c84144ee1c195b1fa41f0
+
+pkgname = blacklist_pcspkr
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e8c42d4ac442
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,25 @@
+# Maintainer: Fabian Bornschein <plusfabi@gmail.com>
+pkgname=blacklist_pcspkr
+pkgdesc="Disables the pcspkr completely"
+install="blacklist_pcspkr.install"
+pkgver=1
+pkgrel=1
+arch=('any')
+license=('GPL3')
+source=('blacklist_pcspkr.hook'
+ 'blacklist_pcspkr.conf'
+ 'blacklist_pcspkr.install')
+sha512sums=('06e650611a64016f6f4db20ecb73e630d9baaf8df6035a4fe75d13d9024e307847c5473f2d2913f2052207e163f24e480979994567842ca361398a5656759341'
+ '64db688ca3d30cb8a311dab26c291c4b4cb6dc52f4c4da318d051a3a89be95331217ba0d846ab06e3d124c36d2d486e81a212da0eb20067aa81fae571212b087'
+ '9fbd730a6541d31d36128906a9eb66204e7bd12b2f5e70d170ab1ec2005e3ab8519cf1834dbfe95adcffe1df98405561b59030e43f5c84144ee1c195b1fa41f0')
+
+package()
+{
+ cd "${srcdir}"
+
+ install -D -m644 "${srcdir}/blacklist_pcspkr.conf" \
+ "${pkgdir}/usr/lib/modprobe.d/blacklist_pcspkr.conf"
+
+ install -D -m644 "${srcdir}/blacklist_pcspkr.hook" \
+ "${pkgdir}/usr/share/libalpm/hooks/98-blacklist_pcspkr.hook"
+}
diff --git a/blacklist_pcspkr.conf b/blacklist_pcspkr.conf
new file mode 100644
index 000000000000..8add621aa8ec
--- /dev/null
+++ b/blacklist_pcspkr.conf
@@ -0,0 +1,3 @@
+# This file is Part of the blacklist pcspkr package
+# DO NOT EDIT OR REMOVE
+blacklist pcspkr
diff --git a/blacklist_pcspkr.hook b/blacklist_pcspkr.hook
new file mode 100644
index 000000000000..a4e10b38658c
--- /dev/null
+++ b/blacklist_pcspkr.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = usr/lib/modprobe.d/blacklist_pcspkr.conf
+
+[Action]
+Description = Updating all initcpios disable pcspkr
+When = PostTransaction
+Exec = /usr/bin/mkinitcpio -P
diff --git a/blacklist_pcspkr.install b/blacklist_pcspkr.install
new file mode 100644
index 000000000000..c141e85bf1d1
--- /dev/null
+++ b/blacklist_pcspkr.install
@@ -0,0 +1,15 @@
+post_install()
+{
+ if grep -q -i "pcspkr" /proc/modules
+ then
+ rmmod pcspkr
+ fi
+}
+
+pre_remove()
+{
+ if ! grep -q -i "pcspkr" /proc/modules
+ then
+ modprobe pcspkr
+ fi
+}