desktop/kdeadmin/PKGBUILD

204 lines
5.2 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=kdeadmin
#
# package info
#
pkgbase=('kdeadmin')
pkgname=('kdeadmin-common'
'kdeadmin-doc'
'kdeadmin-kcron'
'kdeadmin-kuser'
'kdeadmin-ksystemlog'
'kdeadmin-system-config-printer')
# not in the tarball 'kdemod-kdeadmin-lilo-config'
arch=('i686' 'x86_64')
pkgver=${_kdever}
pkgrel=1
pkgdesc="split package"
url="http://www.kde.org/"
license=('GPL' 'LGPL' 'FDL')
install=kdeadmin.install
makedepends=('pkgconfig' 'cmake' 'automoc4' "kdepimlibs>=${_kdever}" "kdebase-runtime>=${_kdever}"
"kdebindings-python>=${_kdever}" 'system-config-printer-common') # "kdepim-runtime>=${_kdever}"
source=($_mirror/${_origname}-$_kdever.tar.bz2
fix-syslog-path.patch)
md5sums=('028878faf2b407ab220013c85a8610bc' # kdeadmin-4.4.92.tar.bz2
'41b71823c7a33975ec08aaf75d67a374') # fix-syslog-path.patch
#
# build function
#
build()
{
cd ${srcdir}/${_origname}-${pkgver}
patch -Np1 -i ${srcdir}/fix-syslog-path.patch || return 1
msg "starting build ..."
cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
-DBUILD_kpackage=OFF \
-DBUILD_knetworkconf=OFF \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
make || return 1
}
#
# split-install functions
#
package_kdeadmin-common()
{
pkgdesc="KDE Administrative Tools - Common files and libraries"
depends=("kdebase-runtime>=${_kdever}")
conflicts=("kdemod-${_origname}" )
groups=("kde-${_origname}" "kde-complete" "kde-uninstall")
splitdirs="strigi-analyzer"
for i in ${splitdirs} ; do
cd ${srcdir}/${_origname}-${pkgver}/${i}
make DESTDIR=${pkgdir} install || return 1
done
# include our patches into the package
ls -1 ${startdir}/*.patch &>/dev/null 2>&1
if [ "$?" = "0" ]; then
warning "incuding patches into package"
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_kdeadmin-doc()
{
pkgdesc="KDE Administrative Tools - Documentation"
depends=("${_origname}-common>=${_kdever}")
groups=("kde-${_origname}" "kde-complete" "kde-uninstall" "kde-doc")
splitdirs="doc"
for i in ${splitdirs} ; do
cd ${srcdir}/${_origname}-${pkgver}/${i}
make DESTDIR=${pkgdir} install || return 1
done
}
package_kdeadmin-kcron()
{
pkgdesc="Crontab editor"
depends=("${_origname}-common>=${_kdever}")
conflicts=("kdemod-${_origname}-kcron")
groups=("kde-${_origname}" "kde-complete" "kde-uninstall")
splitdirs="kcron"
for i in ${splitdirs} ; do
cd ${srcdir}/${_origname}-${pkgver}/${i}
make DESTDIR=${pkgdir} install || return 1
done
}
package_kdeadmin-kdat()
{
pkgdesc="Tar-based tape archiver"
depends=("${_origname}-common>=${_kdever}")
conflicts=("kdemod-${_origname}-kdat")
groups=("kde-${_origname}" "kde-complete" "kde-uninstall")
splitdirs="kdat"
for i in ${splitdirs} ; do
cd ${srcdir}/${_origname}-${pkgver}/${i}
make DESTDIR=${pkgdir} install || return 1
done
}
package_kdeadmin-ksystemlog()
{
pkgdesc="Log viewer"
depends=("${_origname}-common>=${_kdever}")
conflicts=("kdemod-${_origname}-ksystemlog")
groups=("kde-${_origname}" "kde-complete" "kde-uninstall")
splitdirs="ksystemlog"
for i in ${splitdirs} ; do
cd ${srcdir}/${_origname}-${pkgver}/${i}
make DESTDIR=${pkgdir} install || return 1
done
}
package_kdeadmin-kuser()
{
pkgdesc="Manage users and groups"
depends=("${_origname}-common>=${_kdever}")
conflicts=("${_origname}-kuser")
groups=("kde-${_origname}" "kde-complete" "kde-uninstall")
splitdirs="kuser"
for i in ${splitdirs} ; do
cd ${srcdir}/${_origname}-${pkgver}/${i}
make DESTDIR=${pkgdir} install || return 1
done
}
package_kdeadmin-lilo-config()
{
pkgdesc="Configure the LILO bootloader"
depends=("${_origname}-common>=${_kdever}")
conflicts=("kdemod-${_origname}-lilo-config")
groups=("kde-${_origname}" "kde-complete" "kde-uninstall")
splitdirs="lilo-config"
for i in ${splitdirs} ; do
cd ${srcdir}/${_origname}-${pkgver}/${i}
make DESTDIR=${pkgdir} install || return 1
done
}
package_kdeadmin-system-config-printer()
{
pkgdesc="Printer configuration"
depends=("${_origname}-common>=${_kdever}" "system-config-printer" "kdebindings-python")
conflicts=("kdemod-${_origname}-system-config-printer-kde")
groups=("kde-${_origname}" "kde-complete" "kde-uninstall")
splitdirs="system-config-printer-kde"
for i in ${splitdirs} ; do
cd ${srcdir}/${_origname}-${pkgver}/${i}
make DESTDIR=${pkgdir} install || return 1
done
msg "fixing i18n ..."
#fix locations
sed -i -e 's~special_choice=_("Automatic rotation")),~special_choice=i18n("Automatic rotation")),~g' ${pkgdir}/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py
}