updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / kraft-svn / PKGBUILD
blob893996e6d2df57c5cb52f596515a14be66039e13
1 # Maintainer:  Thomas Weißschuh <thomas_weissschuh || lavabit || com>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
3 # Contributor: Anton Bazhenov <anton.bazhenov at gmail>
4 # Contributor: shamrok <szamrok@gmail.com>
6 pkgname=kraft-svn
7 pkgver=1255047
8 pkgrel=1
9 pkgdesc="A program suitable for all trades or crafts"
10 arch=('i686' 'x86_64')
11 url="http://kraft.sourceforge.net/index.php?lang=en"
12 license=('GPL')
13 depends=('kdepimlibs' 'ctemplate' 'python-reportlab')
14 provides=('kraft')
15 conflicts=('kraft')
17 makedepends=('cmake' 'automoc4' 'boost' 'subversion')
19 _svntrunk=svn://anonsvn.kde.org/home/kde/trunk/playground/office/kraft
20 _svnmod=kraft
22 build() {
24         cd ${srcdir}
25         msg "Connecting to $_svntrunk SVN server...."
26         if [ -d $_svnmod/.svn ]; then
27                 (cd $_svnmod && svn up -r $pkgver )
28         else
29                 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
30         fi
32         msg "SVN checkout done or server timeout"
33         msg "Starting make..."
35         rm -rf $_svnmod-build
36         cp -r $_svnmod $_svnmod-build
37         cd ${srcdir}/$_svnmod-build
39         mkdir -p build
40         cd build
41         cmake ../ \
42                 -DCMAKE_BUILD_TYPE=Release \
43                 -DCMAKE_INSTALL_PREFIX=/usr
45         # fix /usr/bin/python being python2
46         sed -i 's/python/python2/' ../tools/erml2pdf.py
47         # (fatal)
48         sed -i 's/"python"/"python2"/' ../src/reportgenerator.cpp
50         # fix wrong exception raising (nonfatal)
51         sed -i 's/raise ValueError, "Not enough space"/raise ValueError("Not enough space")/' ../tools/erml2pdf.py
53         make
57 package() {
58         cd ${srcdir}/${_svnmod}-build/build
59         make DESTDIR=${pkgdir} install