--- PKGBUILD.old 2011-08-23 06:48:12.134709567 +0700 +++ PKGBUILD 2011-08-23 06:56:17.544711548 +0700 @@ -1,38 +1,62 @@ # Maintainer: laloch pkgname=kvpm-svn -pkgver=564 +_pkgname=kvpm +pkgver=568 pkgrel=1 -pkgdesc='KDE version 4 front end for Linux LVM and Gnu parted' +pkgdesc='KDE4 front end for Linux LVM and Gnu parted' url='http://kvpm.sourceforge.net' arch=('i686' 'x86_64') license=('GPL3') depends=('kdebase-runtime') -makedepends=('cmake>=2.6' 'automoc4' 'subversion') +makedepends=('cmake' 'automoc4' 'subversion') conflicts=('kvpm') provides=('kvpm') source=() md5sums=() +install=${pkgname}.install -_svntrunk='https://kvpm.svn.sourceforge.net/svnroot/kvpm/trunk/kvpm' +_svntrunk='https://kvpm.svn.sourceforge.net/svnroot/kvpm/trunk' _svnmod='kvpm' build() { cd ${srcdir} - if [ -d ${_svnmod} ]; then (cd ${_svnmod} && svn up -r ${pkgver}) else svn co ${_svntrunk} -r ${pkgver} ${_svnmod} fi - msg 'SVN checkout done or server timeout' - msg 'Starting make...' - - cd ${_svnmod} + msg2 'SVN checkout done or server timeout' + msg2 'Starting make...' + if [ -d build ]; then + msg2 'Clean previous build directory' + rm -rf build + fi + mkdir build + cp -r ${_svnmod}/* build + cd build/${_pkgname} cmake \ -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` \ -DCMAKE_BUILD_TYPE=Release - make || return 1 - make DESTDIR=${pkgdir} install || return 1 + make + cd .. + echo "[Desktop Entry] +GenericName=LVM Frontend +Name=KVPM +Comment=KDE Volume Partition Manager +Exec=kdesu kvpm +Icon=kvpm +X-KDE-SubstituteUID=true +Type=Application +Categories=System;KDE;" > ${_pkgname}.desktop +} + +package() { + cd ${srcdir}/build/${_pkgname} + make DESTDIR=${pkgdir} install + cd .. + install -Dm 644 kvpm_16x16.png ${pkgdir}//usr/share/icons/hicolor/16x16/apps/${_pkgname}.png + install -Dm 644 kvpm_32x32.png ${pkgdir}//usr/share/icons/hicolor/32x32/apps/${_pkgname}.png + install -Dm 644 kvpm_64x64.png ${pkgdir}//usr/share/icons/hicolor/64x64/apps/${_pkgname}.png + install -Dm 644 ${_pkgname}.desktop ${pkgdir}//usr/share/applications/${_pkgname}.desktop } -