summaryrefslogtreecommitdiff
path: root/pcr/puzzlemoppet-git
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2019-05-17 03:37:01 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2019-05-17 04:02:56 -0400
commitdaccbd93f37923ab2ce44686e96fae490205ab4e (patch)
tree03263b2249cac701d9ec742f5afc8e89af3f5d5b /pcr/puzzlemoppet-git
parent73b49e0e9daba3667936e99f19c07bebc340deb4 (diff)
downloadabslibre-daccbd93f37923ab2ce44686e96fae490205ab4e.tar.gz
abslibre-daccbd93f37923ab2ce44686e96fae490205ab4e.tar.bz2
abslibre-daccbd93f37923ab2ce44686e96fae490205ab4e.zip
[puzzlemoppet-git]: patch license dirname typo
Diffstat (limited to 'pcr/puzzlemoppet-git')
-rw-r--r--pcr/puzzlemoppet-git/PKGBUILD25
1 files changed, 21 insertions, 4 deletions
diff --git a/pcr/puzzlemoppet-git/PKGBUILD b/pcr/puzzlemoppet-git/PKGBUILD
index 45bbbacc8..c9f8acaec 100644
--- a/pcr/puzzlemoppet-git/PKGBUILD
+++ b/pcr/puzzlemoppet-git/PKGBUILD
@@ -10,16 +10,24 @@ arch=('i686' 'x86_64')
url=https://bitbucket.org/Knitter/puzzlemoppet/overview
license=('WTFPL')
-_latest_version() { pacman -Si $1 | awk '$1=="Version" { sub (/-.*/, "" , $3) ; print $3 }' | sort -V | tail -n 1 ; }
-_runtime_couplings=( "ode=$(_latest_version 'ode')" )
-depends=(${_runtime_couplings[@]} 'openal' 'irrlicht' 'libxrandr')
-makedepends=('make' 'cmake' 'git')
+depends=('irrlicht' 'libxrandr' 'ode' 'openal')
+makedepends=('cmake' 'git')
conflicts=('puzzle-moppet-bin')
source=(${pkgname}::git+https://bitbucket.org/Knitter/puzzlemoppet.git)
md5sums=('SKIP')
+_version_constraint() # (dep_pkgname)
+{
+ local dep_pkgname=$1
+ local version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1)
+ version=${version%-*}
+ version_inc=${version%.*}.$(( ${version##*.} + 1 ))
+
+ echo -n "${dep_pkgname}>=${version}" "${dep_pkgname}<${version_inc}"
+}
+
pkgver()
{
cd "${srcdir}/${pkgname}"
@@ -27,6 +35,13 @@ pkgver()
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare()
+{
+ cd "${srcdir}/${pkgname}/puzzlemoppet"
+
+ sed -i 's|/licences/|/licenses/|' ./CMakeLists.txt
+}
+
build()
{
cd "${srcdir}/${pkgname}/puzzlemoppet"
@@ -39,5 +54,7 @@ package()
{
cd "${srcdir}/${pkgname}/puzzlemoppet"
+ depends+=( $(_version_constraint 'ode') )
+
make install DESTDIR=$pkgdir
}