diff options
author | Sergey Slipchenko | 2017-09-28 20:58:29 +0300 |
---|---|---|
committer | Sergey Slipchenko | 2017-09-28 20:58:29 +0300 |
commit | 7fc3d73ff6c349156b4a5236b23ff6d824bef505 (patch) | |
tree | a90cb0a48ffc88922663e3d2a2dc68d588b8422a | |
parent | 1f5b774ff4b8e4d656bc478131e131c4de6755c2 (diff) | |
download | aur-7fc3d73ff6c349156b4a5236b23ff6d824bef505.tar.gz |
Install systemd service file properly
-rw-r--r-- | 01-makefile-do-not-install-service.patch | 41 | ||||
-rw-r--r-- | PKGBUILD | 4 |
2 files changed, 44 insertions, 1 deletions
diff --git a/01-makefile-do-not-install-service.patch b/01-makefile-do-not-install-service.patch new file mode 100644 index 000000000000..6401a893b76d --- /dev/null +++ b/01-makefile-do-not-install-service.patch @@ -0,0 +1,41 @@ +diff --git a/Makefile.am b/Makefile.am +index c5d4b76..41b505f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,36 +6,3 @@ EXTRA_DIST = pi-blaster.service + + sbin_PROGRAMS = pi-blaster + pi_blaster_SOURCES = pi-blaster.c mailbox.c +- +-if !DEBIAN_PKG +-if HAVE_SYSTEMD +-systemdsystemunit_DATA = pi-blaster.service +- +-# Unless we are cross-compiling, start now. +-if !CROSS_COMPILING +-install-data-hook: +- systemctl enable pi-blaster +- systemctl start pi-blaster +- +-uninstall-hook: +- systemctl stop pi-blaster +- systemctl disable pi-blaster +-endif # !CROSS_COMPILING +- +-else +-init_ddir = $(sysconfdir)/init.d +-init_d_SCRIPTS = pi-blaster.boot.sh +- +-# Unless we are cross-compiling, start now. +-if !CROSS_COMPILING +-install-data-hook: +- update-rc.d pi-blaster.boot.sh defaults +- $(init_ddir)/pi-blaster.boot.sh start +- +-uninstall-hook: +- update-rc.d pi-blaster.boot.sh remove +- killall pi-blaster +-endif # !CROSS_COMPILING +- +-endif # !HAVE_SYSTEMD +-endif # !DEBIAN_PKG @@ -2,7 +2,7 @@ pkgname=pi-blaster-git _gitname=${pkgname%-*} -pkgver=20150610.r130.2cd6659 +pkgver=20170925.r203.1035ad7 pkgrel=1 pkgdesc="Daemon for Raspberry Pi which provides an interface to drive multiple PWM via the GPIO pins" @@ -24,6 +24,7 @@ pkgver() { prepare() { cd "$_gitname" + patch -Np1 -i ../../01-makefile-do-not-install-service.patch ./autogen.sh } @@ -36,4 +37,5 @@ build() { package() { cd "$_gitname" make DESTDIR="$pkgdir/" install + install -Dm0644 pi-blaster.service $pkgdir/usr/lib/systemd/system/pi-blaster.service } |