summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsqrlfish2016-10-07 22:02:42 +0200
committersqrlfish2016-10-07 22:02:42 +0200
commitd3727b3739269ffcfed857fa069dabddb9055745 (patch)
tree75db2da43c0eea7bd3e253de8855c136b1dd2ddf
parent905863f434035ff04ceb8fa41295c6402638a4fe (diff)
downloadaur-d3727b3739269ffcfed857fa069dabddb9055745.tar.gz
More concise pkgver() using grep; python version correction made to work even if fixed in source
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD17
2 files changed, 4 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c9090859ed6..529d0169885 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = stream2chromecast-git
pkgdesc = Chromecast media streamer for Linux
pkgver = 0.6.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Pat-Carter/stream2chromecast
arch = any
license = GPL
diff --git a/PKGBUILD b/PKGBUILD
index 256ae455910..914acc2e2e7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=stream2chromecast-git
_pkgname=stream2chromecast
pkgver=0.6.2
-pkgrel=1
+pkgrel=2
pkgdesc="Chromecast media streamer for Linux"
arch=('any')
url="https://github.com/Pat-Carter/${_pkgname}"
@@ -18,24 +18,13 @@ pkgver() {
cd "${srcdir}/${_pkgname}"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
- (
- regex="VERSION = \"([0-9\.]+)\""
- while read line
- do
- if [[ $line =~ $regex ]]
- then
- echo "${BASH_REMATCH[1]}"
- break
- fi
- done < stream2chromecast.py
-
- )
+ grep -Po '(?<=version: )([0-9\.]+)' stream2chromecast.py
)
}
package() {
cd "${srcdir}/${_pkgname}"
- sed -i '1s/env python/env python2/' stream2chromecast.py #requires python2
+ sed -i '1s/env python$/env python2/' stream2chromecast.py #requires python2
install -D -m755 stream2chromecast.py "${pkgdir}/usr/bin/stream2chromecast"
install -D -m644 cc_device_finder.py "${pkgdir}/usr/lib/python2.7/site-packages/cc_device_finder.py"
install -D -m644 cc_media_controller.py "${pkgdir}/usr/lib/python2.7/site-packages/cc_media_controller.py"