updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / planeshift-svn / PKGBUILD
blob4332dd803b723f13f0d425914f5c8a37a0f576b6
1 # Contributor: Andrea Scarpino <bash.lnx@gmail.com>
2 # Contributor: Darwin Bautista <djclue917@gmail.com>
3  
4 pkgname=planeshift-svn
5 pkgver=2360
6 pkgrel=1
7 pkgdesc="Open source and cross-platform 3D Fantasy MMORPG"
8 url="http://www.planeshift.it/"
9 arch=('i686' 'x86_64')
10 license=('GPL' 'custom:PlaneShift Content License')
11 depends=('crystalspace-1.4branch-svn' 'cg-toolkit')
12 makedepends=('ftjam' 'subversion')
13 provides=('planeshift')
14 conflicts=('planeshift')
15 install=planeshift.install
16 source=(planeshift.desktop
17         planeshiftsetup.desktop
18         planeshiftupdater.desktop
19         planeshift.license
20         psclient.sh
21         pssetup.sh
22         psupdater.sh)
23     
24 md5sums=('5be27f6e51c8edff591aa1fdc668b7e9'
25          'e75381f677b5d2ae331d0e4e742ee21a'
26          '228193984ba13ba04c983a9c8161edae'
27          'dbac9cf5bfb63463bcb2b5ea09b00586'
28          '845b4ac589fdf361696245b796bd12f1'
29          '7f1d3fe855658817d4c0498851fb4857'
30          '9852e63d7484674e330f440603c4f4ab')
32 _svntrunk=https://planeshift.svn.sourceforge.net/svnroot/planeshift/stable
33 _svnmod=planeshift
35 build() {
37   #Grab the sources with svn
38   cd $srcdir
39   if [ -d $_svnmod/.svn ]; then
40     (cd $_svnmod && svn up -r $pkgver) || return 1
41   else
42     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod || return 1
43   fi
44   msg "SVN checkout done or server timeout"
45   msg "Starting make..."
46   rm -r "$srcdir/$_svnmod-build"
47   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
48   cd "$srcdir/$_svnmod-build"
49   
50   #Build planeshift
51   ./autogen.sh
52   ./configure --prefix=/opt/PlaneShift --enable-separate-debug-info=no
53   jam -q client psupdater || return 1
54   
55   #Planeshift installer is broken so we install manually
56   mkdir -p $pkgdir/opt/PlaneShift
57   cp -rt $pkgdir/opt/PlaneShift psclient pssetup psupdater psclient.cfg pssetup.cfg vfs.cfg || return 1
58   
59   #We create a speciall config file for the updater, that tells it NOT to overwrite our binaries
60   echo "Update.Platform=false" > $pkgdir/opt/PlaneShift/psupdater.cfg
61   
62   #Planeshift uses the directoy its in, so we set permissions to allow games group to update and run planeshift.
63   chown -R root:games $pkgdir/opt/PlaneShift || return 1
64   find $pkgdir/opt/PlaneShift -type f -exec chmod 664 {} + || return 1
65   find $pkgdir/opt/PlaneShift -type d -exec chmod 775 {} + || return 1
66   chmod 775 $pkgdir/opt/PlaneShift/psclient $pkgdir/opt/PlaneShift/pssetup $pkgdir/opt/PlaneShift/psupdater
67   
68   #Copy the icons and .desktop files
69   mkdir -p $pkgdir/opt/PlaneShift/support/icons
70   cp support/icons/*.png $pkgdir/opt/PlaneShift/support/icons/
71   install -d -m755 $pkgdir/usr/share/applications/
72   install -D -m644 $srcdir/*.desktop $pkgdir/usr/share/applications/
73   
74   #Install the License
75   install -D -m644 $srcdir/planeshift.license $pkgdir/usr/share/licenses/planeshift/COPYING
76   
77   #Copy the bin scripts
78   install -D -m755 $srcdir/psclient.sh $pkgdir/usr/bin/psclient
79   install -D -m755 $srcdir/pssetup.sh $pkgdir/usr/bin/pssetup
80   install -D -m755 $srcdir/psupdater.sh $pkgdir/usr/bin/psupdater
81   
84 # vim:set ts=2 sw=2 et: