# 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=28279.16cc482d57 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 everything.patch clipboard.grf 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\n' \ "${ISODATE}-ewe-g${SHORTHASH}" \ "${ISODATE}" \ "0" \ "${HASH}" \ > .ottdrev sed -i ' s,"\$ROOT_DIR/\.git","/dev/does/not/exist", ' findversion.sh cat $SRC/everything.patch | \ ( read zeile while read zeile do [[ "${zeile}" == "diff --git a/"* ]] && break done echo "${zeile}" cat ) | \ patch -p1 sed -i ' s/readme\.txt/README.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/* install -m644 $SRC/clipboard.grf $PKG/usr/share/openttd/baseset/ # 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 }