summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet2020-05-28 22:47:19 +0200
committerCôme Chilliet2020-05-28 22:47:19 +0200
commit2d4fde240b54f7fc216e23b4b8ce0b8e74461779 (patch)
tree1aceb95caf3df6080c42c728cf7e20e64d4d32c2
parent5b192358e3e62839af9a971991e6c2fd36eed23a (diff)
downloadaur-purity.tar.gz
Switch to mercurial version
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD90
2 files changed, 47 insertions, 47 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cc0d9490dfa..78098c3dfb5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,7 +7,7 @@ pkgbase = purity
arch = x86_64
license = GPL
makedepends = make
- makedepends = svn
+ makedepends = mercurial
optdepends = zenity: allow using purity-zen to choose graphically the map
noextract = core.pk3
noextract = map0.pk3
@@ -16,10 +16,12 @@ pkgbase = purity
source = http://vectorpoem.com/purity/latest_content/map0.pk3
source = http://vectorpoem.com/purity/latest_content/vm.pk3
source = purity-zen
+ source = hg+https://bitbucket.org/JPLeBreton/purity
md5sums = 4f5b6af36a738a54570f21fb24177edd
md5sums = b7f5730e443ea5c066d7ef67bce09892
md5sums = 8396c0dfe49c31ff866800837bf80d9d
md5sums = 8361d4586bf2c0dd1a31edddf8b70d89
+ md5sums = SKIP
pkgname = purity
diff --git a/PKGBUILD b/PKGBUILD
index f1eb80ed84f..440ffe22f29 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Contributor: MCMic <come.bernigaud@laposte.net>
+# Contributor: MCMic <come@chilliet.eu>
pkgname=purity
pkgver=20071027
@@ -8,59 +8,57 @@ arch=('i686' 'x86_64')
url="http://vectorpoem.com/purity/"
license=('GPL')
depends=()
-makedepends=('make' 'svn')
+makedepends=('make' 'mercurial')
optdepends=('zenity: allow using purity-zen to choose graphically the map')
-conflicts=('')
source=('http://vectorpoem.com/purity/latest_content/core.pk3'
- 'http://vectorpoem.com/purity/latest_content/map0.pk3'
- 'http://vectorpoem.com/purity/latest_content/vm.pk3'
- 'purity-zen')
+ 'http://vectorpoem.com/purity/latest_content/map0.pk3'
+ 'http://vectorpoem.com/purity/latest_content/vm.pk3'
+ 'purity-zen'
+ 'hg+https://bitbucket.org/JPLeBreton/purity')
noextract=( 'core.pk3'
- 'map0.pk3'
- 'vm.pk3')
+ 'map0.pk3'
+ 'vm.pk3')
md5sums=('4f5b6af36a738a54570f21fb24177edd'
'b7f5730e443ea5c066d7ef67bce09892'
'8396c0dfe49c31ff866800837bf80d9d'
- '8361d4586bf2c0dd1a31edddf8b70d89')
+ '8361d4586bf2c0dd1a31edddf8b70d89'
+ 'SKIP')
-_svn='https://purityq3.svn.sourceforge.net/svnroot/purityq3'
+pgkver() {
+ cd $srcdir/$pkgname
+
+ # As per the wiki the version is r<commit number>.<commit hash>
+ printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
+}
build() {
- cd $srcdir
- msg "Getting svn revision…"
- if [ -d $pkgname/.svn ]; then
- (cd $pkgname && svn up)
- else
- svn co $_svn $pkgname
- fi
-
- msg "Building…"
- cd $pkgname
- make
-
- msg "Cleaning and adapting scripts"
- build_folder=`ls ${srcdir}/$pkgname/build`
- bin_name=`ls ${srcdir}/$pkgname/build/$build_folder | grep "purity\."`
- bin_serv=`ls ${srcdir}/$pkgname/build/$build_folder | grep "purity-ded"`
- bin_path=/opt/$pkgname/build/$build_folder/$bin_name
- serv_path=/opt/$pkgname/build/$build_folder/$bin_serv
- _bin=`echo $bin_path | sed "s|\/|\\\/|g"`
- _serv=`echo $serv_path | sed "s|\/|\\\/|g"`
- rm *.exe
- for i in `ls *.bat | cut -d'.' -f1`
- do sed -i "s|@start purity.x86|$_bin|" $i.bat
- sed -i "s|@start purity-ded.x86|$_serv|" $i.bat
- mv $i.bat $i.sh
- chmod +x $i.sh
- done
+ cd $srcdir/$pkgname
+ make
+
+ msg "Cleaning and adapting scripts"
+ build_folder=`ls ${srcdir}/$pkgname/build`
+ bin_name=`ls ${srcdir}/$pkgname/build/$build_folder | grep "purity\."`
+ bin_serv=`ls ${srcdir}/$pkgname/build/$build_folder | grep "purity-ded"`
+ bin_path=/opt/$pkgname/build/$build_folder/$bin_name
+ serv_path=/opt/$pkgname/build/$build_folder/$bin_serv
+ _bin=`echo $bin_path | sed "s|\/|\\\/|g"`
+ _serv=`echo $serv_path | sed "s|\/|\\\/|g"`
+ rm *.exe
+ for i in `ls *.bat | cut -d'.' -f1`
+ do sed -i "s|@start purity.x86|$_bin|" $i.bat
+ sed -i "s|@start purity-ded.x86|$_serv|" $i.bat
+ mv $i.bat $i.sh
+ chmod +x $i.sh
+ done
+
+ sed -i "s|purity_cmd|$_bin|" ${srcdir}/purity-zen
+}
- sed -i "s|purity_cmd|$_bin|" ${srcdir}/purity-zen
-
- msg "Packaging"
- mkdir -p ${pkgdir}/usr/bin
- cp ${srcdir}/$pkgname/purity.sh ${pkgdir}/usr/bin/
- cp ${srcdir}/purity-zen ${pkgdir}/usr/bin/
- mkdir -p ${pkgdir}/opt/$pkgname/build/$build_folder/base
- cp -r ${srcdir}/$pkgname ${pkgdir}/opt/
- cp ${srcdir}/*.pk3 ${pkgdir}/opt/$pkgname/build/$build_folder/base/
+package() {
+ mkdir -p ${pkgdir}/usr/bin
+ cp ${srcdir}/$pkgname/purity.sh ${pkgdir}/usr/bin/
+ cp ${srcdir}/purity-zen ${pkgdir}/usr/bin/
+ mkdir -p ${pkgdir}/opt/$pkgname/build/$build_folder/base
+ cp -r ${srcdir}/$pkgname ${pkgdir}/opt/
+ cp ${srcdir}/*.pk3 ${pkgdir}/opt/$pkgname/build/$build_folder/base/
}