summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCarsten Teibes2014-06-04 12:03:03 +0200
committerCarsten Teibes2014-06-04 12:03:03 +0200
commit1921f79f51acac281582cacaebdc6c10c3e0545e (patch)
tree78ec59f778ac553399035680b786830b47f67081 /PKGBUILD
parentaa9d8688f584511759790a95dd4b1ef0fddbb231 (diff)
downloadaur-1921f79f51acac281582cacaebdc6c10c3e0545e.tar.gz
[upd], [fix] build patchutil, use better pkgver, use
a patch to allow additional search folders instead
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD49
1 files changed, 32 insertions, 17 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2d0ae6ce342f..283f433ed739 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,59 @@
-# Maintainer: carstene1ns <url/mail: arch carsten-teibes de>
+# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
pkgname=ecwolf-hg
-pkgver=r987.4169dcc8502a
+pkgver=1.3.r6.bf7ee7fbc2b0
pkgrel=1
pkgdesc='Advanced source port of "Wolfenstein 3D" and "Spear of Destiny" based on Wolf4SDL (development version)'
arch=('i686' 'x86_64')
url="http://maniacsvault.net/ecwolf"
-license=('GPL')
-depends=('sdl_mixer' 'libjpeg' 'gtk2')
-makedepends=('mercurial' 'cmake')
+license=('GPL' 'custom: ID')
provides=('ecwolf')
conflicts=('ecwolf')
+depends=('sdl_mixer' 'libjpeg' 'gtk2')
+makedepends=('mercurial' 'cmake')
+optdepends=('wolf3d-shareware: Demo version of Wolfenstein 3D')
install=ecwolf.install
-source=("hg+https://bitbucket.org/Blzut3/ecwolf")
-md5sums=('SKIP')
+source=("hg+https://bitbucket.org/Blzut3/ecwolf"
+ "ecwolf-datadirs.patch")
+sha256sums=('SKIP'
+ 'f99391f9139fc796dc69b081132ca76ce2ecb16978b29a1e864969946c15283c')
pkgver() {
cd ecwolf
- printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
+ _tag=$(hg tags -q | sort -r | grep "^[0-9]\.[0-9]" | head -n1)
+ _commits=$(hg log --template "{node}\n" -r $_tag:tip | wc -l)
+ printf "%s.r%s.%s" "$_tag" "$_commits" "$(hg identify -i)"
}
prepare() {
- cd ecwolf/src
+ # reset build folder
+ rm -rf build
+ mkdir build
- # data dir hack
- sed -e 's|OpenResourceFile(datawad|OpenResourceFile(FString("/usr/share/ecwolf/") + datawad|' \
- -e 's|wadfiles.Push("ecwolf.pk3|wadfiles.Push("/usr/share/ecwolf/ecwolf.pk3|' -i wl_iwad.cpp
+ # data dir hack (using a patch, so we can see it fail, when the source has changed)
+ patch -Np0 <ecwolf-datadirs.patch
}
build() {
- cd ecwolf
+ cd build
- # enable gpl licensed opl emulator
- cmake ./ -DGPL=ON
+ # build patch utility and enable gpl licensed opl emulator
+ cmake ../ecwolf -DBUILD_PATCHUTIL=ON -DGPL=ON
make
}
package() {
- cd ecwolf
- # binary + data
+ cd build
+
+ # binaries
install -Dm755 ecwolf "$pkgdir"/usr/bin/ecwolf
+ install -m755 tools/patchutil/patchutil "$pkgdir"/usr/bin/ecwolf-patchutil
+ # data
install -Dm644 ecwolf.pk3 "$pkgdir"/usr/share/ecwolf/ecwolf.pk3
+ cd ../ecwolf
+ # doc
+ install -d "$pkgdir"/usr/share/doc/ecwolf-hg
+ install -Dm644 README.* "$pkgdir"/usr/share/doc/ecwolf-hg
+ # license
+ install -Dm644 docs/license-id.txt "$pkgdir"/usr/share/licenses/ecwolf-hg/license-id.txt
}