2014-05-09 13:22:29 +00:00
|
|
|
# $Id$
|
2013-05-22 01:46:21 +00:00
|
|
|
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
|
|
|
|
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
|
|
|
|
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
|
|
|
|
# Contributor: Gilles Gagniard <gilles@gagniard.org>
|
|
|
|
# Contributor: JD Steffen <jd at steffennet dot org>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - get rid of a bad gcc flag in Makefile
|
|
|
|
|
|
|
|
pkgname=simutrans
|
2016-02-17 00:39:07 +00:00
|
|
|
pkgver=120.1.3
|
|
|
|
_pkgver=120-1-3
|
2015-12-14 13:50:04 +00:00
|
|
|
pkgrel=1
|
2013-05-22 01:46:21 +00:00
|
|
|
pkgdesc="An open source transportation simulation game"
|
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
url="http://simutrans.com/"
|
2015-08-24 03:24:29 +00:00
|
|
|
license=('custom:Artistic')
|
2013-05-22 01:46:21 +00:00
|
|
|
depends=('gcc-libs' 'zlib' 'sdl_mixer' 'bzip2' 'simutrans-pak64')
|
2014-11-21 01:44:51 +00:00
|
|
|
makedepends=('imagemagick' 'dos2unix')
|
2013-05-22 01:46:21 +00:00
|
|
|
optdepends=('timidity++: play MIDI music')
|
|
|
|
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-src-$_pkgver.zip
|
2014-11-21 01:44:51 +00:00
|
|
|
no-optimise.patch
|
2013-05-22 01:46:21 +00:00
|
|
|
settings-folder.patch
|
|
|
|
path-for-game-data.patch
|
|
|
|
config.patch
|
|
|
|
simutrans.desktop)
|
2016-02-17 00:39:07 +00:00
|
|
|
md5sums=('693c44eceda2bdb30249253387b838d8'
|
2016-01-31 07:01:15 +00:00
|
|
|
'4ab1d787772fc279181c1bc89dd42bf9'
|
2013-05-22 01:46:21 +00:00
|
|
|
'c87d9a9910bc371df5d50f7f1ec298bb'
|
2014-05-09 13:22:29 +00:00
|
|
|
'e716340d372af264ca05510facfe5d2c'
|
2014-11-21 01:44:51 +00:00
|
|
|
'c2f4e494168e235380373974c91a0803'
|
2013-05-22 01:46:21 +00:00
|
|
|
'f41f7a08ad517ef2b60412859eb49963')
|
|
|
|
|
2014-05-09 13:22:29 +00:00
|
|
|
prepare() {
|
2013-05-22 01:46:21 +00:00
|
|
|
cd "$srcdir"
|
|
|
|
|
2014-11-21 01:44:51 +00:00
|
|
|
# Some files are distributed in DOS format
|
|
|
|
find . -type f -exec dos2unix -q '{}' \;
|
|
|
|
|
|
|
|
# Don't overwrite default optimization flags
|
|
|
|
patch -Np1 -i no-optimise.patch
|
|
|
|
|
|
|
|
# Adjust paths
|
|
|
|
patch -Np0 -i settings-folder.patch
|
|
|
|
patch -Np1 -i path-for-game-data.patch
|
|
|
|
|
|
|
|
# Configure the build process
|
2013-05-22 01:46:21 +00:00
|
|
|
cp config.template config.default
|
2014-11-21 01:44:51 +00:00
|
|
|
patch -Np0 -i config.patch
|
2014-05-09 13:22:29 +00:00
|
|
|
|
2013-05-22 01:46:21 +00:00
|
|
|
sed -i 's/-minline-all-stringops/-O3/' Makefile
|
2014-05-09 13:22:29 +00:00
|
|
|
}
|
2013-05-22 01:46:21 +00:00
|
|
|
|
2014-05-09 13:22:29 +00:00
|
|
|
build() {
|
|
|
|
cd "$srcdir"
|
|
|
|
convert simutrans.ico -alpha on simutrans.png
|
2013-05-22 01:46:21 +00:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$srcdir"
|
|
|
|
|
|
|
|
#binary
|
|
|
|
install -Dm755 build/default/sim "$pkgdir/usr/bin/simutrans"
|
|
|
|
|
|
|
|
#data
|
|
|
|
mkdir -p "$pkgdir/usr/share/games/$pkgname"
|
2015-08-24 03:24:29 +00:00
|
|
|
cp -r $pkgname/{config,font,music,text,themes} "$pkgdir/usr/share/games/$pkgname"
|
2013-05-22 01:46:21 +00:00
|
|
|
|
|
|
|
#desktop file and icon
|
|
|
|
install -Dm644 simutrans.png "$pkgdir/usr/share/pixmaps/simutrans.png"
|
|
|
|
install -Dm644 simutrans.desktop "$pkgdir/usr/share/applications/simutrans.desktop"
|
2015-08-24 03:24:29 +00:00
|
|
|
|
|
|
|
#license
|
|
|
|
install -Dm644 simutrans/license.txt "$pkgdir/usr/share/licenses/simutrans/license.txt"
|
2013-05-22 01:46:21 +00:00
|
|
|
}
|