diff options
author | AdriĆ Arrufat | 2016-03-16 16:18:11 +0100 |
---|---|---|
committer | AdriĆ Arrufat | 2016-03-16 16:18:11 +0100 |
commit | 295ca178ff9f1093414328eb55506964f669e567 (patch) | |
tree | 0b69b37a32ba31806826d469556e76494d04ccba | |
parent | b8b430e2a63aff04a0dac83b33d63bab87dd8f75 (diff) | |
download | aur-295ca178ff9f1093414328eb55506964f669e567.tar.gz |
Handle different version numbering in rhythmbox
Rhythmbox does not use 3 numbers for release versions if the last one is a
zero.
This commit appends a zero to the version in that case.
This prevents rhythmbox from not upgrading from a 2 version number to a 3
version number.
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 24 |
2 files changed, 23 insertions, 7 deletions
@@ -1,6 +1,8 @@ +# Generated by mksrcinfo v8 +# Wed Mar 16 15:17:55 UTC 2016 pkgbase = rhythmbox-git pkgdesc = Music playback and management application - pkgver = 3.2.1.44.gf572661 + pkgver = 3.3.0.28.ga61f8a4 pkgrel = 1 url = http://www.rhythmbox.org install = rhythmbox.install @@ -41,7 +43,7 @@ pkgbase = rhythmbox-git optdepends = libgpod: Portable Players - iPod plugin optdepends = libmtp: Portable Players - MTP plugin optdepends = python-mako: Context pane plugin - provides = rhythmbox=3.2.1.44.gf572661 + provides = rhythmbox=3.3.0.28.ga61f8a4 conflicts = rhythmbox options = !emptydirs source = rhythmbox-git::git+https://git.gnome.org/browse/rhythmbox @@ -6,7 +6,7 @@ _pkgname=rhythmbox pkgname=$_pkgname-git -pkgver=3.2.1.44.gf572661 +pkgver=3.3.0.28.ga61f8a4 pkgrel=1 pkgdesc="Music playback and management application" arch=(i686 x86_64) @@ -33,12 +33,25 @@ sha256sums=('SKIP') pkgver() { cd $pkgname/ - git describe | sed 's/^v//;s/-/./g' + # count the number of dots and add a 0 to the version if there's only 1 + dots=`git describe | grep -o '\.' | wc -l` + if [ ${dots} -eq 1 ] + then + git describe | sed 's/^v//;s/-/.0./;s/-/./g' + else + git describe | sed 's/^v//;s/-/./g' + fi } prepare() { - cd $pkgname/ - sed "{:q;N;s/(\[rhythmbox\],\n\t\[\([0-9]\).\([0-9]\).\([0-9]\)\],/(\[rhythmbox\],\n\t[$pkgver],/g;t q}" -i configure.ac + cd $pkgname/ + dots=`git describe | grep -o '\.' | wc -l` + # use a different regex depending on the version + if [ ${dots} -eq 1 ] + then + sed "{:q;N;s/(\[rhythmbox\],\n\t\[\([0-9]\).\([0-9]\)\],/(\[rhythmbox\],\n\t[$pkgver],/g;t q}" -i configure.ac + fi + sed "{:q;N;s/(\[rhythmbox\],\n\t\[\([0-9]\).\([0-9]\).\([0-9]\)\],/(\[rhythmbox\],\n\t[$pkgver],/g;t q}" -i configure.ac } build() { @@ -49,7 +62,8 @@ build() { ./configure --prefix=/usr --sysconfdir=/etc \ --libexecdir=/usr/lib/rhythmbox \ --localstatedir=/var --disable-static \ - --enable-daap --enable-python --enable-vala + --enable-daap --enable-python --enable-vala \ + --disable-Werror make } |