3 if [ -f ./pkgvrs ]; then
6 until [[ "$pkgvrs" =~ ^[0-9]+(\.[0-9]+)*(-(RC|beta)[0-9]+)?$ ]]; do
13 echo -n 'Choose version: '
16 if [[ "$pkgvrs" =~ ^(1\.1\.4|1\.1\.3|1\.1\.2|1\.1\.1|1\.1\.0|1\.0\.5)$ ]]; then
19 echo -n 'Unverified version, type md5sum: '
23 if test -f ./pkgvrs; then rm pkgvrs; else echo "$pkgvrs" > pkgvrs; fi
27 if test "$pkgvrs"; then pkgver=$(echo "$pkgvrs" | sed 's/-\|:/_/g'); fi
29 pkgdesc="OpenTTD is an Open Source clone of Transport Tycoon Deluxe"
30 arch=('i686' 'x86_64')
31 url="http://www.openttd.org"
33 depends=(libpng sdl fontconfig icu)
36 optdepends=('openttd-opengfx: free graphics' 'openttd-opensfx: free soundset' 'openttd-openmsx: free musicset')
37 if [ "$pkgvrs" == '1.1.4' ]; then
38 if [ "${CARCH}" = 'x86_64' ] ; then
40 _md5_tar='070340fa7d4d5ebfb47fd806cde5489a'
43 _md5_tar='a7feb7a1c1f7187abc8c17365194f36a'
45 elif [ "$pkgvrs" == '1.1.3' ]; then
46 if [ "${CARCH}" = 'x86_64' ] ; then
48 _md5_tar='605da3675d3f56ce7bcaac7cc6ec093e'
51 _md5_tar='4cd9fcb9ad88a66dfb96b22f23b75b13'
53 elif [ "$pkgvrs" == '1.1.2' ]; then
54 if [ "${CARCH}" = 'x86_64' ] ; then
56 _md5_tar='f19cd685f6043be7654792537e42f903'
59 _md5_tar='dc1d92453e25e3ab1699fc587124aad7'
61 elif [ "$pkgvrs" == '1.1.1' ]; then
62 if [ "${CARCH}" = 'x86_64' ] ; then
64 _md5_tar='16dd695eaeff5db52a9e8a395e59387a'
67 _md5_tar='005b1a31086546c418295f4ebfacde10'
69 elif [ "$pkgvrs" == '1.1.0' ]; then
70 if [ "${CARCH}" = 'x86_64' ] ; then
72 _md5_tar='f8645cb8fc7650ac7f71659c69f65fe0'
75 _md5_tar='0d1c3b56f7421ca1a264a23cb354a7e9'
77 elif [ "$pkgvrs" == '1.0.5' ]; then
78 if [ "${CARCH}" = 'x86_64' ] ; then
80 _md5_tar='9f9068b8b35f70f9c534fa22ac6eac2a'
83 _md5_tar='397d35173d5f70f40591940378723200'
86 if [ "${CARCH}" = 'x86_64' ] ; then
95 source=(http://binaries.openttd.org/releases/${pkgvrs}/openttd-${pkgvrs}-linux-generic-${_arch}.tar.xz)
99 cd ${srcdir}/openttd-${pkgvrs}-linux-generic-${_arch}
101 mkdir -p ${pkgdir}/usr/share/applications/
102 mv media/openttd.desktop ${pkgdir}/usr/share/applications/
104 mkdir -p ${pkgdir}/usr/share/doc/openttd/
105 mv docs/* ${pkgdir}/usr/share/doc/openttd/
107 mkdir -p ${pkgdir}/usr/share/man/man6/
108 mv man/openttd.6.gz ${pkgdir}/usr/share/man/man6/
110 mkdir -p ${pkgdir}/usr/share/pixmaps/
111 mv media/openttd.32.xpm ${pkgdir}/usr/share/pixmaps/
113 for isize in 16 32 48 64 128 256 ; do
114 mkdir -p ${pkgdir}/usr/share/icons/hicolor/${isize}x${isize}/apps/
115 mv media/openttd.${isize}.png ${pkgdir}/usr/share/icons/hicolor/${isize}x${isize}/apps/openttd.png
118 mkdir -p ${pkgdir}/usr/share/openttd
119 for d in openttd ai data gm lang scripts ; do
120 mv $d ${pkgdir}/usr/share/openttd/
123 mkdir -p ${pkgdir}/usr/bin/
124 echo -e '#/bin/sh\ncd /usr/share/openttd && ./openttd $@' > ${pkgdir}/usr/bin/openttd
126 chmod +xr ${pkgdir}/usr/bin/openttd
127 cd ${pkgdir}/usr/share/openttd