summaryrefslogtreecommitdiff
path: root/pcr/upp-svn/PKGBUILD
blob: 1a5a50d4b5daf5b55a11c43add4848065cbb76ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Contributor: Jan Dolinar <dolik.rce@gmail.com>
# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>

pkgname=upp-svn
pkgver=5554
pkgrel=1
pkgdesc="Radical and innovative multiplatform C++ framework (known as U++)"
arch=('any')
url="http://www.ultimatepp.org"
license=('BSD')
groups=()
depends=('gcc-libs' 'libpng' 'libxft' 'theide')
makedepends=('subversion')
optdepends=('libnotify: Enables compiling gtk-styled apps')
provides=('upp')
conflicts=('upp')
replaces=()
backup=()
options=(emptydirs !strip)
install=
source=('GCC.bm' 'license.txt')
noextract=()

_svntrunk="http://upp-mirror.googlecode.com/svn/trunk/"
# many users have already working copy of U++ on their system, so they
# can use it for building (e.g. to save network traffic or to speed up
# things) by setting $UPPSVN environment variable
if [ "x$UPPSVN" != "x" ]
then
  _svnmod=$UPPSVN
else
  _svnmod="$srcdir/uppsvn"
fi

build() {
  cd "$srcdir"
  #get sources
  msg "Downloading sources from svn..."
  for n in bazaar reference examples tutorial uppsrc
  do
    msg2 "$n"
    if [ -d $_svnmod/.svn ]; then
      (cd $_svnmod/$n && svn up -r $pkgver)
    else
      svn co $_svntrunk$n/ --config-dir ./ -r $pkgver $_svnmod/$n
    fi
  done
  msg "SVN checkout done (or server timeout)"
}

package() {
  #copy source files
  mkdir -p "$pkgdir/usr/share/upp"
  msg2 "Copying the source codes..."
  cp -r "$_svnmod/"{bazaar,examples,reference,tutorial,uppsrc} "$pkgdir/usr/share/upp/"
  echo "#define IDE_VERSION \"$pkgver-Arch-$(uname -m)\"" > "$pkgdir/usr/share/upp/uppsrc/ide/version.h"
  msg2 "Removing the .svn directories..."
  find "$pkgdir/" -type d -name ".svn" -exec rm -rf {} \; -prune
  #license
  mkdir -p "$pkgdir/usr/share/licenses/upp-svn"
  cp "$srcdir/license.txt" "$pkgdir/usr/share/licenses/upp-svn"
  #build method
  cp "$srcdir/GCC.bm" "$pkgdir/usr/share/upp"
  #fix permissions
  msg2 "Setting permissions..."
  find "$pkgdir/usr/" -type f -exec chown root:root {} \; -exec chmod 644 {} \;
}