summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCarsten Teibes2015-05-10 14:11:43 +0200
committerCarsten Teibes2015-05-10 14:11:43 +0200
commit99e9ce3b3c9f52fd4eb9963d3b16a9044598516a (patch)
tree009df78d1857860d2b2645d70e1b0201e62e8cf2 /PKGBUILD
parentbcd43a5a55e7ff3ff0564b666af83d7aefb22963 (diff)
downloadaur-99e9ce3b3c9f52fd4eb9963d3b16a9044598516a.tar.gz
Cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 14 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 34f869838a44..e648f0cc5c2a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,9 +2,8 @@
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
-_name=sdl_sound
-pkgname=$_name-hg
-pkgver=r596.719dade41745
+pkgname=sdl_sound-hg
+pkgver=1.0.3.r48.719dade41745
pkgrel=1
pkgdesc="A library to decode several popular sound file formats (development version)"
arch=('i686' 'x86_64')
@@ -12,28 +11,30 @@ url="http://icculus.org/SDL_sound/"
license=('LGPL')
depends=('sdl' 'libmodplug' 'libvorbis' 'flac' 'speex')
makedepends=('mercurial')
-conflicts=("$_name")
-provides=("$_name")
-source=($_name::"hg+http://hg.icculus.org/icculus/SDL_sound"
- 'physfs-renamed-export.patch')
+conflicts=("${pkgname%-*}")
+provides=("${pkgname%-*}")
+source=(${pkgname%-*}::"hg+http://hg.icculus.org/icculus/SDL_sound"
+ "${pkgname%-*}-renamed-physfs-export.patch")
sha256sums=('SKIP'
'd7bd96390d9bc877c0204922c7c4666cadfdccc5e6c0cfcf9477d113377f5d10')
pkgver() {
- cd $_name
+ cd ${pkgname%-*}
- printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
+ _lasttag=$(hg tags -q | sort -r | grep release- | head -n1)
+ _commits=$(hg log --template "{node}\n" -r $_lasttag:tip | wc -l)
+ printf "%s.r%s.%s" "${_lasttag/release-}" "$_commits" "$(hg identify -i)"
}
prepare() {
- cd $_name
+ cd ${pkgname%-*}
# fix deprecated physfs declaration
- patch -Np1 < ../physfs-renamed-export.patch
+ patch -Np1 < ../${pkgname%-*}-renamed-physfs-export.patch
}
build() {
- cd $_name
+ cd ${pkgname%-*}
./bootstrap
./configure --prefix=/usr --disable-static --disable-mikmod
@@ -41,5 +42,5 @@ build() {
}
package() {
- make -C $_name DESTDIR="$pkgdir/" install
+ make -C ${pkgname%-*} DESTDIR="$pkgdir/" install
}