updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / kde3-kgtk / PKGBUILD
blob972ac530a33a89a933c60ea9997067636a41e936
1 pkgname=kde3-kgtk
2 pkgver=0.10.1
3 pkgrel=1
4 pkgdesc="LD_PRELOAD hack with helper scripts to make gtk and qt-only programs use KDE file dialogs."
5 arch=('i686' 'x86_64')
6 url="http://www.kde-apps.org/content/show.php?content=36077"
7 license=('GPL')
8 depends=('kdelibs3' 'qt3')
9 makedepends=('pkgconfig' 'automoc4' 'cmake' 'gettext')
10 install=kgtk.install
11 source=(http://home.freeuk.com/cpdrummond/KGtk-${pkgver}.tar.bz2 kfmclient const.patch)
12 md5sums=('b456046727f0120734410573d75c47e0'
13          '6fdecfadd501a388aeb9ad5efa442b01'
14          '40b1ff8b469af58a8664b8197902343d')
16 build() {
17         cd $srcdir/KGtk-${pkgver}
19         patch -Np1 -i ../const.patch || return 1
21         for f in */*-wrapper.cmake; do sed -i 's|LD_PRELOAD=@CMAKE_INSTALL_PREFIX@/lib/kgtk/lib|LD_PRELOAD=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@/kgtk/lib|' ${f}; done
23         mkdir -p $srcdir/build3
25         cd $srcdir/build3
26         export PATH=/opt/kde/bin:/opt/qt/bin:$PATH
27         export QTDIR=/opt/qt
28         export KDEDIR=/opt/kde
30         cmake ../KGtk-${pkgver} -DCMAKE_INSTALL_PREFIX=/opt/kde -DKGTK_KDE3=true -DKGTK_GTK2=true -DKGTK_QT3=true || return 1
31         make || return 1
32         make DESTDIR=$pkgdir install || return 1
33         make clean
35         cd $srcdir
36         mkdir -p $pkgdir/opt/kde/lib/kgtk || return 1
37         cp kfmclient $pkgdir/opt/kde/lib/kgtk/kfmclient || return 1
38         chmod +x $pkgdir/opt/kde/lib/kgtk/kfmclient || return 1
40         sed -i 's#LD_PRELOAD=#PATH="/opt/kde/lib/kgtk:$PATH"; LD_PRELOAD=#' $pkgdir/opt/kde/bin/kqt3-wrapper
42         rm -rf $srcdir/build3