# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.147 2007/04/12 14:01:42 carlo Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.148 2007/04/19 10:24:56 carlo Exp $
#
# Author Dan Armak <danarmak@gentoo.org>
#
# This contains everything except things that modify ebuild variables
# and functions (e.g. $P, src_compile() etc.)
-inherit qt3
+inherit qt3 eutils
# map of the monolithic->split ebuild derivation; used to build deps describing
# the relationships between them
}
buildsycoca() {
+ [[ $EBUILD_PHASE != postinst ]] && [[ $EBUILD_PHASE != postrm ]] && \
+ die "buildsycoca() has to be calles in pkg_postinst() and pkg_postrm()."
+
if [[ -x ${KDEDIR}/bin/kbuildsycoca ]] && [[ -z ${ROOT} || ${ROOT} == "/" ]] && has "~${ARCH}" "${ACCEPT_KEYWORDS}"; then
# First of all, make sure that the /usr/share/services directory exists
# and it has the right permissions
fi
}
+postprocess_desktop_entries() {
+ [[ $EBUILD_PHASE != preinst ]] && [[ $EBUILD_PHASE != install ]] && \
+ die "postprocess_desktop_entries() has to be called in src_install() or pkg_preinst()."
+
+ local desktop_entries="$(find "${D}${PREFIX}/share/applnk" -name '*.desktop' \
+ -not -path '*.hidden*' 2>/dev/null)"
+ if [[ -n ${desktop_entries} ]]; then
+ for entry in ${desktop_entries} ; do
+ dodir ${PREFIX}/share/applications/kde
+ mv ${entry} ${D}${PREFIX}/share/applications/kde
+ done
+ fi
+
+ validate_desktop_entries ${PREFIX}/share/applications
+}
+
# is this a kde-base ebuid?
if [ "${CATEGORY}" == "kde-base" ]; then
debug-print "${ECLASS}: KDEBASE ebuild recognized"
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.195 2007/04/11 17:56:18 carlo Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde.eclass,v 1.196 2007/04/19 10:24:56 carlo Exp $
#
# Author Dan Armak <danarmak@gentoo.org>
#
}
kde_pkg_preinst() {
- validate_desktop_entries ${PREFIX}/share/appl{nk,ications}
- if [[ $(find "${D}${PREFIX}/share/applnk" -name '*.desktop' \
- -not -path '*.hidden*' 2>/dev/null | wc -l) != "0" ]]; then
- ewarn "This ebuild is installing .desktop files in the deprecated path"
- ewarn "${PREFIX}/share/applnk/. They will only be visible within KDE."
- echo ""
- fi
+ postprocess_desktop_entries
}
kde_pkg_postinst() {