summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/opengfx/APKBUILD34
-rw-r--r--user/opengfx/Makefile.patch31
2 files changed, 65 insertions, 0 deletions
diff --git a/user/opengfx/APKBUILD b/user/opengfx/APKBUILD
new file mode 100644
index 000000000..b0ab22c55
--- /dev/null
+++ b/user/opengfx/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=opengfx
+pkgver=0.5.4
+pkgrel=0
+pkgdesc="Graphics files for OpenTTD"
+url="https://www.openttd.org/en/"
+arch="noarch"
+options="!check" # Requires GIMP
+license="GPL-2.0-only"
+depends=""
+makedepends="grfcodec nml"
+subpackages=""
+source="http://bundles.openttdcoop.org/opengfx/releases/$pkgver/$pkgname-$pkgver-source.tar.xz
+ Makefile.patch
+ "
+builddir="$srcdir/$pkgname-$pkgver-source"
+
+build() {
+ cd "$builddir"
+ make GIMP="" _V="" bundle_tar
+}
+
+package() {
+ cd "$builddir"
+ local _file
+ for _file in *.grf opengfx.obg; do
+ install -D -m644 -g games $_file \
+ "$pkgdir"/usr/share/games/openttd/data/$_file
+ done
+}
+
+sha512sums="42f8438c747b42a77cf9d86c5da60ce3ce84ed347d714c345f3871806f9e35f2ed4729b445e0ee319f3e2edd53458dfbaad5ca42e389c3a2e800bce19223cdb1 opengfx-0.5.4-source.tar.xz
+f2cd513b6b244fcdd522e488c3becd27164f622f0bc723bd1f704ce1e76419ac628425cf3fc437beb50f851735923e85eae8a3f70e828f58edff4d632784bbf9 Makefile.patch"
diff --git a/user/opengfx/Makefile.patch b/user/opengfx/Makefile.patch
new file mode 100644
index 000000000..169df9668
--- /dev/null
+++ b/user/opengfx/Makefile.patch
@@ -0,0 +1,31 @@
+--- opengfx-0.5.3-source/Makefile
++++ opengfx-0.5.3-source/Makefile
+@@ -99,8 +99,8 @@
+ AWK ?= awk
+ GREP ?= grep
+ PYTHON ?= python
+-UNIX2DOS ?= $(shell which unix2dos)
+-UNIX2DOS_FLAGS ?= $(shell [ -n $(UNIX2DOS) ] && $(UNIX2DOS) -q --version 2>/dev/null && echo "-q" || echo "")
++UNIX2DOS ?= $(shell which unix2dos 2>/dev/null)
++UNIX2DOS_FLAGS ?= $(shell [ -n $(UNIX2DOS) ] && $(UNIX2DOS) -q --version 2>/dev/null >&2 && echo "-q" || echo "")
+
+ # Graphics processing
+ GIMP ?= gimp
+@@ -196,7 +196,7 @@
+ endif
+
+ # Days of commit since 2000-1-1 00-00
+-REPO_DAYS_SINCE_2000 ?= $(shell $(PYTHON) -c "from datetime import date; print (date(`echo "$(REPO_DATE)" | sed s/-/,/g | sed s/,0/,/g`)-date(2000,1,1)).days")
++REPO_DAYS_SINCE_2000 ?= $(shell $(PYTHON) -c "from datetime import date; print ((date(`echo "$(REPO_DATE)" | sed s/-/,/g | sed s/,0/,/g`)-date(2000,1,1)).days)")
+
+ # Filename addition, if we're not building the default branch
+ REPO_BRANCH_STRING ?= $(shell if [ "$(REPO_BRANCH)" = "$(DEFAULT_BRANCH_NAME)" ]; then echo ""; else echo "-$(REPO_BRANCH)"; fi)
+@@ -719,7 +719,7 @@
+ $(_E)
+ endif
+ $(_E) "Release:"
+- $(_E) "bananas: Upload bundle to BaNaNaS
++ $(_E) "bananas: Upload bundle to BaNaNaS"
+ $(_E)
+ $(_E) "Valid command line variables are:"
+ $(_E) "Helper programmes:"