updated on Tue Jan 17 12:00:36 UTC 2012
[aur-mirror.git] / qtcreator-opt-git / PKGBUILD
blobacb360ccc21a09833c8135b3bc2c69c3a9a38f14
1 # Contributor: delor <bartekpiech@gmail com>
2 # Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
3 # Contributor: Dan Vratil <progdan@progdansoft.com>
4 # Contributor: thotypous <matiasΘarchlinux-br·org>
5 # Contributor: Imanol Celaya <ornitorrincos@archlinux-es.org>
6 # Contributor: heinz from #qt-creator
7 # Contributor: Radu Andries <admiral0@tuxfamily.org>
9 pkgname=qtcreator-opt-git
10 pkgver=20110811
11 pkgrel=1
12 pkgdesc="Qt Creator is a new cross-platform integrated development environment (IDE) tailored to the needs of Qt developers. Installs in /opt"
13 arch=('i686' 'x86_64')
14 url="http://www.qtsoftware.com/products/developer-tools"
15 license=('LGPL')
16 depends=('qt-opt-git')
17 makedepends=('git')
18 optdepends=('qt-doc: for the integrated Qt documentation'
19 'gdb: for the debugger')
20 provides=('qtcreator')
21 conflicts=()
22 options=(docs)
23 source=(qtcreator.desktop)
26 _gitroot="git://gitorious.org/qt-creator/qt-creator.git"
27 _gitname="qt-creator"
29 build() {
30     msg "Connecting to GIT server"
32     if [ -d ${srcdir}/$_gitname ] ; then
33         cd ${srcdir}/$_gitname && git pull origin || return 1
34         msg "The local files are updated."
35     else
36         git clone $_gitroot $_gitname || return 1
37     fi
39     msg "GIT checkout done or server timeout"
40     msg "Patching"
42     cd "${srcdir}/${_gitname}" || return 1
45     msg "Starting make in quiet mode"
47     if [ -d ${srcdir}/build ]; then
48         rm -rf ${srcdir}/build
49     fi
51     if [ -d ${srcdir}/build ]
52     then
53         cd ${srcdir}/build
54     else
55         mkdir ${srcdir}/build
56         cd ${srcdir}/build
57     fi
58     mkdir -p share/doc/qtcreator
59     touch share/doc/qtcreator/qtcreator.qch
61     # to enable the qml designer you need to declare QT_PRIV variable that point to Qt build tree (or source tree, if shadow building does not used)
62     #QT_PRIV=/home/hatred/build/qtcreator/qt-opt-git/src/qt-build
63     /opt/qt-git/bin/qmake QMAKE_CXXFLAGS+="-I$QT_PRIV/include/QtDeclarative -I$QT_PRIV/include" QT_PRIVATE_HEADERS=$QT_PRIV/include CONFIG+=debug ${srcdir}/${_gitname}/qtcreator.pro \
64     && make --quiet \
65     && make INSTALL_ROOT="${pkgdir}/opt/qtcreator-git" install || return 1
66     install -Dm644 ${srcdir}/qtcreator.desktop ${pkgdir}/usr/share/applications/qtcreator-git.desktop || return 1
67     install -Dm644 ${srcdir}/$_gitname/LGPL_EXCEPTION.TXT ${pkgdir}/usr/share/licenses/qtcreator-opt/LGPL_EXCEPTION.TXT || return 1
70 md5sums=('2361c6c6157ce43e574bee7fd289c8ff')