updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / kdevelop-extra-plugins-php-git / PKGBUILD
blob3a9d298b159d099c6013c73b40adde4ae4cacf37
1 # Contributor: Harley Laue <losinggeneration@gmail.com>
2 # Contributor: mosra <mosra@centrum.cz>
4 pkgname=(kdevelop-extra-plugins-php-git)
5 pkgver=20110604
6 pkgrel=1
7 pkgdesc="A PHP plugin for KDevelop development environment for KDE - GIT build"
8 arch=('i686' 'x86_64')
9 url="http://www.kdevelop.org/"
10 license=('GPL')
11 groups=('kde' 'kdevelop-extra-plugins')
12 depends=('kdevplatform-git')
13 optdepends=('kdevelop-git')
14 makedepends=('cmake' 'automoc4' 'git' 'kdevelop-pg-qt-git')
15 provides=('kdevelop-php')
16 conflicts=('kdevelop-php')
17 source=()
18 md5sums=()
20 _gitroot="git://anongit.kde.org/kdev-php"
21 _gitname="php"
23 build() {
24     cd "$srcdir"
25     msg "Connecting to GIT server...."
27     if [ -d $_gitname ] ; then
28         cd $_gitname
30         # Change remote url to anongit
31         if [ -z "$(git remote -v | grep anongit)" ] ; then
32             git remote set-url origin ${_gitroot}
33         fi
35         git pull origin
36         msg "The local files are updated."
37     else
38         git clone $_gitroot $_gitname
39     fi
41     msg "GIT checkout done or server timeout"
42     msg "Starting make..."
44     mkdir -p "$srcdir/build"
45     cd "$srcdir/build"
47     cmake ../${_gitname} \
48         -DCMAKE_SKIP_RPATH=ON \
49         -DCMAKE_BUILD_TYPE=RELWITHDEBINFO \
50         -DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed' \
51         -DCMAKE_INSTALL_PREFIX=/usr
53     make
56 package() {
57     cd "$srcdir/build"
59     make DESTDIR="${pkgdir}" install