From 4bb386b04115ca251333a34a944beccc08c4d0e4 Mon Sep 17 00:00:00 2001 From: Titouan Rigoudy Date: Sun, 12 Apr 2015 17:14:20 -0400 Subject: [PATCH] Removed useless src directory --- Makefile | 21 +++++------ src/init-headphone => init-headphone | 0 ...eadphone.modules => init-headphone.modules | 0 ...eadphone.service => init-headphone.service | 0 init-headphone.spec | 35 +++++++++++++++++++ src/Makefile | 7 ---- 6 files changed, 44 insertions(+), 19 deletions(-) rename src/init-headphone => init-headphone (100%) rename src/init-headphone.modules => init-headphone.modules (100%) rename src/init-headphone.service => init-headphone.service (100%) create mode 100644 init-headphone.spec delete mode 100644 src/Makefile diff --git a/Makefile b/Makefile index ed57d0c..bc1c9b8 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,12 @@ -PROG=init-headphone -VERSION=0.2.0 -SRCDIR=src -TARBALL=${PROG}-${VERSION}.tar.gz +SBINDIR=usr/sbin +SYSCONFIGDIR=etc +LIBDIR=usr/lib -all: pkg +all: -pkg: ${TARBALL} - -${TARBALL}: ${SRCDIR}/* - tar -czf $@ $^ - -clean: - rm -rf ${TARBALL} +install: + install -Dm 755 init-headphone ${DESTDIR}/${SBINDIR}/init-headphone + install -Dm 755 init-headphone.modules ${DESTDIR}/${SYSCONFIGDIR}/sysconfig/modules/init-headphone.modules + install -Dm 755 init-headphone.service ${DESTDIR}/${LIBDIR}/systemd/system/init-headphone.service + systemctl enable init-headphone diff --git a/src/init-headphone b/init-headphone similarity index 100% rename from src/init-headphone rename to init-headphone diff --git a/src/init-headphone.modules b/init-headphone.modules similarity index 100% rename from src/init-headphone.modules rename to init-headphone.modules diff --git a/src/init-headphone.service b/init-headphone.service similarity index 100% rename from src/init-headphone.service rename to init-headphone.service diff --git a/init-headphone.spec b/init-headphone.spec new file mode 100644 index 0000000..f38eb92 --- /dev/null +++ b/init-headphone.spec @@ -0,0 +1,35 @@ +Name: init-headphone +Version: 0.2.0 +Release: 1%{?dist} +Summary: Reactivates the headphone jack on Clevo W230SS after suspend + +License: GPLv2 +URL: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1313904/ +Source0: https://github.com/letitz/%{name}/archive/master.tar.gz + +BuildArch: noarch + +Requires: i2c-tools-python + +%description +This script fixes a bug in Clevo W230SS-based laptops where the headphone jack +would not work anymore after a resume from suspend. + +%prep +%setup -qn %{name}-master + + +%build + + + +%install +make install DESTDIR=%{buildroot} + +%files +%{_sbindir}/init-headphone +%{_sysconfdir}/sysconfig/modules/init-headphone.modules +%{_libdir}/systemd/system/init-headphone.service + +%changelog + diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 654969b..0000000 --- a/src/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all: - -install: - install -Dm 755 init-headphone ${DESTDIR}/usr/sbin/init-headphone - install -Dm 755 init-headphone.modules ${DESTDIR}/etc/sysconfig/modules/init-headphone.modules - install -Dm 755 init-headphone.service ${DESTDIR}/usr/lib/systemd/system/init-headphone.service -