aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/sgt-puzzles/0001-change-desktop-variables-according-to-prefix.patch13
-rw-r--r--testing/sgt-puzzles/APKBUILD63
2 files changed, 76 insertions, 0 deletions
diff --git a/testing/sgt-puzzles/0001-change-desktop-variables-according-to-prefix.patch b/testing/sgt-puzzles/0001-change-desktop-variables-according-to-prefix.patch
new file mode 100644
index 0000000000..9fb8d6cdcd
--- /dev/null
+++ b/testing/sgt-puzzles/0001-change-desktop-variables-according-to-prefix.patch
@@ -0,0 +1,13 @@
+--- a/puzzle.desktop.in
++++ b/puzzle.desktop.in
+@@ -3,8 +3,8 @@
+ Type=Application
+ Name=${displayname}
+ Comment=${description}
+-Exec=${binary_name}
+-Icon=${binary_name}-48d24
++Exec=sgt-${binary_name}
++Icon=sgt-${binary_name}
+ StartupNotify=false
+ Categories=Game;LogicGame;
+ Terminal=false
diff --git a/testing/sgt-puzzles/APKBUILD b/testing/sgt-puzzles/APKBUILD
new file mode 100644
index 0000000000..8b7e139db5
--- /dev/null
+++ b/testing/sgt-puzzles/APKBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
+pkgname=sgt-puzzles
+_pkgname=puzzles
+pkgver=0_git20211031
+_pkgver=20211031
+_commit=640f923
+pkgrel=0
+pkgdesc="Simon Tatham's Portable Puzzle Collection"
+url="https://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
+arch="all"
+license="GPL-2.0-or-later"
+makedepends="cmake imagemagick gtk+3.0-dev perl-dev"
+options="!check" # No testsuite
+
+# We should append "sgt-" prefix to all the programs and icons.
+# That way, we avoid conflicts with other programs
+source="
+ https://sourceforge.net/projects/aat-linux-repository/files/sources/alpine/sgt-puzzles/puzzles-$_pkgver.$_commit.tar.gz
+ 0001-change-desktop-variables-according-to-prefix.patch
+ "
+_icondir="usr/share/pixmaps"
+_desktopdir="usr/share/applications"
+builddir="$srcdir/$_pkgname-$_pkgver.$_commit"
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake -B build \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ $CMAKE_CROSSOPTS .
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --build build --target install
+
+ # Append "sgt-" prefix to icon files
+ # Move icons to hicolor directory, like upstream distributions do
+ # And remove "-48d24" suffix
+ mkdir -p "$pkgdir"/usr/share/icons/hicolor/48x48/apps
+ for f in "$pkgdir"/"$_icondir"/*.png
+ do
+ mv -v -- "$f" \
+ "$pkgdir"/usr/share/icons/hicolor/48x48/apps/sgt-"$(basename -- $f | sed 's/-48d24//g')"
+ done
+
+ # Append "sgt-" prefix to desktop files
+ for f in "$pkgdir"/"$_desktopdir"/*.desktop
+ do
+ mv -v -- "$f" \
+ "$pkgdir"/usr/share/applications/sgt-"$(basename -- $f)"
+ done
+
+ # Remove redundant directory
+ rm -r "$pkgdir"/usr/share/pixmaps
+}
+
+sha512sums="
+1431912593337c73089d1d7daa47457532a3c9d788484fb70b412cc1641deae6685515f0ea53fa1d66590569eba9fd8923a32590494accacba64c0845794fd1a puzzles-20211031.640f923.tar.gz
+ebe33479a779abf9cd0ea12232ab2319fa279ba467ee635460962eb714c87f2a87e82b160fc43665b0e9e39b5ba72d6bcc2c0cb35abe0adde6de40c18775bee6 0001-change-desktop-variables-according-to-prefix.patch
+"