diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 60 |
1 files changed, 37 insertions, 23 deletions
@@ -1,37 +1,51 @@ + # Maintainer: willemw <willemw12@gmail.com> -# Contributor: sng +# Contributor: sng <sng at hellug dot gr> # Contributor: aksr <aksr at t-com dot me> -_pkgname=pyradio -pkgname=$_pkgname-git -pkgver=0.4.r142.g882da1e +pkgname=pyradio-git +pkgver=0.9.3.5.r0.g4c299e2 pkgrel=1 -pkgdesc="Command line internet radio player" +pkgdesc="Internet radio player for the command line" arch=('any') -url="http://www.coderholic.com/pyradio/" +url="https://github.com/coderholic/pyradio" license=('MIT') -depends=('ncurses' 'python') -optdepends=('mplayer: as backend' 'vlc: as backend' 'mpv: as backend' 'socat: if mpv is used') -makedepends=('git' 'python-setuptools') -provides=($_pkgname) -conflicts=($_pkgname) -source=($pkgname::git://github.com/coderholic/pyradio.git - pyradio.1) -md5sums=('SKIP' - '53460ef86b415aca61eba663ecc4240e') +depends=('python-dnspython' 'python-requests' 'python-psutil' 'python-netifaces' 'python-rich' 'python-dateutil') +optdepends=('mplayer: as backend' 'mpv: as backend' 'vlc: as backend' 'mkvtoolnix-cli: fix mplayer recordings, add chapters to recordings') +makedepends=('git' 'python-pip' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=($pkgname::git+https://github.com/coderholic/pyradio.git) +sha256sums=('SKIP') + +prepare() { + cd $pkgname + _descr="$(git describe --long --tags)" + sed -i -e "s/git_description = ''/git_description = '$_descr'/" pyradio/config.py + sed -i -e 's/distro = None/distro = Arch Linux (AUR)/' \ + -e 's/xdg_compliant = False/xdg_compliant = True/' \ + pyradio/config + git -C "${srcdir}/${pkgname}" clean -dfx +} pkgver() { cd $pkgname - git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g' + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } -package() { - install -Dm644 pyradio.1 "$pkgdir/usr/share/man/man1/pyradio.1" +build() { + cd "$pkgname" + [ -d pyradio/__pycache__ ] && rm -rf pyradio/__pycache__ + python -m build --wheel --no-isolation +} +package() { cd $pkgname - python setup.py install --root="$pkgdir" --optimize=1 - install -Dm644 LICENCE "$pkgdir/usr/share/licenses/pyradio/LICENSE" - install -Dm644 README.md "$pkgdir/usr/share/doc/pyradio/README.md" - install -Dm644 pyradio/stations.csv "$pkgdir/usr/share/doc/pyradio/stations.csv" -} + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/pyradio/LICENSE" + install -Dm644 ./docs/*{html,md} -t "$pkgdir/usr/share/doc/pyradio" + install -Dm644 ./docs/pyradio{,_rb,_server,_rec}.1 -t "$pkgdir/usr/share/man/man1" + install -Dm644 devel/pyradio.desktop -t "$pkgdir/usr/share/applications" + install -Dm644 devel/pyradio.png -t "$pkgdir/usr/share/icons" + python -m installer --destdir="$pkgdir" dist/*.whl +} |