updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / duke3d-svn / PKGBUILD
blob3c6144ce50311ecc66b79edfb9cc9c5d489264b4
1 # Contributor: erm67
2 arch=(i686)
3 pkgname=duke3d-svn
4 pkgver=187
5 pkgrel=2
6 pkgdesc="Icculus.org port of the famous 3d Realms game. This will checkout and package the latest SVN version."
7 url="http://icculus.org/projects/duke3d/"
8 license='GPL'
10 depends=('sdl' 'sdl_mixer')
11 makedepends=('subversion')
12 conflicts=()
13 provides=()
14 install=('duke3d-svn.install')
16 source=(duke3d-svn.png \
17         duke3d-svn.desktop \
18         helper.sh)
19 md5sums=('820c00ce7a34f7b4495163dedb06ee8e' 'c10aba109900e33ca66949c296ec94cd' \
20          'f9395546b2edbfca31c799345d7c4cf5')
22 _svntrunk=svn://svn.icculus.org/duke3d/
23 _svnmod=duke3d
25 build() {
26   cd $startdir/src
28   if [ -d $_svnmod/.svn ]; then
29     (cd $_svnmod && svn up -r $pkgver)
30   else
31     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
32   fi
34   msg "SVN checkout done or server timeout"
35   msg "Starting make..."
37   cp -r duke3d/trunk/source/ $_svnmod-build
38   cd $startdir/src/$_svnmod-build
39   # fix compiler flags
40   sed -i -e 's|-O3|-O3 -march=i686 -mtune=generic|' Makefile
41   sed -i -e 's|-O3|-O3 -march=i686 -mtune=generic|' buildengine/Makefile
42   sed -i -e 's|-g||g' Makefile
43   sed -i -e 's|-g||g' buildengine/Makefile
44  unset CFLAGS
45  unset LDFLAGS
46   make || return 1
47   mkdir -p $startdir/pkg/usr/share/{applications,pixmaps,$pkgname}
48   install -m755 -D duke3d $startdir/pkg/usr/share/$pkgname/$pkgname-bin
49   cp $startdir/helper.sh duke3d.sh
50   sed -i -e "s|GAMEDIR|/usr/share/$pkgname/|" duke3d.sh
51   sed -i -e "s|BINARY|./$pkgname-bin|" duke3d.sh
52   install -m755 -D duke3d.sh $startdir/pkg/usr/bin/$pkgname
53   install -m755 -D build $startdir/pkg/usr/share/$pkgname/$pkgname-build-bin
54   cp $startdir/helper.sh build.sh
55   sed -i -e "s|GAMEDIR|/usr/share/$pkgname/|" build.sh
56   sed -i -e "s|BINARY|./$pkgname-build-bin|" build.sh
57   install -m755 -D build.sh $startdir/pkg/usr/bin/$pkgname-build
58   install -m644 -D $startdir/$pkgname.png $startdir/pkg/usr/share/pixmaps
59   install -m644 -D $startdir/$pkgname.desktop $startdir/pkg/usr/share/applications
60   install -m644 -D buildengine/BUILDLIC.TXT \
61   $startdir/pkg/usr/share/licenses/custom/build/BUILDLIC.TXT
63   rm -rf $startdir/src/$_svnmod-build
65 # vim:syntax=sh