summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD56
-rw-r--r--pyradio.181
3 files changed, 51 insertions, 115 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2ca13f71464e..94cc6de4e24d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,29 @@
pkgbase = pyradio-git
- pkgdesc = Command line internet radio player
- pkgver = 0.4.r142.g882da1e
+ pkgdesc = Internet radio player for the command line
+ pkgver = 0.9.3.1
pkgrel = 1
url = http://www.coderholic.com/pyradio/
arch = any
license = MIT
makedepends = git
- makedepends = python-setuptools
- depends = ncurses
- depends = python
+ makedepends = python-setuptools
+ makedepends = python-pip
+ makedepends = python-wheel
+ makedepends = python-build
+ makedepends = python-installer
+ depends = python-dnspython
+ depends = python-requests
+ depends = python-psutil
+ depends = python-dateutil
+ depends = python-netifaces
+ depends = python-rich
optdepends = mplayer: as backend
- optdepends = vlc: as backend
optdepends = mpv: as backend
- optdepends = socat: if mpv is used
+ optdepends = vlc: as backend
+ optdepends = mkvtoolnix-cli: fix mplayer recordings, add chapters to recordings
provides = pyradio
conflicts = pyradio
- source = pyradio-git::git://github.com/coderholic/pyradio.git
- source = pyradio.1
- md5sums = SKIP
- md5sums = 53460ef86b415aca61eba663ecc4240e
+ source = pyradio-git::git+https://github.com/coderholic/pyradio.git
+ sha256sums = SKIP
pkgname = pyradio-git
-
diff --git a/PKGBUILD b/PKGBUILD
index a63df23679af..514207d25145 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,37 +1,49 @@
+
# 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.1
pkgrel=1
-pkgdesc="Command line internet radio player"
+pkgdesc="Internet radio player for the command line"
arch=('any')
url="http://www.coderholic.com/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 "s/git_description = ''/git_description = '$_descr'/" pyradio/config.py
+ sed -i 's/distro = None/distro = Arch Linux (AUR)/' 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
+}
diff --git a/pyradio.1 b/pyradio.1
deleted file mode 100644
index 94d3f8b428dc..000000000000
--- a/pyradio.1
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" Copyright (C) 2011 Ben Dowling <http://www.coderholic.com/pyradio>
-.\" This manual is freely distributable under the terms of the GPL.
-.\"
-.TH PYRADIO 1 "November 2018"
-
-.SH NAME
-.PP
-pyradio \- a console based Internet radio player
-
-.SH SYNOPSIS
-.PP
-\fBpyradio\fR
-.RI \fI[OPTIONS]
-[path/to/]stations.csv
-
-.SH DESCRIPTION
-.PP
-.B pyradio
-is a command line internet radio player.
-.PP
-It will use one of the following players: \fImpv\fR, \fImplayer\fR or \fIvlc\fR, detected in that order. If none of them is detected, \fBpyradio\fR will \fBsilently\ terminate\fR (use \fB-d\fR option to get a log file).
-.PP
-If \fImpv\fR is detected, \fIsocat\fR is required too.
-.PP
-It is possible to use
-a custom stations list in \fB~/.pyradio/stations.csv.
-.PP
-If custom stations list is missing, \fBpyradio\fR would use a
-default one.
-
-.SH OPTIONS
-
-.IP \fB-h\fR,\fB\ \--help
-Show this help message and exit.
-.IP \fB-s\fR,\fB\ \--stations\ \fI[STATIONS]
-Use specified station CSV file.
-.IP \fB-p\fR,\fB\ \--play\ \fI\<PLAY\>
-Play station number \fI\<PLAY\>\fR. Select randome station if \fI\<PLAY\>\fR not specified.
-.IP \fB-r\fR,\fB\ \--random
-Start and play a random station.
-.IP \fB-a\fR,\fB\ \--add
-Add station to list.
-.IP \fB-l\fR,\fB\ \--list
-List of added stations.
-.IP \fB-u\fR,\fB\ \--use-player\ \fI[USE_PLAYER]
-Specify which player to use (\fImpv\fR,\ \fImplayer\fR\ or\ \fIcvlc\fR).
-.IP \fB-d\fR,\fB\ \--debug
-Debug mode (pyradio.log created). To be attached with any bug report.
-
-.SH CONTROLS
-
-.IP \fB\Up/Down/PgUp/PgDown
-Change station selection
-.IP \fBj/k
-Change station selection (vi-like)
-.IP \fBEnter
-Play selected station
-.IP \fB-/+
-Change volume
-.IP \fBv
-Save volume (mpv and mplayer only)
-.IP \fBm
-Mute
-.IP \fBr
-Select and play a random station
-.IP \fBSpace
-Stop/start playing selected station
-.IP \fBEsc/q
-Quit
-
-.SH FILES
-.PP
-.I /usr/share/doc/pyradio/stations.csv
-
-.I /usr/share/doc/pyradio/README.md
-
-.I /usr/share/licenses/pyradio/LICENSE
-
-.SH AUTHOR
-.PP
- \fBBen Dowling <http://www.coderholic.com/pyradio>