updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / gtkradiant-svn / PKGBUILD
blob740e2421ac7fbe8a30c07642198411cd5e455f9a
2 # Contributor: thoughtcrime
5 pkgname=gtkradiant-svn
6 pkgver=326
7 pkgrel=3
8 pkgdesc="Development version of the level editor, also known as ZeroRadiant"
9 arch=('x86_64' 'i686')
10 url="http://www.qeradiant.com/cgi-bin/trac.cgi/wiki/ZeroRadiant"
11 license=('GPL' 'BSD' 'LGPL')
12 groups=()
13 depends=('gtk2' 'gtkglext>=1.0.0' 'libxml2>=2.0.0' 'zlib>=1.2.0' 'libpng>=1.2.0' 'mhash>=0.9.0')
14 makedepends=('subversion' 'scons>=0.96' 'python>=2.3.0')
15 optdepends=('gtkradiant-gamepack-urt-svn: Urban Terror game pack')
16 provides=('gtkradiant')
17 conflicts=('gtkradiant')
18 replaces=()
19 backup=()
20 options=()
21 install=
22 source=('gtkradiant.sh' 'gtkradiant.desktop' 'gtkradiant.png')
23 noextract=()
24 md5sums=('9f8a741b16d87f97488dfc61c11ceca7'
25          '3314f51c060e142bffa0a9c40a4d8e48'
26          'ee89404891c2fbca799f083efb05e6fd')
29 _svntrunk=https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk
30 _svnmod=GtkRadiant
32 build() {
33   cd "$srcdir"
35   if [ -d $_svnmod/.svn ]; then
36     (cd $_svnmod && svn up -r $pkgver)
37   else
38     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
39   fi
41   msg "SVN checkout done or server timeout"
42   msg "Starting scons..."
44   rm -rf "$srcdir/$_svnmod-build"
45   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
46   cd "$srcdir/$_svnmod-build"
48   #
49   # BUILD
50   #
51   
52   scons
53   
54   # Install everything
55   install -d "$pkgdir/usr/share/"
56   cp "$srcdir/$_svnmod-build/install/" "$pkgdir/usr/share/gtkradiant/" -r
57   
58   
59   # Remove all .svn directories
60   cd "$pkgdir"
61   find . -type d -name .svn -print0 | xargs -0 rm -r
62   
63   # Remove the games directory, the launch script
64   # links it to the home directory. Read it for more
65   # information.
66   rm "$pkgdir/usr/share/gtkradiant/games" -r
67   
68   # Copy the launch script
69   install -Dm755 "$srcdir/gtkradiant.sh" "$pkgdir/usr/bin/gtkradiant"
70   
71   # Copy the menu shortcut and icon
72   install -Dm644 $srcdir/gtkradiant.desktop $pkgdir/usr/share/applications/gtkradiant.desktop
73   install -Dm644 $srcdir/gtkradiant.png $pkgdir/usr/share/pixmaps/gtkradiant.png
74