upgpkg: mpdrandom-git 1.3.0.r4.gacc37ed-2

add system systemd unit
This commit is contained in:
Cedric Girard 2021-09-02 16:06:19 +02:00
parent ce05829a57
commit 7626a2d506
Signed by: X-dark
GPG key ID: E7D0E125DB9519E4
4 changed files with 26 additions and 8 deletions

View file

@ -1,7 +1,7 @@
pkgbase = mpdrandom-git pkgbase = mpdrandom-git
pkgdesc = mpd albums randomizing script pkgdesc = mpd albums randomizing script
pkgver = 1.3.0.r2.gf96680a pkgver = 1.3.0.r4.gacc37ed
pkgrel = 1 pkgrel = 2
url = https://github.com/axujen/mpdrandom url = https://github.com/axujen/mpdrandom
arch = any arch = any
license = GPL3 license = GPL3
@ -9,10 +9,13 @@ pkgbase = mpdrandom-git
makedepends = python-setuptools makedepends = python-setuptools
depends = python depends = python
depends = python-mpd2 depends = python-mpd2
optdepends = mpd: provides mpd user for system unit
provides = mpdrandom provides = mpdrandom
source = git+https://github.com/axujen/mpdrandom source = git+https://github.com/axujen/mpdrandom
source = mpdrandom.service source = mpdrandom-user.service
source = mpdrandom-system.service
sha1sums = SKIP sha1sums = SKIP
sha1sums = 155133e127d3d935d339cff2265a5f728a4ef0b1 sha1sums = 155133e127d3d935d339cff2265a5f728a4ef0b1
sha1sums = 2728b8b70264c98b763050953d46ce3680d7791d
pkgname = mpdrandom-git pkgname = mpdrandom-git

View file

@ -1,20 +1,24 @@
# Author: Axujen <axujen@gmail.com> # Author: Axujen <axujen@gmail.com>
# Maintainer: ZaZam <zazaamm at gmail dot com> # Maintainer: ZaZam <zazaamm at gmail dot com>
# Co-Maintainer: Cedric Girard <cgirard [dot] archlinux [at] valinor [dot] fr>
_gitauthor=axujen _gitauthor=axujen
_gitname=mpdrandom _gitname=mpdrandom
pkgname=mpdrandom-git pkgname=mpdrandom-git
pkgver=1.3.0.r2.gf96680a pkgver=1.3.0.r4.gacc37ed
pkgrel=1 pkgrel=2
pkgdesc="mpd albums randomizing script" pkgdesc="mpd albums randomizing script"
arch=('any') arch=('any')
url="https://github.com/$_gitauthor/$_gitname" url="https://github.com/$_gitauthor/$_gitname"
license=('GPL3') license=('GPL3')
depends=('python' 'python-mpd2') depends=('python' 'python-mpd2')
makedepends=('git' 'python-setuptools') makedepends=('git' 'python-setuptools')
optdepends=('mpd: provides mpd user for system unit')
provides=('mpdrandom') provides=('mpdrandom')
source=("git+https://github.com/$_gitauthor/$_gitname" 'mpdrandom.service') source=("git+https://github.com/$_gitauthor/$_gitname" 'mpdrandom-user.service' 'mpdrandom-system.service')
sha1sums=('SKIP' '155133e127d3d935d339cff2265a5f728a4ef0b1') sha1sums=('SKIP'
'155133e127d3d935d339cff2265a5f728a4ef0b1'
'2728b8b70264c98b763050953d46ce3680d7791d')
pkgver() { pkgver() {
cd "$srcdir/$_gitname" cd "$srcdir/$_gitname"
@ -30,7 +34,8 @@ package() {
cd "$srcdir/$_gitname" cd "$srcdir/$_gitname"
python setup.py install --root="$pkgdir" --optimize=1 python setup.py install --root="$pkgdir" --optimize=1
install -Dm644 "$srcdir/mpdrandom.service" "$pkgdir/usr/lib/systemd/user/mpdrandom.service" install -Dm644 "$srcdir/mpdrandom-user.service" "$pkgdir/usr/lib/systemd/user/mpdrandom.service"
install -Dm644 "$srcdir/mpdrandom-system.service" "$pkgdir/usr/lib/systemd/system/mpdrandom.service"
} }
# vim:set ts=2 sw=2 et: # vim:set ts=2 sw=2 et:

View file

@ -0,0 +1,10 @@
[Unit]
Description=Play a random album in mpd
After=mpd.service
[Service]
User=mpd
ExecStart=/usr/bin/mpdrandom -d -l
[Install]
WantedBy=multi-user.target