feat(mpdrandom.service): add systemd user service to start daemon

This commit is contained in:
Nikita Volodin [Никита Володин] 2015-11-01 00:31:41 -03:00
parent eac6f52317
commit 95d6f18b19
3 changed files with 15 additions and 2 deletions

View file

@ -10,7 +10,9 @@ pkgbase = mpdrandom-git
depends = python-mpd2 depends = python-mpd2
provides = mpdrandom provides = mpdrandom
source = git+https://github.com/axujen/mpdrandom source = git+https://github.com/axujen/mpdrandom
source = mpdrandom.service
md5sums = SKIP md5sums = SKIP
md5sums = 6a7b6b63bb1ce777372deac19f420b2e
pkgname = mpdrandom-git pkgname = mpdrandom-git

View file

@ -13,8 +13,8 @@ license=('unknown')
depends=('python' 'python-mpd2') depends=('python' 'python-mpd2')
makedepends=('git') makedepends=('git')
provides=('mpdrandom') provides=('mpdrandom')
source=('git+https://github.com/axujen/mpdrandom') source=('git+https://github.com/axujen/mpdrandom' 'mpdrandom.service')
md5sums=('SKIP') md5sums=('SKIP' '6a7b6b63bb1ce777372deac19f420b2e')
pkgver() { pkgver() {
cd "$srcdir/$_gitname" cd "$srcdir/$_gitname"
@ -29,6 +29,8 @@ build() {
package() { package() {
cd "$srcdir/$_gitname" cd "$srcdir/$_gitname"
python setup.py install --prefix="$pkgdir/usr" 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: # vim:set ts=2 sw=2 et:

9
mpdrandom.service Normal file
View file

@ -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