From 95d6f18b1928f402a9ce14c063bdf476db033dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikita=20Volodin=20=5B=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0?= =?UTF-8?q?=20=D0=92=D0=BE=D0=BB=D0=BE=D0=B4=D0=B8=D0=BD=5D?= Date: Sun, 1 Nov 2015 00:31:41 -0300 Subject: [PATCH] feat(mpdrandom.service): add systemd user service to start daemon --- .SRCINFO | 2 ++ PKGBUILD | 6 ++++-- mpdrandom.service | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 mpdrandom.service diff --git a/.SRCINFO b/.SRCINFO index 6f00f19..54ca313 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -10,7 +10,9 @@ pkgbase = mpdrandom-git depends = python-mpd2 provides = mpdrandom source = git+https://github.com/axujen/mpdrandom + source = mpdrandom.service md5sums = SKIP + md5sums = 6a7b6b63bb1ce777372deac19f420b2e pkgname = mpdrandom-git diff --git a/PKGBUILD b/PKGBUILD index aad0f96..b51aecd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -13,8 +13,8 @@ license=('unknown') depends=('python' 'python-mpd2') makedepends=('git') provides=('mpdrandom') -source=('git+https://github.com/axujen/mpdrandom') -md5sums=('SKIP') +source=('git+https://github.com/axujen/mpdrandom' 'mpdrandom.service') +md5sums=('SKIP' '6a7b6b63bb1ce777372deac19f420b2e') pkgver() { cd "$srcdir/$_gitname" @@ -29,6 +29,8 @@ build() { package() { cd "$srcdir/$_gitname" python setup.py install --prefix="$pkgdir/usr" + + install -Dm644 "$srcdir/mpdrandom.service" "$pkgdir/usr/lib/systemd/user/mpdrandom.service" } # vim:set ts=2 sw=2 et: diff --git a/mpdrandom.service b/mpdrandom.service new file mode 100644 index 0000000..c6ec34e --- /dev/null +++ b/mpdrandom.service @@ -0,0 +1,9 @@ +[Unit] +Description=Play a random album in mpd +After=mpd.service + +[Service] +ExecStart=/usr/bin/mpdrandom -d + +[Install] +WantedBy=default.target