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
provides = mpdrandom
source = git+https://github.com/axujen/mpdrandom
source = mpdrandom.service
md5sums = SKIP
md5sums = 6a7b6b63bb1ce777372deac19f420b2e
pkgname = mpdrandom-git

View File

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

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