# $Id$ : ${PCATEGORIE="xfce-base"} : ${HOMEPAGE="http://www.xfce.org/"} : ${SRCFILE="${PNAME}-${PVER}.tar.bz2"} : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"} SDEPEND="${SDEPEND} >= dev-util/pkgconfig-0.23 >= dev-util/intltool-0.40 >= sys-dev/gettext-0.17" sminclude mtools # default SRC_URIs SRC_URI=( ${SRC_URI[*]} http://mocha.xfce.org/archive/src/xfce/${PNAME}/${PVER%.*}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) # special functions needed by postinstall|postremove SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} xfce_update_desktop_db xfce_update_mime_db xfce_update_icon_cache" xfce_configure() { local configure_opts="$@" mconfigure ${configure_opts} || die } xfce_src_prepare() { munpack ${SRCFILE} || die } xfce_src_compile() { cd ${SRCDIR} xfce_configure --disable-debug --disable-static || die mmake ${XFCE_MAKE_OPTS} || die } xfce_src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} ${XFCE_MAKE_OPTS} install || die local i for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ FAQ LICENSE NEWS README TODO do if [ -f ${SRCDIR}/${i} ] then minstalldocs ${i} || die fi done } xfce_update_desktop_db() { # update desktop db if [ -x ${MROOT}/usr/bin/update-desktop-database ] then echo "Updating desktop mime database ..." ${MROOT}/usr/bin/update-desktop-database -q ${MROOT}/usr/share/applications fi } xfce_update_mime_db() { # update mime db if [ -x ${MROOT}/usr/bin/update-mime-database ] then echo "Updating shared mime info database ..." ${MROOT}/usr/bin/update-mime-database ${MROOT}/usr/share/mime fi } xfce_update_icon_cache() { if [ -x ${MROOT}/usr/bin/gtk-update-icon-cache ] then pushd ${BUILDDIR}/${PKGNAME}/binfiles &> /dev/null local icons=$(find 'usr/share/icons' -maxdepth 1 -mindepth 1 -type d 2> /dev/null) popd &> /dev/null # abort here, if no icons where found [[ -z ${icons} ]] && return echo "Updating icons cache ..." local i for i in ${icons} do if [[ -f ${MROOT}/${i}/index.theme ]] then ${MROOT}/usr/bin/gtk-update-icon-cache -qf ${MROOT}/${i} fi done fi } xfce_postinstall() { xfce_update_desktop_db xfce_update_mime_db xfce_update_icon_cache } xfce_postremove() { xfce_update_desktop_db xfce_update_mime_db xfce_update_icon_cache } export_inherits xfce src_prepare src_compile src_install postinstall postremove