From cb06f101a7ad4bb69628fbf649eeb8a922ac265d Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Thu, 8 Jan 2015 14:51:16 +0100 Subject: [PATCH] profile-sync-daemon: use build options for systemd, add runit service, use INSTALL.msg instead of INSTALL script --- srcpkgs/profile-sync-daemon/INSTALL | 11 ----------- srcpkgs/profile-sync-daemon/INSTALL.msg | 5 +++++ srcpkgs/profile-sync-daemon/REMOVE | 7 ------- srcpkgs/profile-sync-daemon/files/psd/finish | 3 +++ srcpkgs/profile-sync-daemon/files/psd/run | 4 ++++ srcpkgs/profile-sync-daemon/template | 12 +++++++++--- 6 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 srcpkgs/profile-sync-daemon/INSTALL create mode 100644 srcpkgs/profile-sync-daemon/INSTALL.msg delete mode 100644 srcpkgs/profile-sync-daemon/REMOVE create mode 100755 srcpkgs/profile-sync-daemon/files/psd/finish create mode 100755 srcpkgs/profile-sync-daemon/files/psd/run diff --git a/srcpkgs/profile-sync-daemon/INSTALL b/srcpkgs/profile-sync-daemon/INSTALL deleted file mode 100644 index 45b3966bec2..00000000000 --- a/srcpkgs/profile-sync-daemon/INSTALL +++ /dev/null @@ -1,11 +0,0 @@ -case "$ACTION" in - post) - if [ "$UPDATE" = "no" ]; then - echo '--> Define which users will make use of the sync in /etc/psd.conf' - echo '--> Read the manpage before use or see the wiki page' - echo '--> https://wiki.archlinux.org/index.php/Profile-sync-daemon' - echo - echo '--> ALWAYS backup your profile data before using utils like psd!' - fi - ;; -esac diff --git a/srcpkgs/profile-sync-daemon/INSTALL.msg b/srcpkgs/profile-sync-daemon/INSTALL.msg new file mode 100644 index 00000000000..a70e7297532 --- /dev/null +++ b/srcpkgs/profile-sync-daemon/INSTALL.msg @@ -0,0 +1,5 @@ +Define which users will make use of the sync in /etc/psd.conf +Read the manpage before use or see the wiki page +https://wiki.archlinux.org/index.php/Profile-sync-daemon + +ALWAYS backup your profile data before using utils like psd! diff --git a/srcpkgs/profile-sync-daemon/REMOVE b/srcpkgs/profile-sync-daemon/REMOVE deleted file mode 100644 index 32f9448f8f8..00000000000 --- a/srcpkgs/profile-sync-daemon/REMOVE +++ /dev/null @@ -1,7 +0,0 @@ -case "$ACTION" in - pre) - echo '--> Automatically stopping psd to rotate profiles back out of tmpfs.' - echo '--> Be sure you disable psd.service and psd-resync.service manually.' - systemctl stop psd.service - ;; -esac diff --git a/srcpkgs/profile-sync-daemon/files/psd/finish b/srcpkgs/profile-sync-daemon/files/psd/finish new file mode 100755 index 00000000000..c3d6bc911a3 --- /dev/null +++ b/srcpkgs/profile-sync-daemon/files/psd/finish @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +exec profile-sync-daemon unsync diff --git a/srcpkgs/profile-sync-daemon/files/psd/run b/srcpkgs/profile-sync-daemon/files/psd/run new file mode 100755 index 00000000000..c061fbeac2f --- /dev/null +++ b/srcpkgs/profile-sync-daemon/files/psd/run @@ -0,0 +1,4 @@ +#!/bin/sh +set -e +profile-sync-daemon sync +exec chpst -b profile-sync-daemon pause diff --git a/srcpkgs/profile-sync-daemon/template b/srcpkgs/profile-sync-daemon/template index 36c6a0e2fb1..5f431fa1c29 100644 --- a/srcpkgs/profile-sync-daemon/template +++ b/srcpkgs/profile-sync-daemon/template @@ -11,8 +11,14 @@ license="MIT" homepage="https://github.com/graysky2/profile-sync-daemon" distfiles="http://repo-ck.com/source/$pkgname/$pkgname-$version.tar.xz" checksum=9b6a66199fefb63ab81b8dbe72da04f238a91767d7f683597dfb019940e03c3d +build_options="systemd" +build_style="gnu-makefile" +make_install_target=$(vopt_if systemd 'install-systemd-all' 'install-bin install-man') -do_install() { - make DESTDIR="$DESTDIR" install-systemd-all - install -Dm644 MIT "$DESTDIR/usr/share/licenses/$pkgname/LICENSE" +do_build() { + : +} + +post_install() { + [ "$build_option_systemd" ] || vsv psd }