desktop/kdelibs/PKGBUILD
2011-10-02 23:01:51 +02:00

143 lines
4.5 KiB
Bash

#
# KDE SC Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
# original name (used for the source and pkgnames)
_origname=kdelibs
#
# package info
#
pkgname=('kdelibs' 'kdelibs-doc')
arch=('i686' 'x86_64')
pkgver=${_kdever}
pkgrel=1
pkgdesc="split package"
url="http://www.kde.org"
license=('GPL' 'LGPL' 'FDL')
options=('docs' '!splithdr' 'splitdbg' 'log')
makedepends=("${_qtpkg}>=${_qtver}" "kde-common>=${_kdever}" "oxygen-icons>=${_kdever}"
'pkgconfig' 'cmake' 'automoc4' 'intltool' 'avahi' 'libgl' 'aspell' 'hspell' 'libxslt'
'shared-mime-info' 'upower' 'udisks' 'hal' 'xz>=5.0.0' 'enchant' 'jasper' 'openexr' 'giflib'
'strigi' 'libxtst' 'soprano' 'ca-certificates' 'xdg-utils' 'qca' 'polkit-qt>=0.98.1'
'libxss' 'phonon' 'shared-desktop-ontologies>=0.7' 'attica>=0.2.0' 'krb5' 'libxcursor'
'hicolor-icon-theme' 'docbook-xsl' 'docbook-xml' 'dbusmenu-qt-git' 'grantlee-git' 'bzip2>=1.0.6' 'libzip')
replaces=('arts' 'kdelibs-experimental')
source=($_mirror/${_origname}-$_kdever.tar.bz2
01_chakra_tag.patch
02_kde_applications_menu.patch
03_chakra_menu.patch)
md5sums=(`grep ${_origname}-$_kdever.tar.bz2 ../kde-sc.md5 | cut -d" " -f1`
'40ba51f0c50ced94dfffe667ec856950' # 01_chakra_tag.patch
'e94450ba5430ea9c1e33bad9ae38ca2d' # 02_kde_applications_menu.patch
'53b85403e4dd8f9146933c52ca23243e') # 03_chakra_menu.patch
#
# build function
#
build()
{
cd ${srcdir}/${_origname}-${pkgver}
# main patches
msg "applying main patchset ..."
patch -Np1 -i ${srcdir}/01_chakra_tag.patch || return 1
patch -Np1 -i ${srcdir}/02_kde_applications_menu.patch || return 1
patch -Np1 -i ${srcdir}/03_chakra_menu.patch || return 1
# fixes
# msg "applying fixes ..."
cd ..
msg "starting build ..."
mkdir -p build
cd build
cmake ../${_origname}-${pkgver} \
-DCMAKE_BUILD_TYPE=${_build_type} \
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
-DSYSCONF_INSTALL_DIR=/etc \
-DHTML_INSTALL_DIR=/usr/share/doc/kde/html \
-DKDE_DISTRIBUTION_TEXT='Chakra' \
-DKDE_DEFAULT_HOME='.kde4' \
-DWITH_FAM=OFF \
-DKAUTH_BACKEND=PolkitQt-1 \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
make VERBOSE=1 || return 1
}
package_kdelibs()
{
pkgdesc="KDE Core Libraries"
depends=("${_qtpkg}>=${_qtver}" "kde-common>=${_kdever}" "oxygen-icons>=${_kdever}"
'shared-mime-info' 'upower' 'udisks' 'xz>=5.0.0' 'enchant' 'jasper' 'openexr' 'giflib'
'strigi' 'libxtst' 'soprano' 'ca-certificates' 'xdg-utils' 'qca' 'polkit-qt>=0.98.1'
'libxss' 'phonon' 'shared-desktop-ontologies>=0.5' 'attica>=0.2.0' 'krb5' 'libxcursor'
'hicolor-icon-theme' 'dbusmenu-qt-git' 'grantlee-git')
optdepends=('phonon-gstreamer : GStreamer Phonon backend (default)'
'phonon-xine : Xine Phonon backend'
'phonon-mplayer : MPlayer Phonon backend'
'phonon-vlc : VLC Phonon backend'
'avahi : Service discovery on your local network'
'aspell : Spell checking'
'hspell : Hebrew spell checking'
'hal : Optional hardware abstraction layer for Solid')
provides=("${_origname}=${_kdever}")
replaces=('kdelibs-experimental')
groups=("kde" "kde-minimal" "kde-uninstall")
install=${_origname}.install
cd ${srcdir}/build
make DESTDIR=${pkgdir} install || return 1
# link cert bundle to the one from ca-certificates
rm -f ${pkgdir}/usr/share/apps/kssl/ca-bundle.crt
ln -sf /etc/ssl/certs/ca-certificates.crt ${pkgdir}/usr/share/apps/kssl/ca-bundle.crt
# put docu into separate package
mv -v ${pkgdir}/usr/share/doc ${srcdir}/
mv -v ${pkgdir}/usr/share/man ${srcdir}/
# include our patches into the package
ls -1 ${startdir}/*.patch &>/dev/null 2>&1
if [ "$?" = "0" ]; then
warning "incuding patches into package"
rm -rf ${startdir}/*experimental*.patch
mkdir -p ${pkgdir}/usr/share/chakra/patches/${_origname} &>/dev/null
for i in ${startdir}/*.patch; do
msg "$i"
cp $i ${pkgdir}/usr/share/chakra/patches/${_origname}/ &>/dev/null
done
else
warning "no patches found, skipping to include them into the package..."
fi
}
package_kdelibs-doc()
{
pkgdesc="KDE Core Libraries - Documentation"
groups=("kde" "kde-doc" "kde-uninstall")
mkdir -p ${pkgdir}/usr/share
mv ${srcdir}/doc ${pkgdir}/usr/share
mv ${srcdir}/man ${pkgdir}/usr/share
}