diff --git a/PKGBUILD b/PKGBUILD index 4b9b141..4d3570e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgname='thinkpad-yoga-scripts-git' _gitname='thinkpad-yoga-scripts' pkgver=20150103 -pkgrel=1 +pkgrel=2 pkgdesc='A collection of scripts and systemd services for tablet functionality of the ThinkPad Yoga' url="https://github.com/admiralakber/thinkpad-yoga-scripts" source=('thinkpad-yoga-scripts::git+https://github.com/admiralakber/thinkpad-yoga-scripts') @@ -16,6 +16,8 @@ optdepends=( ) md5sums=('SKIP') makedepends=('git') +install=$pkgname.install + pkgver() { cd "$_gitname" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" diff --git a/systemd/yoga-tablet.service b/systemd/yoga-tablet.service index 1372536..bfc2b3a 100644 --- a/systemd/yoga-tablet.service +++ b/systemd/yoga-tablet.service @@ -8,6 +8,8 @@ ExecStart=/usr/bin/bash /opt/thinkpad-yoga-scripts/tablet/tablet-mode.sh KillMode=process Environment="DISPLAY=:0" Type=forking +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/thinkpad-yoga-scripts-git.install b/thinkpad-yoga-scripts-git.install new file mode 100644 index 0000000..0f3dc9a --- /dev/null +++ b/thinkpad-yoga-scripts-git.install @@ -0,0 +1,16 @@ +_note_services(){ + echo '(Re)start services now!' + echo '' + echo 'To enable starting of services at startup run:' + echo '----------------------------------------------' + echo 'systemctl enable wacom-proximity@.service' + echo 'systemctl enable yoga-rotate@.service' + echo 'systemctl enable yoga-tablet.service' + echo '' + echo 'Where is your login username' + +post_install(){ + _note_services + +post_upgrade(){ + _note_services \ No newline at end of file