1 # vim:set ts=2 sw=2 et:
3 #Contributor: ezzetabi <ezzetabi at gawab dot com>
8 pkgdesc="GeneRally is a great, small racing game."
10 url="http://generally.rscsites.org/"
16 source=(icons.tar.xz msvcp100.dll.tar.xz)
17 md5sums=('8f5a1c01f8820ac45a0db57690233d00'
18 'e4ecdf03883050fb65a199733ed7ef86')
19 noextract=(icons.tar.xz)
24 if [ ! -e source ] ;then
27 wget -O GeneRally_110.zip 'http://gene-rally.com/download/latest/'
29 echo '313ea8fe0341c6b0ee31ef5d064619af GeneRally_110.zip' >md5
32 md5sum --status -c md5 || ( error "Validation failed, please mark the package as out-of-date." && false )
35 install -d -m 755 usr/share/generally usr/share/applications usr/bin \
38 bsdtar xf "$srcdir"/icons.tar.xz
39 ln -s /usr/share/icons/hicolor/48x48/apps/generally.png \
40 usr/share/pixmaps/generally.png
42 cd "$pkgdir"/usr/share/generally
43 bsdtar xf "$startdir"/source/GeneRally_110.zip
44 install -m644 "$srcdir"/msvcp100.dll .
47 find usr/ -type f -exec chmod 644 "{}" \; || return 1
48 find usr/ -type d -exec chmod 755 "{}" \; || return 1
50 #Lets create support files.
51 #############################################################################
52 cd "$pkgdir"/usr/bin || return 1
58 export WINEPREFIX="\$HOME"/.generally/winefs
59 export WINEDLLOVERRIDES="mshtml="
60 export XDG_DATA_HOME=/dev/null
65 if [ ! -d "\$HOME"/.generally ] ;then
66 mkdir -p "\$HOME"/.generally/sounds
68 cd "\$HOME"/.generally
70 ln -s -T /usr/share/generally/lang lang
71 ln -s -T /usr/share/generally/sounds/Default sounds/Default
72 ln -s -T /usr/share/generally/sounds/Funny sounds/Funny
73 ln -s /usr/share/generally/GeneRally.exe GeneRally.exe
74 ln -s /usr/share/generally/TrackEditor.exe TrackEditor.exe
75 ln -s /usr/share/generally/font.bmp font.bmp
76 ln -s /usr/share/generally/readme.txt readme.txt
77 ln -s /usr/share/generally/trackeditor.cur trackeditor.cur
78 ln -s /usr/share/generally/version.txt version.txt
79 ln -s /usr/share/generally/SDL.dll SDL.dll
80 ln -s /usr/share/generally/msvcp100.dll msvcp100.dll
82 cp -ra /usr/share/generally/drivers .
83 cp -ra /usr/share/generally/tracks .
84 cp -ra /usr/share/generally/cars .
85 cp /usr/share/generally/gr.pal .
86 cp /usr/share/generally/gr.ini .
89 cd "\$HOME"/.generally
90 wine ./GeneRally.exe "\$@" &>/dev/null
92 echo Goodbye from GeneRally!
98 #############################################################################
99 cd "$pkgdir"/usr/share/applications
100 cat <<EOF >generally.desktop
106 Categories=Game;ActionGame;
108 GenericName=Race game
112 chmod 644 generally.desktop
113 #############################################################################