updated on Sat Jan 21 20:03:50 UTC 2012
[aur-mirror.git] / enigma-dev-svn / PKGBUILD
blob208811c36725dbce49598248193bad24fefdd4d2
1 # Maintainer: RetroX <classixretrox@gmail.com>
2 pkgname=enigma-dev-svn
3 pkgver=758
4 pkgrel=1
5 pkgdesc="An open-source alternative to YoYoGame's Game Maker, written in C++."
6 pkglongdesc="ENIGMA Development Environment
8 An open-source alternative to YoYoGame's Game Maker, written in C++."
9 pkgdebsection="devel"
10 arch=('i386' 'i486' 'i586' 'i686' 'x86_64' 'amd64')
11 url="http://enigma-dev.org"
12 license=('GPL')
13 depends=('libgl' 'libx11' 'mesa' 'zlib' 'openal' 'gcc' 'make' 'java-runtime>=6' 'gtk2' 'lateralgm')
14 debdepends=('libgl1-mesa-dev' 'libglu1-mesa-dev ' 'libx11-dev' 'libz-dev' 'libopenal-dev' 'libgtk2.0-dev' 'gcc' 'g++' 'make' 'java-common' 'lateralgm')
15 makedepends=('subversion')
16 provides=('enigma-dev')
17 source=()
18 md5sums=()
19 _svntrunk="https://enigma-dev.svn.sourceforge.net/svnroot/enigma-dev/trunk"
20 _svnmod="enigma-dev"
21 install="enigma.install"
22 debpreinst="enigma.preinst"
23 debpostinst="enigma.postinst"
24 debpostrm="enigma.postrm"
25 lzmpostinst="enigma.postinst"
26 export PKGARCH="$PKGARCH"
28 build()
30   cd $srcdir
31   svn co $_svntrunk $_svnmod
33   mkdir -p $pkgdir/opt/enigma
35   cp -r $srcdir/$_svnmod -T $pkgdir/opt/enigma
37   mv $pkgdir/opt/enigma/LinuxExtra/usr $pkgdir/usr
38   rm -rf $pkgdir/opt/enigma/LinuxExtra
40   # ecj . -source 1.6 -classpath /usr/share/java/jna/jna.jar:/usr/share/java/lateralgm/lateralgm.jar:/usr/share/java/svnkit/svnkit.jar && echo
42   chmod -R 755 $pkgdir/opt $pkgdir/usr
43   chmod -R 777 $pkgdir/opt/enigma
44   find $pkgdir/usr -type f -exec chmod 644 {} \;
45   rm $pkgdir/opt/enigma/lgm*.jar
47   cd $pkgdir/opt/enigma
49   compile_flags=''
50   if [[ "$PKGARCH" == "i386" || "$PKGARCH" == "i486" || "$PKGARCH" == "i586" || "$PKGARCH" == "i686" ]]; then
51     compileflags='-m32 -mtune=generic'
52   elif [[ "$PKGARCH" == "amd64" || "$PKGARCH" == "x86_64" ]]; then
53     compileflags='-m64 -mtune=generic'
54   fi
56   make MISCFLAGS="$compileflags" -C CompilerSource
58   cd $pkgdir/opt/enigma
60   for make_GMODE in {Run,Debug,Build,Release}; do
61     for make_dir in {Audio_Systems/*,Graphics_Systems/*}; do
62       if [[ -d "$make_dir" && -f "$make_dir/Config/xlib.ey" ]]; then
63         make $make_GMODE MODE="$make_GMODE" MISCFLAGS="$compileflags" -C ENIGMAsystem/SHELL/$make_dir
64       fi
65     done
66     for make_dir in {Collision_Systems/*,Universal_System,Platforms/xlib}; do
67       if [[ -f "$make_dir/Makefile" ]]; then
68         make $make_GMODE MODE="$make_GMODE" MISCFLAGS="$compileflags" -C ENIGMAsystem/SHELL/$make_dir
69       fi
70     done
71   done
74 package()
76   rm -rf $pkgdir/opt/enigma/{Autoconf,CompilerSource,pluginsource,MacOS}
77   find $pkgdir -name "*.svn" -exec rm -rf {} \; 2> /dev/null || true