aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoni Aloy Torrens <aaloytorrens@gmail.com>2021-10-01 10:28:51 +0200
committerLeo <thinkabit.ukim@gmail.com>2021-10-03 04:23:31 +0000
commit87aedf907754fa124675d18fdb6fad7fef0e54ce (patch)
treeb8a9c74518c454ef79f5b7d0eb262817ea844a5d
parent705373c99f85be9fca9cfdb9527f6307cc5d5196 (diff)
downloadaports-87aedf907754fa124675d18fdb6fad7fef0e54ce.tar.gz
aports-87aedf907754fa124675d18fdb6fad7fef0e54ce.tar.bz2
aports-87aedf907754fa124675d18fdb6fad7fef0e54ce.tar.xz
testing/trigger-rally: upgrade to 0.6.7
-rw-r--r--testing/trigger-rally/0001-fix-sdl2-detection.patch26
-rw-r--r--testing/trigger-rally/APKBUILD59
2 files changed, 71 insertions, 14 deletions
diff --git a/testing/trigger-rally/0001-fix-sdl2-detection.patch b/testing/trigger-rally/0001-fix-sdl2-detection.patch
new file mode 100644
index 0000000000..84c7ae9b23
--- /dev/null
+++ b/testing/trigger-rally/0001-fix-sdl2-detection.patch
@@ -0,0 +1,26 @@
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -2,6 +2,12 @@
+ # Trigger Rally GNUmakefile for Linux users
+ #
+
++PKG_CONFIG ?= pkg-config
++SDL2_CFLAGS = $(shell ${PKG_CONFIG} --cflags sdl2)
++SDL2_LIBS = $(shell ${PKG_CONFIG} --libs sdl2)
++SDL2_IMAGE_CFLAGS = $(shell ${PKG_CONFIG} --cflags SDL2_image)
++SDL2_IMAGE_LIBS = $(shell ${PKG_CONFIG} --libs SDL2_image)
++
+ # standard GNU and custom variables
+ DISTNAME := trigger-rally
+ DISTVER := 0.6.6.1
+@@ -25,8 +31,8 @@
+ DMACROS := -DNDEBUG -DUNIX -DPACKAGE_VERSION=\"$(DISTVER)\"
+ INCDIRS := -I'./include'
+ CXXFLAGS += -std=c++11 $(WARNINGS) $(OPTIMS)
+-CPPFLAGS += $(DMACROS) $(INCDIRS)
+-EXTRA_LIBS := -lSDL2main -lGL -lGLU -lGLEW -lSDL2 -lSDL2_image -lphysfs -lopenal -lalut -lpthread -ltinyxml2
++CPPFLAGS += $(DMACROS) $(INCDIRS) $(SDL2_CFLAGS) $(SDL2_IMAGE_CFLAGS)
++EXTRA_LIBS := $(SDL2_LIBS) $(SDL2_IMAGE_LIBS) -lSDL2main -lGL -lGLU -lGLEW -lSDL2 -lSDL2_image -lphysfs -lopenal -lalut -lpthread -ltinyxml2
+ LDFLAGS += $(EXTRA_LIBS)
+ INSTALL_PROGRAM := install --mode=0755
+ INSTALL_DATA := install --mode=0644
diff --git a/testing/trigger-rally/APKBUILD b/testing/trigger-rally/APKBUILD
index 559927695d..e9493bfb65 100644
--- a/testing/trigger-rally/APKBUILD
+++ b/testing/trigger-rally/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=trigger-rally
-pkgver=0.6.6.1
-pkgrel=1
+pkgver=0.6.7
+pkgrel=0
pkgdesc="Fast-paced free software rally racing game"
url="https://trigger-rally.sourceforge.io/"
arch="all"
@@ -10,13 +10,20 @@ depends="$pkgname-data"
makedepends="sdl2-dev sdl2_image-dev freealut-dev physfs-dev glew-dev tinyxml2-dev openal-soft-dev"
subpackages="$pkgname-doc $pkgname-data::noarch"
options="!check" # No testsuite
-source="https://sourceforge.net/projects/aat-linux-repository/files/sources/alpine/trigger-rally/trigger-rally-$pkgver.tar.gz
+source="
+ https://sourceforge.net/projects/aat-linux-repository/files/sources/alpine/trigger-rally/trigger-rally-$pkgver.tar.gz
+ 0001-fix-sdl2-detection.patch
trigger-rally.desktop
"
builddir="$srcdir/$pkgname-$pkgver/src"
+_datadir="$srcdir/$pkgname-$pkgver/data"
build() {
- make -f GNUmakefile
+ make -f GNUmakefile \
+ exec_prefix=/usr \
+ bindir=/usr/bin \
+ prefix=/usr \
+ OPTIMS=""
}
package() {
@@ -24,18 +31,39 @@ package() {
DESTDIR="$pkgdir" \
exec_prefix=/usr \
bindir=/usr/bin \
- prefix=/usr
+ prefix=/usr \
+ OPTIMS=""
+
+ # Remove residual files not needed for installation
+ rm -r $pkgdir/usr/share/applications
+ rm -r $pkgdir/usr/share/metainfo
+ # Install desktop file
install -Dm644 "$srcdir"/trigger-rally.desktop \
"$pkgdir"/usr/share/applications/trigger-rally.desktop
- cd "$srcdir/$pkgname-$pkgver/data/icon"
- install -Dm644 trigger-16.png "$pkgdir/usr/share/icons/hicolor/16x16/apps/$pkgname.png"
- install -Dm644 trigger-32.png "$pkgdir/usr/share/icons/hicolor/32x32/apps/$pkgname.png"
- install -Dm644 trigger-64.png "$pkgdir/usr/share/icons/hicolor/64x64/apps/$pkgname.png"
- install -Dm644 trigger-rally-icons.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
- install -Dm644 trigger-64.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
- mv "$pkgdir"/usr/bin/trigger-rally.config.defs "$pkgdir"/usr/share/games/trigger-rally/trigger-rally.config.defs
+ # Install icons
+ install -Dm644 $_datadir/icon/trigger-16.png \
+ "$pkgdir/usr/share/icons/hicolor/16x16/apps/trigger-rally.png"
+
+ install -Dm644 $_datadir/icon/trigger-32.png \
+ "$pkgdir/usr/share/icons/hicolor/32x32/apps/trigger-rally.png"
+
+ install -Dm644 $_datadir/icon/trigger-64.png \
+ "$pkgdir/usr/share/icons/hicolor/64x64/apps/trigger-rally.png"
+
+ install -Dm644 $_datadir/icon/trigger-rally-icons.svg \
+ "$pkgdir/usr/share/icons/hicolor/scalable/apps/trigger-rally.svg"
+
+ install -Dm644 $_datadir/icon/trigger-64.png \
+ "$pkgdir/usr/share/pixmaps/trigger-rally.png"
+
+ install -Dm644 $_datadir/icon/trigger-rally.appdata.xml \
+ "$pkgdir"/usr/share/metainfo/trigger-rally.appdata.xml
+
+ # Move config
+ mv "$pkgdir"/usr/bin/trigger-rally.config.defs \
+ "$pkgdir"/usr/share/games/trigger-rally/trigger-rally.config.defs
}
data() {
@@ -43,5 +71,8 @@ data() {
amove /usr/share/games/trigger-rally
}
-sha512sums="b3d45f64b2ce6104db7af1536ec9568396b36f2a049bf335f43ea715e374cbb91a7ff30940971cf7d6af5215937aef1d94b5966fa23d73d7fa1834ef9e687f79 trigger-rally-0.6.6.1.tar.gz
-14dbf1fa47de53b86ca66ba81c5c47543201b15e5bb5269f99ed80e5e143d3aa6e5bd35a3ca666019d919737e8324bd1756f4a6d7f55a6b9826be454a92e0759 trigger-rally.desktop"
+sha512sums="
+e9324cf2b461a040a061a7e6dbcf29f600dc6a637e11a166efa0d74e47e16f1bd4ec5faddd253a9d5be3bb9a1ebfea790183826d9f056b38647ef287b25186cf trigger-rally-0.6.7.tar.gz
+2150afa09ff0080388fdc4b6c6adc173ae765884e75fab18aa8ce2614f0aab7bba03eb45ee4c4845c58d0498bde4e0723adb1c41ec53ab98fabee1405f982145 0001-fix-sdl2-detection.patch
+14dbf1fa47de53b86ca66ba81c5c47543201b15e5bb5269f99ed80e5e143d3aa6e5bd35a3ca666019d919737e8324bd1756f4a6d7f55a6b9826be454a92e0759 trigger-rally.desktop
+"