Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 May 2006 00:14:05 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        openoffice@freebsd.org
Subject:   [PATCH] Automatically fixup the *.desktop files and hook them into KDE
Message-ID:  <200605070014.05428.jhb@freebsd.org>

next in thread | raw e-mail | index | archive | help
The patch below patches the .desktop files in the share/xdg directory.
In addition, if WITH_KDE is defined it creates a symlink to the share/xdg
directory in /usr/local/share/applnk that causes the OpenOffice 2.0
applications to show up in the K menu and for the file associations to
just work after 'make install' now.

Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /host/cvs/usr/cvs/ports/editors/openoffice.org-2.0/Makefile,v
retrieving revision 1.230
diff -u -r1.230 Makefile
=2D-- Makefile	24 Apr 2006 11:48:15 -0000	1.230
+++ Makefile	7 May 2006 04:12:51 -0000
@@ -237,6 +237,15 @@
 	@${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
 	@cd ${PREFIX} ; ${FIND} -s bin -type f | ${GREP} ${EXECBASE} >> ${TMPPLIS=
T}
 	@cd ${PREFIX} ; ${FIND} -s bin -type l | ${GREP} ${EXECBASE} >> ${TMPPLIS=
T}
 	@cd ${PREFIX} ; ${FIND} -s ${INSTALLATION_BASEDIR} -type f >> ${TMPPLIST}

=2D-=20
John Baldwin <jhb@FreeBSD.org> =A0<>< =A0http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" =A0=3D =A0http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605070014.05428.jhb>