You are not logged in.

#1 2008-11-21 15:40:31

reztho
Member
Registered: 2007-12-16
Posts: 44

[PKGBUILD] simutrans-bin 99.17.1

Months ago I wanted to try this game so since the AUR package isn't working anymore, I made this PKGBUILD. This week I saw the PKGBUILD resting in my hard disk, so here it is since I don't want to adopt the other package or maintain this.

It will install for you the compiled version of simutrans with the 128 bits graphic pack. And I don't know if nowadays the PKGBUILD is working. Use the icon you like for it and change the corresponding md5sum line.

PKGBUILD:

# Contributor: Tom <tomgparchaur@gmail.com>
# Based on an AUR contribution (simutrans) of: Gilles Gagniard <gilles@gagniard.org>
pkgname=simutrans128-bin
_origpkgname=simutrans
pkgver=99.17.1
_pak128_ver=1.4.3_0
pkgrel=1
pkgdesc="Freeware transportation simulator. Compiled binaries version with Pak128 graphics set."
arch=('i686')
url="http://www.simutrans.com"
license=('custom')
makedepends=('findutils' 'coreutils')
depends=('zlib' 'libpng' 'sdl' 'sdl_mixer')
source=(
    "http://downloads.sourceforge.net/${_origpkgname}/simulinux-${pkgver//./-}.zip"
    "http://downloads.sourceforge.net/${_origpkgname}/pak128_${_pak128_ver//./-}-${pkgver//./-}.zip"
    "${_origpkgname}.png"
    "${_origpkgname}.desktop"
       )

build()
{
  # Because the program is originally being packaged in .zip files, permissions must be corrected
  find ${startdir}/src/${_origpkgname} -type f -exec chmod 644 {} \; || return 1
  find ${startdir}/src/${_origpkgname} -type d -exec chmod 755 {} \; || return 1
  chmod 755 ${startdir}/src/${_origpkgname}/${_origpkgname} || return 1

  # Moving the files to the right place
  mkdir -p ${startdir}/pkg/usr/share
  mv ${startdir}/src/${_origpkgname} ${startdir}/pkg/usr/share

  # Linking the binary to /usr/bin
  mkdir -p ${startdir}/pkg/usr/bin
  ln -s /usr/share/${_origpkgname}/${_origpkgname} ${startdir}/pkg/usr/bin/${_origpkgname}

  # Icon and .desktop file
  install -D -m 644 ${startdir}/src/${_origpkgname}.desktop ${startdir}/pkg/usr/share/applications/${_origpkgname}.desktop
  install -D -m 644 ${startdir}/src/${_origpkgname}.png ${startdir}/pkg/usr/share/pixmaps/${_origpkgname}.png

  # The licenses..,
  mkdir -p ${startdir}/pkg/usr/share/licenses/${_origpkgname}
  install -D -m 644 ${startdir}/pkg/usr/share/${_origpkgname}/copyright.txt ${startdir}/pkg/usr/share/licenses/${_origpkgname}/
  install -D -m 644 ${startdir}/pkg/usr/share/${_origpkgname}/licence.txt ${startdir}/pkg/usr/share/licenses/${_origpkgname}/
}


md5sums=('8bcf4b3f9423930e8e5e79ef982c4004'
         'e4795b5adec9af74a1c0261356a6b3d2'
         '7b69608dd812e8bed284b10984c6170e'
         'e503704fabb228125c00d86bd56dfe70')

The .desktop file:

[Desktop Entry]
Encoding=UTF-8
Name=Simutrans
GenericName=Simutrans
Comment=Simutrans is a freeware transportation simulator.
Exec=/usr/bin/simutrans
Icon=/usr/share/pixmaps/simutrans.png
StartupNotify=true
Terminal=false
Type=Application
Categories=Game;Simulation

Offline

Board footer

Powered by FluxBB