From ed33b1429a02c7671dcb8c0939294d1d2d684a29 Mon Sep 17 00:00:00 2001 From: ektor5 Date: Wed, 1 Apr 2015 22:16:17 +0200 Subject: [PATCH] Initial commit --- PKGBUILD | 43 ++++++++++++++++++++++++++++++++++++++++++ init-headphone.install | 12 ++++++++++++ init-headphone.service | 11 +++++++++++ 3 files changed, 66 insertions(+) create mode 100644 PKGBUILD create mode 100644 init-headphone.install create mode 100644 init-headphone.service diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..965f6ac --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Ettore Chimenti +pkgname="init-headphone" +pkgver="0.2.0" +pkgrel=1 +epoch= +pkgdesc="Re-enables headphone jack after sleep/suspend resume on VIA VT1802" +arch=("any") +url="https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1313904/" +license=('GPL') +groups=() +depends=("dmidecode" "python2-smbus" "python") +makedepends=() +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install=init-headphone.install +changelog= +source=("https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1313904/+attachment/4361090/+files/${pkgname}_${pkgver}_all.deb" + "init-headphone.service" + "init-headphone.install" + ) +noextract=() +md5sums=('37c830340c4ca077271a04b4436ea8fc' + '8eaf6ff36bfe0927aec5677cb17fbbcc' + 'a47855a948f9684ea69db75f2cdd7398') +validpgpkeys=() + +package() { + + tar -xf data.tar.xz -C $pkgdir + + mv $pkgdir/usr/{s,}bin + rm -r $pkgdir/etc/init + + mkdir -p $pkgdir/etc/systemd/system + cp init-headphone.service $pkgdir/etc/systemd/system +} + + diff --git a/init-headphone.install b/init-headphone.install new file mode 100644 index 0000000..a7a770a --- /dev/null +++ b/init-headphone.install @@ -0,0 +1,12 @@ +post_install() { + echo ">>> Please enable the service unit via 'systemctl enable init-headphone.service' " + echo ">>> Also add 'acpi_enforce_resources=lax' to kernel bootargs and reboot" +} +post_upgrade() { + post_install +} + +post_remove() { + post_install +} + diff --git a/init-headphone.service b/init-headphone.service new file mode 100644 index 0000000..a4fe290 --- /dev/null +++ b/init-headphone.service @@ -0,0 +1,11 @@ +[Unit] +Description=Reactivate headphones after sleep +After=sleep.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/init-headphone + +[Install] +WantedBy=sleep.target +