summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMcModder2020-06-11 22:19:18 +0300
committerMcModder2020-06-11 22:20:19 +0300
commit254f7351c55ce4a633f477654b4f47463590f220 (patch)
tree0744ab92eeae01e1062222a14cc2f53caa9eff4c
parent5ecdc5cf14ac8f77d098750e64d588939ca2dc03 (diff)
downloadaur-254f7351c55ce4a633f477654b4f47463590f220.tar.gz
dirty hack because of configurable GLOBAL_DIR and inconfigurable XX_DESTINATION_DIR. Seems to be working
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD43
2 files changed, 25 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f25dbfbfd116..03434c873bf2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,13 @@
pkgbase = openttd-git
pkgdesc = An engine for running Transport Tycoon Deluxe (latest GIT build)
- pkgver = 24198.edc7ee2cd
+ pkgver = 24263.8ef3d8f58
pkgrel = 1
url = http://openttd.org
arch = i686
arch = x86_64
license = GPL
makedepends = git
+ makedepends = cmake
depends = libpng
depends = sdl2
depends = icu
diff --git a/PKGBUILD b/PKGBUILD
index a47752bfae41..2c975ea9d8bd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: McModder <mcmodder@mcmodder.ru>
pkgname=openttd-git
-pkgver=24198.edc7ee2cd
+pkgver=24263.8ef3d8f58
pkgrel=1
pkgdesc='An engine for running Transport Tycoon Deluxe (latest GIT build)'
arch=('i686' 'x86_64')
@@ -10,7 +10,7 @@ license=('GPL')
depends=('libpng' 'sdl2' 'icu' 'fontconfig' 'lzo' 'hicolor-icon-theme' 'desktop-file-utils' 'xz' 'fluidsynth')
optdepends=('openttd-opengfx: free graphics'
'openttd-opensfx: free soundset')
-makedepends=('git')
+makedepends=('git' 'cmake')
source=("$pkgname::git+https://github.com/OpenTTD/OpenTTD.git")
sha256sums=('SKIP')
@@ -21,30 +21,33 @@ pkgver() {
}
build() {
- cd ${pkgname}
+ cd "$srcdir/$pkgname"
+
+ mkdir -p build
+ cd build
# http://site.icu-project.org/download/61#TOC-Migration-Issues
CXXFLAGS+=' -DU_USING_ICU_NAMESPACE=1'
- ./configure \
- --prefix-dir=/usr \
- --binary-name=${pkgname} \
- --binary-dir=bin \
- --data-dir=share/${pkgname} \
- --install-dir=${pkgdir} \
- --doc-dir=share/doc/${pkgname} \
- --with-fluidsynth \
- --menu-name="OpenTTD-git" \
- --personal-dir=.${pkgname}
-
+ cmake -DCMAKE_INSTALL_PREFIX="/usr" \
+ -DPERSONAL_DIR=".${pkgname}" \
+ -DGLOBAL_DIR="/usr/share/${pkgname}" \
+ ..
make
}
package() {
- cd ${pkgname}
-
- # Makefile.bundle will fail if where will be no readme.txt
- [ ! -f readme.txt ] && cp README.md readme.txt
-
- make install
+ cd "$srcdir/$pkgname/build"
+
+ make install DESTDIR="$pkgdir"
+
+ ## temporary fix
+ ## TODO: Delete when DATA_DESTINATION_DIR, DOCS_DESTINATION_DIR, MAN_DESTINATION_DIR and binary name will be configurable
+ cd "$pkgdir"
+ mv usr/share/games/openttd usr/share/openttd-git
+ mv usr/share/doc/openttd usr/share/doc/openttd-git
+ mv usr/share/man/openttd usr/share/man/openttd-git
+ mv usr/share/man/openttd-git/openttd.6 usr/share/man/openttd-git/openttd-git.6
+ mv usr/bin/openttd usr/bin/openttd-git
+ rm -r usr/share/games
}