# Description: A FOSS clone of Transport Tycoon Deluxe. # URL: http://www.openttd.org # Maintainer: Erich Eckner, crux at eckner dot net # Packager: Lennart Sauerbeck, devel at lennart dot sauerbeck dot org # Depends on: libsdl libpng fontconfig lzo name=openttd-git version=29458.f11cd8f2d gfxversion=0.5.4 sfxversion=0.2.3 msxversion=0.3.1 release=1 source=(http://bundles.openttdcoop.org/opengfx/releases/$gfxversion/opengfx-$gfxversion.zip http://bundles.openttdcoop.org/opensfx/releases/$sfxversion/opensfx-$sfxversion.zip http://bundles.openttdcoop.org/openmsx/releases/$msxversion/openmsx-$msxversion.zip signaltunnel.patch sloped-stations.patch underground.patch opntitle.dat https://github.com/OpenTTD/OpenTTD/archive/${version##*.}.tar.gz) build() { tar -xf opengfx-$gfxversion.tar cd OpenTTD-${version##*.}* ISODATE=$(find {src,bin} -type f -printf "%TY%Tm%Td\n" | sort -n | tail -n1) HASH=$(find {src,bin} -type f -exec sha512sum {} \; | sort | sha512sum - | cut -d' ' -f1) SHORTHASH=$(echo ${HASH} | cut -c1-8) printf '%s\t%s\t%s\t%s\t%s\t%s\n' \ "${ISODATE}-ewe-g${SHORTHASH}" \ "${ISODATE}" \ "0" \ "${HASH}" \ 0 \ 0 \ > .ottdrev sed -i ' s,"\$ROOT_DIR/\.git","/dev/does/not/exist", ' findversion.sh patch -p1 -i "$SRC/signaltunnel.patch" # patch -p1 -i "$SRC/sloped-stations.patch" # broken! patch -p1 -i "$SRC/underground.patch" # broken? sed -i ' s/multiplayer\.txt/multiplayer.md/g ' Makefile.bundle.in ./configure --prefix-dir=/usr \ --binary-dir=bin \ --data-dir=share/openttd \ --icon-dir=share/openttd \ --man-dir=share/man/man6 \ --personal-dir=.openttd \ --install-dir=$PKG make make DESTDIR=$PKG install # Install OpenGFX install -d $PKG/usr/share/openttd/data/opengfx-$gfxversion install -m 644 $SRC/opengfx-$gfxversion/* $PKG/usr/share/openttd/data/opengfx-$gfxversion chown -R root:root $PKG/usr/share/openttd/data/opengfx-$gfxversion # Install OpenSFX install -d $PKG/usr/share/openttd/data/opensfx-$sfxversion install -m 644 $SRC/opensfx-$sfxversion/* $PKG/usr/share/openttd/data/opensfx-$sfxversion chown -R root:root $PKG/usr/share/openttd/data/opensfx-$sfxversion # Install OpenMSX install -d $PKG/usr/share/openttd/gm install -m 644 $SRC/openmsx-$msxversion/* $PKG/usr/share/openttd/gm chown -R root:root $PKG/usr/share/openttd/gm/* # Remove unnecessary languages cp $PKG/usr/share/openttd/lang/{english,german}.lng $SRC rm $PKG/usr/share/openttd/lang/* install -m 644 $SRC/{english,german}.lng $PKG/usr/share/openttd/lang # Remove junk rm -rf $PKG/usr/share/doc rm -rf $PKG/usr/share/openttd/scripts rm $PKG/usr/share/openttd/data/opengfx-$gfxversion/{changelog,readme}.txt rm $PKG/usr/share/openttd/data/opensfx-$sfxversion/{changelog,readme}.txt rm $PKG/usr/share/openttd/gm/{changelog,readme}.txt }