3 if [ -f ./pkgvrs ]; then
6 until [[ "$pkgvrs" =~ ^[0-9]+(\.[0-9]+)*(-(RC|beta)[0-9]+)?$ ]]; do
14 echo -n 'Choose version: '
17 if [[ "$pkgvrs" =~ ^(1\.1\.5|1\.1\.4|1\.1\.3|1\.1\.2|1\.1\.1|1\.1\.0|1\.0\.5)$ ]]; then
20 echo -n 'Unverified version, type md5sum: '
24 if test -f ./pkgvrs; then rm pkgvrs; else echo "$pkgvrs" > pkgvrs; fi
28 if test "$pkgvrs"; then pkgver=$(echo "$pkgvrs" | sed 's/-\|:/_/g'); fi
30 pkgdesc="OpenTTD is an Open Source clone of Transport Tycoon Deluxe"
31 arch=('i686' 'x86_64')
32 url="http://www.openttd.org"
34 depends=(libpng sdl fontconfig icu)
37 optdepends=('openttd-opengfx: free graphics' 'openttd-opensfx: free soundset' 'openttd-openmsx: free musicset')
38 if [ "$pkgvrs" == '1.1.5' ]; then
39 if [ "${CARCH}" = 'x86_64' ] ; then
41 _md5_tar='08c1d002138db2524ab6254b6d0ebfdb'
44 _md5_tar='7bf74c7c7ad61e9a7efcdf43900b8776'
46 elif [ "$pkgvrs" == '1.1.4' ]; then
47 if [ "${CARCH}" = 'x86_64' ] ; then
49 _md5_tar='070340fa7d4d5ebfb47fd806cde5489a'
52 _md5_tar='a7feb7a1c1f7187abc8c17365194f36a'
54 elif [ "$pkgvrs" == '1.1.3' ]; then
55 if [ "${CARCH}" = 'x86_64' ] ; then
57 _md5_tar='605da3675d3f56ce7bcaac7cc6ec093e'
60 _md5_tar='4cd9fcb9ad88a66dfb96b22f23b75b13'
62 elif [ "$pkgvrs" == '1.1.2' ]; then
63 if [ "${CARCH}" = 'x86_64' ] ; then
65 _md5_tar='f19cd685f6043be7654792537e42f903'
68 _md5_tar='dc1d92453e25e3ab1699fc587124aad7'
70 elif [ "$pkgvrs" == '1.1.1' ]; then
71 if [ "${CARCH}" = 'x86_64' ] ; then
73 _md5_tar='16dd695eaeff5db52a9e8a395e59387a'
76 _md5_tar='005b1a31086546c418295f4ebfacde10'
78 elif [ "$pkgvrs" == '1.1.0' ]; then
79 if [ "${CARCH}" = 'x86_64' ] ; then
81 _md5_tar='f8645cb8fc7650ac7f71659c69f65fe0'
84 _md5_tar='0d1c3b56f7421ca1a264a23cb354a7e9'
86 elif [ "$pkgvrs" == '1.0.5' ]; then
87 if [ "${CARCH}" = 'x86_64' ] ; then
89 _md5_tar='9f9068b8b35f70f9c534fa22ac6eac2a'
92 _md5_tar='397d35173d5f70f40591940378723200'
95 if [ "${CARCH}" = 'x86_64' ] ; then
104 source=(http://binaries.openttd.org/releases/${pkgvrs}/openttd-${pkgvrs}-linux-generic-${_arch}.tar.xz)
105 md5sums=(${_md5_tar})
108 cd ${srcdir}/openttd-${pkgvrs}-linux-generic-${_arch}
110 mkdir -p ${pkgdir}/usr/share/applications/
111 mv media/openttd.desktop ${pkgdir}/usr/share/applications/
113 mkdir -p ${pkgdir}/usr/share/doc/openttd/
114 mv docs/* ${pkgdir}/usr/share/doc/openttd/
116 mkdir -p ${pkgdir}/usr/share/man/man6/
117 mv man/openttd.6.gz ${pkgdir}/usr/share/man/man6/
119 mkdir -p ${pkgdir}/usr/share/pixmaps/
120 mv media/openttd.32.xpm ${pkgdir}/usr/share/pixmaps/
122 for isize in 16 32 48 64 128 256 ; do
123 mkdir -p ${pkgdir}/usr/share/icons/hicolor/${isize}x${isize}/apps/
124 mv media/openttd.${isize}.png ${pkgdir}/usr/share/icons/hicolor/${isize}x${isize}/apps/openttd.png
127 mkdir -p ${pkgdir}/usr/share/openttd
128 for d in openttd ai data gm lang scripts ; do
129 mv $d ${pkgdir}/usr/share/openttd/
132 mkdir -p ${pkgdir}/usr/bin/
133 echo -e '#/bin/sh\ncd /usr/share/openttd && ./openttd $@' > ${pkgdir}/usr/bin/openttd
135 chmod +xr ${pkgdir}/usr/bin/openttd
136 cd ${pkgdir}/usr/share/openttd