updated on Mon Jan 9 16:10:19 UTC 2012
[aur-mirror.git] / theide-svn / PKGBUILD
blobfb3139b02a14ebeac0a01a8c3e7fb659b3f8b7c5
1 # Maintainer: Jan Dolinar <dolik.rce@gmail.com>
3 pkgname=theide-svn
4 pkgver=4382
5 pkgrel=1
6 pkgdesc="Modern IDE designed for developping large U++/C++ applications"
7 arch=('i686' 'x86_64')
8 url="http://www.ultimatepp.org"
9 license=('BSD')
10 groups=()
11 depends=('libnotify')
12 makedepends=('subversion')
13 provides=('theide')
14 conflicts=('theide')
15 replaces=()
16 backup=()
17 options=(!makeflags emptydirs)
18 install=
19 source=('license.txt')
20 noextract=()
22 _svntrunk="http://upp-mirror.googlecode.com/svn/trunk/"
23 # many users have already working copy of U++ on their system, so they
24 # can use it for building (e.g. to save network traffic or to speed up
25 # things) by setting $UPPSVN environment variable
26 if [ "x$UPPSVN" != "x" ]
27 then
28   _svnmod=$UPPSVN
29 else
30   _svnmod="$srcdir/uppsvn"
33 build() {
34   cd "$srcdir"
35   #get sources
36   for n in uppsrc uppbox/lpbuild
37   do
38     if [ -d $_svnmod/$n/.svn ]; then
39       (cd $_svnmod/$n && svn up -r $pkgver)
40     else
41       svn co $_svntrunk$n/ --config-dir ./ -r $pkgver $_svnmod/$n
42     fi
43   done
44   msg2 "SVN checkout done (or server timeout)"
45   #prepare copy for building
46   rm -rf "$srcdir/build"
47   mkdir "$srcdir/build"
48   cp -a "$_svnmod/uppsrc" "$srcdir/build/"
49   cd "$srcdir/build"
50   if [ -d "$srcdir/_out" ]
51   then
52     _fast="FAST=N" # to be safe if no header files changed
53   else
54     _fast="FAST=Y"
55   fi
56   #build
57   echo "#define IDE_VERSION \"$pkgver-Arch\"" > uppsrc/ide/version.h
58   msg2 "Building $pkgname..."
59   make -f "$_svnmod/uppbox/lpbuild/Makefile" PKG=ide FLAGS="GCC GUI" BINPREFIX="$srcdir/_out/bin/the" BINEXT="" NESTS="uppsrc" OBJDIR="$srcdir/_out" $_fast
60   #clean-up
61   rm -rf "$srcdir/build"
64 package(){
65   #install
66   mkdir -p "$pkgdir/usr/bin"
67   cp "$srcdir/_out/bin/theide" "$pkgdir/usr/bin/theide"
68   #license
69   mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
70   cp "$srcdir/license.txt" "$pkgdir/usr/share/licenses/$pkgname"
71   #man page
72   mkdir -p "$pkgdir/usr/share/man/man1"
73   cp "$_svnmod/uppbox/lpbuild/theide.1" "$pkgdir/usr/share/man/man1/theide.1"
74   #desktop entry
75   mkdir -p "$pkgdir/usr/share/applications"
76   cp "$_svnmod/uppbox/lpbuild/theide.desktop" "$pkgdir/usr/share/applications"
77   #icon
78   mkdir -p "$pkgdir/usr/share/pixmaps"
79   cp "$_svnmod/uppsrc/ide/theide-48.png" "$pkgdir/usr/share/pixmaps/theide.png"
80   #fix permissions
81   find "$pkgdir/usr/" -type f -exec chown root:root {} \; -exec chmod 644 {} \;
82   chmod a+x "$pkgdir/usr/bin/theide"
86 md5sums=('b214709f096e4f50d61f50988359241e')