updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / stepmania-beta / PKGBUILD
blobcfb411508e3b1462ac71615af504ca3b3a3af122
1 # Maintainer: Devin J. Pohly <djpohly+arch@gmail.com>
2 # Contributor: Thomas Dziedzic < gostrc at gmail >
3 # Contributor: August Gustavsson <august.g |at| telia.com>
4 # Contributor: Travis Nickles <ryoohki7 |at| yahoo.com>
5 # Contributor: Joonas Niilola <juippis |at| roskakori.org>
7 pkgname=stepmania-beta
8 pkgver=4.0b7
9 pkgrel=3
10 pkgdesc='An advanced dance simulation game'
11 arch=('i686' 'x86_64')
12 url="http://www.stepmania.com/"
13 license=('MIT')
14 depends=('ffmpeg' 'gtk2' 'libmad' 'lua' 'mesa' 'libxtst')
15 install=stepmania-beta.install
16 source=(gcc41.patch
17         lua51-2.patch
18         sdl.patch
19         warnings-4.patch
20         gcc-4.3.patch
21         ffmpeg-pixfmt.patch
22         libpng14.patch
23         stat.patch
24         $pkgname.desktop
25         $pkgname.sh
26         $pkgname.xpm)
27 md5sums=('fee3b268bf28a22c57d44bd02aec88e1'
28          'e112302cc41d6f1cd5c668989daf4222'
29          '57f24c097fbd478bf4174a4351d32150'
30          '3d38e8527b576220547a1f66757107be'
31          '796230dbd6dabec993c580895fdf35c8'
32          '54d15727565602e9d20629fb5082f4b5'
33          'aa5f294166f5d3c35326e18f37251f2c'
34          '9385a40b06ce3aa903114b83a26c0681'
35          'a9e8e500781684850db2278417fd2ca0'
36          'ccbdfa06ecfa5554f603cfe318b7bada'
37          '10732965e8abf53ba4b85c63377daf2e')
39 svntrunk="https://svn.stepmania.com/svn/branches/4.0/stepmania"
40 svnmod="stepmania"
41 svnrev=28500
43 build() {
44   cd "$srcdir"
46   if [ -d $svnmod/.svn ]; then
47     (cd $svnmod && svn up -r $svnrev)
48   else
49     svn co $svntrunk --config-dir ./ -r $svnrev $svnmod
50   fi
52   msg "SVN checkout done or server timeout"
53   msg "Starting make..."
55   rm -rf $svnmod-build
56   cp -r $svnmod{,-build}
57   cd $svnmod-build
59   # Apply patches so StepMania will compile with newer versions of ffmpeg,
60   # newer versions of gcc, newer glibc packages, lua 5.1, and newer 
61   # versions of sdl.
62   patch -Np1 -i ../gcc41.patch || return 1
63   patch -Np1 -i ../lua51-2.patch || return 1
64   patch -Np1 -i ../sdl.patch || return 1
65   patch -Np1 -i ../warnings-4.patch || return 1
66   patch -Np1 -i ../gcc-4.3.patch || return 1
67   patch -Np1 -i ../ffmpeg-pixfmt.patch || return 1
68   patch -Np1 -i ../libpng14.patch || return 1
69   patch -Np0 -i ../stat.patch || return 1
71   #automake and autoconf files have been modified
72   aclocal -I autoconf/m4
73   autoconf
74   autoheader
75   touch autoconf/config.rpath
76   automake -a
78   # Build the StepMania source code
79   LDFLAGS="$LDFLAGS -Wl,--as-needed" ./configure --enable-force-oss
80   make || return 1
83 package() {
84   cd "$srcdir/$svnmod-build"
86   # Copy game data to destination
87   make bindir=/opt/$pkgname DESTDIR="$pkgdir" install
89   cp -r Announcers BGAnimations BackgroundEffects BackgroundTransitions CDTitles \
90           Characters Courses Data NoteSkins Packages RandomMovies Songs Themes \
91           "$pkgdir/opt/$pkgname/"
92   cd $pkgdir/opt/$pkgname
93   find $pkgdir/opt/$pkgname -type d -name ".svn" -exec rm -rf '{}' +
94   install -d Logs Save Cache{,/Banners,/Songs} \
95           Data/{LocalProfiles,MachineProfile{,/Edits,/Screenshots}}
97   # Change file permissions so that users in the games group can write save data,
98   # write to log files, and add more content
99   chown -R root:games .
100   chmod -R g+w .
101   chmod 755 stepmania GtkModule.so
102   find -type d -exec chmod g+s '{}' +
104   # Install bash script, desktop entry files, and license info
105   install -D -m755 $srcdir/$pkgname.sh $pkgdir/usr/bin/$pkgname
106   install -D -m644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
107   install -D -m644 $srcdir/$pkgname.xpm $pkgdir/usr/share/pixmaps/$pkgname.xpm
108   install -D -m644 $srcdir/$svnmod-build/Docs/Licenses.txt $pkgdir/usr/share/licenses/$pkgname/Copying.txt