updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / qtstalker-cvs / PKGBUILD
blobca49fbf6a9e654edcf78add994020efa0c6f9798
1 # $Id:$
2 # Contributor: Ameysh <trader9@gmail.com>
3 # Maintainer: Balwinder S "bsd" Dheeman (bdheeman AT gmail.com)
5 pkgname=qtstalker-cvs
6 _realname=${pkgname%-*}
7 pkgver=20110929
8 pkgrel=1
9 pkgdesc="Commodity/Stock Charting and Technical Analysis Platform"
10 arch=('i686' 'x86_64')
11 url=http://qtstalker.sourceforge.net/
12 license=('GPL')
13 depends=('qt>=4.6.0' 'qwt5>=5.2.2' 'ta-lib-svn>=1542')
14 optdepends=('perl-libwww: for updation of quote/other data')
15 conflicts=('qtstalker<=0.36' 'qtstalker-qt4')
16 replaces=('qtstalker<=0.36' 'qtstalker-qt4')
17 provides=(${_realname})
18 changelog='ChangeLog'
20 _cvsroot=":pserver:anonymous@${_realname}.cvs.sourceforge.net:/cvsroot/${_realname}"
21 _cvsmod=${_realname}
23 source=('PKGBUILD.local' 'QtStalkerScript.cpp.patch' 'qtstalker.desktop')
25 # Include local code, huh
26 if [ -x PKGBUILD.local ]; then
27     . ./PKGBUILD.local
30 build() {
31     msg "Connecting to ${_cvsroot#*@} CVS server..."
32     cd "$srcdir"
33     if [ -d ${_cvsmod}-cvs/CVS ]; then
34         (cd ${_cvsmod}-cvs && cvs -z3 update -d)
35     else
36         cvs -z3 -d ${_cvsroot} co -d ${_cvsmod}-cvs ${_cvsmod}
37     fi
38     msg "CVS checkout done or server timeout"
40     msg "Preparing builddir..."
41     rsync -av --delete --exclude 'CVS' --exclude '.cvs*' $srcdir/${_cvsmod}-cvs/ $srcdir/${_realname}-build
42     cd $srcdir/${_realname}-build || return $?
44     msg "Running ./configure..."
45     sed 's|/usr/local|/usr|' -i ${_realname}.config
46     if [ -f /etc/arch-release ]; then
47         sed 's|lqwt$|lqwt5|' -i ${_realname}.pro
48         echo "INCLUDEPATH += /usr/include/qwt5" >>${_realname}.config
49     fi
50     patch -p0 -i $srcdir/QtStalkerScript.cpp.patch
51     ./configure || return $?
53     msg "Starting make all install..."
54     make || return $?
55     make INSTALL_ROOT=$pkgdir install || return $?
57     msg "Making it nice..."
58     mkdir -p $pkgdir/usr/share/applications
59     install -m 644 ../../${_realname}.desktop $pkgdir/usr/share/applications
60     mkdir -p $pkgdir/usr/share/pixmaps
61     install -m 644 pics/${_realname}.xpm $pkgdir/usr/share/pixmaps
62     rm -f $pkgdir/usr/share/doc/qtstalker/COPYING
65 # vim:set ts=4 sw=4 et:
66 md5sums=('728f6a98a8a4b3eb67e72ead618495c5'
67          '9c7cbdc73c93c3c2b33627874882b034'
68          'ba0af5c39ccefd8bb3479fbc9c5f6322')