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