From 82d0dd5d1e489686f1d2ab83d1bc68663142355b Mon Sep 17 00:00:00 2001 From: maho Date: Tue, 9 May 2006 01:04:50 +0000 Subject: Automatically fixup the *.desktop files and hook them into KDE Submitted by: jhb --- editors/openoffice.org-2-devel/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'editors/openoffice.org-2-devel') diff --git a/editors/openoffice.org-2-devel/Makefile b/editors/openoffice.org-2-devel/Makefile index a23d5f47c38..51140f2432b 100644 --- a/editors/openoffice.org-2-devel/Makefile +++ b/editors/openoffice.org-2-devel/Makefile @@ -157,6 +157,8 @@ EXTRA_PATCHES+= ${FILESDIR}/cws-maho1.diff ${FILESDIR}/gcj-fbsdworkaround #EXTRA_PATCHES+= ${FILESDIR}/optpatch-freetype #.endif +ICONS= ${WRKSRC}/sysui/desktop/icons + .include <${FILESDIR}/Makefile.knobs> pre-everything:: @@ -236,6 +238,29 @@ post-install: @${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-spadmin @${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-swriter @${PRINTF} "bin/openoffice.org\n" > ${TMPPLIST} + @${REINPLACE_CMD} -e 's#${RELEASE_NR}#${OOOVERSION}#g' \ + -e '/^Exec/s/printeradmin/spadmin/' \ + ${PREFIX}/${INSTALLATION_BASEDIR}/share/xdg/*.desktop + @${RM} ${PREFIX}/${INSTALLATION_BASEDIR}/share/xdg/*.desktop.bak +.if defined(WITH_KDE) + @ln -sf ${PREFIX}/${INSTALLATION_BASEDIR}/share/xdg \ + ${PREFIX}/share/applnk/${EXECBASE} + @${PRINTF} "share/applnk/${EXECBASE}\n" >> ${TMPPLIST} +.endif + @for dir in `ls ${ICONS}/hicolor | grep -v CVS`; do \ + for app in base calc draw impress math printeradmin writer; do \ + if [ -r ${ICONS}/hicolor/$${dir}/apps/$${app}.png ]; then \ + ${CP} ${ICONS}/hicolor/$${dir}/apps/$${app}.png \ + ${PREFIX}/share/icons/hicolor/$${dir}/apps/openofficeorg-20-$${app}.png ; \ + ${PRINTF} "share/icons/hicolor/$${dir}/apps/openofficeorg-20-$${app}.png\n" >> ${TMPPLIST} ; \ + fi \ + done ; \ + for file in `cd ${ICONS}/hicolor/$${dir}/mimetypes; ls *.png`; do \ + ${CP} ${ICONS}/hicolor/$${dir}/mimetypes/$${file} \ + ${PREFIX}/share/icons/hicolor/$${dir}/mimetypes/ ; \ + ${PRINTF} "share/icons/hiclor/$${dir}/mimetypes/$${file}\n" >> ${TMPPLIST} ; \ + done ; \ + done @cd ${PREFIX} ; ${FIND} -s bin -type f | ${GREP} ${EXECBASE} >> ${TMPPLIST} @cd ${PREFIX} ; ${FIND} -s bin -type l | ${GREP} ${EXECBASE} >> ${TMPPLIST} @cd ${PREFIX} ; ${FIND} -s ${INSTALLATION_BASEDIR} -type f >> ${TMPPLIST} -- cgit