summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD62
2 files changed, 43 insertions, 36 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d9b6b5f8b79c..beaf84269752 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,24 @@
pkgbase = teeworlds-git
- pkgdesc = Multiplayer 2D shooter
- pkgver = 0.7.0.86.gbc481d4c
+ pkgdesc = Fast-paced multiplayer 2D shooter game
+ pkgver = 0.7.5.6245.26d24ec06
pkgrel = 1
- url = http://teeworlds.com
+ url = https://teeworlds.com
arch = x86_64
license = custom
+ license = CCPL:by-nc-sa
makedepends = python
makedepends = git
- makedepends = bam
+ makedepends = cmake
+ makedepends = ninja
makedepends = imagemagick
+ makedepends = gtest
depends = alsa-lib
depends = glu
- depends = mesa
- depends = gcc-libs
depends = sdl2
depends = freetype2
+ depends = pnglite
+ depends = wavpack
+ depends = openssl
provides = teeworlds
conflicts = teeworlds
source = git+https://github.com/teeworlds/teeworlds.git
@@ -25,4 +29,3 @@ pkgbase = teeworlds-git
md5sums = SKIP
pkgname = teeworlds-git
-
diff --git a/PKGBUILD b/PKGBUILD
index a450aca8e08b..87b3cd1f59b1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,30 +2,31 @@
# Maintainer: Rafael Fontenelle <rafaelff@gnome.org>
pkgname=teeworlds-git
-pkgver=0.7.0.86.gbc481d4c
+pkgver=0.7.5.6245.26d24ec06
pkgrel=1
-pkgdesc='Multiplayer 2D shooter'
+pkgdesc='Fast-paced multiplayer 2D shooter game'
arch=('x86_64')
-url="http://teeworlds.com"
-license=('custom')
-depends=('alsa-lib' 'glu' 'mesa' 'gcc-libs' 'sdl2' 'freetype2')
-makedepends=('python' 'git' 'bam' 'imagemagick')
+url="https://teeworlds.com"
+license=('custom' 'CCPL:by-nc-sa')
+depends=('alsa-lib' 'glu' 'sdl2' 'freetype2' 'pnglite' 'wavpack' 'openssl')
+makedepends=('python' 'git' 'cmake' 'ninja' 'imagemagick' 'gtest')
provides=('teeworlds')
conflicts=('teeworlds')
-source=(git+https://github.com/teeworlds/teeworlds.git
- git+https://github.com/teeworlds/teeworlds-translation.git
- git+https://github.com/teeworlds/teeworlds-maps.git)
+source=('git+https://github.com/teeworlds/teeworlds.git'
+ 'git+https://github.com/teeworlds/teeworlds-translation.git'
+ 'git+https://github.com/teeworlds/teeworlds-maps.git')
md5sums=('SKIP'
'SKIP'
'SKIP')
pkgver() {
cd teeworlds
- git describe | sed 's/-start//;s/-/./g'
+ v=$(grep "GAME_VERSION " src/game/version.h | cut -d\" -f2)
+ printf "$v.%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
- convert "teeworlds/other/icons/Teeworlds.ico" "$srcdir/teeworlds.png"
+ convert "teeworlds/other/icons/teeworlds.ico" "$srcdir/teeworlds.png"
cd teeworlds
git submodule init
@@ -35,27 +36,30 @@ prepare() {
}
build() {
- cd teeworlds
- bam client server
+ mkdir -p build
+ cd build
+ cmake ../teeworlds \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -GNinja
+ ninja
+}
+
+check() {
+ ninja run_tests -C build
}
package() {
- cd teeworlds
+ DESTDIR="$pkgdir" ninja install -C build
- install -dm755 "$pkgdir"/usr/bin \
- "$pkgdir"/usr/share/{applications,pixmaps,appdata} \
- "$pkgdir"/usr/share/{licenses/teeworlds,teeworlds/data}
-
- # Install data files
- cp -r datasrc/* "$pkgdir"/usr/share/teeworlds/data
-
- install -m755 build/$CARCH/debug/teeworlds "$pkgdir"/usr/bin/
- install -m755 build/$CARCH/debug/teeworlds_srv "$pkgdir"/usr/bin/
-
- install -m644 license.txt "$pkgdir/usr/share/licenses/teeworlds/"
- install -m644 other/teeworlds.appdata.xml "$pkgdir/usr/share/appdata/"
- install -m644 other/teeworlds.desktop "$pkgdir/usr/share/applications/"
- install -m644 ../teeworlds-0.png "$pkgdir/usr/share/pixmaps/teeworlds.png"
+ install -dm755 "$pkgdir/usr/share/"{licenses/$pkgname,metainfo,applications}
+ install -m644 teeworlds/license.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -m644 teeworlds/other/teeworlds.appdata.xml -t "$pkgdir/usr/share/metainfo/"
+ install -m644 teeworlds/other/teeworlds.desktop -t "$pkgdir/usr/share/applications/"
- install -Dm644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
+ # Install client and server icon files according to the image size
+ for _icon in $(ls -1 "$srcdir"/teeworlds-*.png); do
+ _s=$(identify $_icon | awk '{print $3}')
+ [[ $_s =~ ([0-9])+x([0-9])+ ]] || ( echo "Not a NUMxNUM: '$_s'"; exit 1; )
+ install -Dm644 "$_icon" "$pkgdir/usr/share/icons/hicolor/$_s/apps/teeworlds.png"
+ done
}