Date: Wed, 29 Aug 2001 12:30:22 +0100 From: Nik Clayton <nik@freebsd.org> To: doc@freebsd.org Subject: Integrating the docs with KDE and GNOME Message-ID: <20010829123022.R46201@clan.nothing-going-on.org>
next in thread | raw e-mail | index | archive | help
--KcF6tPGvW9XXJH0t Content-Type: multipart/mixed; boundary="gmAlUWRVDrnirEWv" Content-Disposition: inline --gmAlUWRVDrnirEWv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Folks, The attached diff generates a .desktop file as part of the html-split format build. If you then install this using "make install" (and eventually, as part of the package install) then this *.desktop files are installed in the right place for them to appear in the KDE Helpcenter. A screenshot of this, with all the docs installed, can be seen at=20 http://people.freebsd.org/~nik/snapshot4.png In theory, the format of the *.desktop files is identical between KDE and GNOME, so, modulo a couple of path changes, this should work for GNOME as well. I don't run GNOME locally, so patches would be appreciated. Comments? N --=20 FreeBSD: The Power to Serve http://www.freebsd.org/ FreeBSD Documentation Project http://www.freebsd.org/docproj/ --- 15B8 3FFC DDB4 34B0 AA5F 94B7 93A8 0764 2C37 E375 --- --gmAlUWRVDrnirEWv Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff Content-Transfer-Encoding: quoted-printable Index: share/mk/doc.docbook.mk =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: /home/ncvs/doc/share/mk/doc.docbook.mk,v retrieving revision 1.45 diff -u -r1.45 doc.docbook.mk --- share/mk/doc.docbook.mk 2001/08/23 07:59:06 1.45 +++ share/mk/doc.docbook.mk 2001/08/29 11:10:40 @@ -54,6 +54,10 @@ # CSS_SHEET Full path to a CSS stylesheet suitable for DocBook. # Default is ${DOC_PREFIX}/share/misc/docbook.css # +# DESKTOP_TITLE The title of this document, as it should appear in +# the generated .desktop file. Default is the content +# of the first <title> element in the document. +# # Print-output options : # # NICE_HEADERS If defined, customized chapter headers will be cre= ated @@ -251,11 +255,18 @@ LOCAL_IMAGES_LIB +=3D ${LOCAL_IMAGES_LIB_DIR}/${_curimage}=20 .endfor=20 =20 +# +# Desktop file +# +DESKTOP?=3D ${.CURDIR:T}.desktop +DESKTOP_TITLE?=3D `grep title ${DOC}.${DOCBOOKSUFFIX} | head -n 1 | perl = -pe 's/\s*<.*?>\s*//g'` +CLEANFILES+=3D Desktop ${DESKTOP} + .MAIN: all =20 all: ${_docs} =20 -index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDE= X_SGML} ${HTML_SPLIT_INDEX} docbook.css +index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDE= X_SGML} ${HTML_SPLIT_INDEX} docbook.css ${DESKTOP} ${JADE} -V html-manifest -ioutput.html -ioutput.html.images ${JADEOPTS} -= d ${DSLHTML} -t sgml ${MASTERDOC} .if !defined(NO_TIDY) -tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest` @@ -455,7 +466,7 @@ _cf=3D${_curformat} .if !target(install-${_cf}) .if ${_cf} =3D=3D "html-split" -install-${_cf}: index.html +install-${_cf}: index.html ${DESKTOP} @[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR} ${INSTALL_DOCS} `xargs < HTML.manifest` ${DESTDIR} ${INSTALL_DOCS} docbook.css ${DESTDIR} @@ -480,6 +491,8 @@ .for _curimage in ${IMAGES_PNG:N*/*} ${INSTALL_DOCS} ${_curimage} ${DESTDIR} .endfor + mkdir -p ${PREFIX}/share/${KDE_DESKTOP_PATH} + ${INSTALL_DOCS} ${DESKTOP} ${PREFIX}/share/${KDE_DESKTOP_PATH} .for _compressext in ${KNOWN_COMPRESS} install-${_cf}.tar.${_compressext}: ${DOC}.${_cf}.tar.${_compressext} @[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR} @@ -505,10 +518,12 @@ .for _curimage in ${IMAGES_PNG:N*/*} ${INSTALL_DOCS} ${_curimage} ${DESTDIR} .endfor + mkdir -p ${PREFIX}/share/${KDE_DESKTOP_PATH}/${DESKTOP_TITLE} .else install-${_cf}: ${DOC}.${_cf} @[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR} ${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR} + mkdir -p ${PREFIX}/share/${KDE_DESKTOP_PATH}/${DESKTOP_TITLE} =20 .for _compressext in ${KNOWN_COMPRESS} install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext} @@ -518,6 +533,22 @@ .endif .endif .endfor + +# ------------------------------------------------------------------------ +# +# Desktop files +# +# For use with environments like KDE and GNOME +# + +Desktop: + echo '[Desktop Entry]' > ${.TARGET} + echo 'Icon=3Dhelpdoc' >> ${.TARGET} + +${DESKTOP}: Desktop + cp Desktop ${.TARGET} + echo 'Name=3D'${DESKTOP_TITLE} >> ${.TARGET} + echo 'DocPath=3Dfile:'${DESTDIR}/index.html >> ${.TARGET} =20 # ------------------------------------------------------------------------ # Index: en_US.ISO8859-1/books/Makefile.inc =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: /home/ncvs/doc/en_US.ISO8859-1/books/Makefile.inc,v retrieving revision 1.4 diff -u -r1.4 Makefile.inc --- en_US.ISO8859-1/books/Makefile.inc 2001/06/11 01:16:40 1.4 +++ en_US.ISO8859-1/books/Makefile.inc 2001/08/29 11:19:52 @@ -3,3 +3,4 @@ # =20 DESTDIR?=3D ${DOCDIR}/en_US.ISO8859-1/books/${.CURDIR:T} +KDE_DESKTOP_PATH?=3D apps/khelpcenter/plugins/FreeBSD/Books Index: en_US.ISO8859-1/articles/Makefile.inc =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: /home/ncvs/doc/en_US.ISO8859-1/articles/Makefile.inc,v retrieving revision 1.4 diff -u -r1.4 Makefile.inc --- en_US.ISO8859-1/articles/Makefile.inc 2001/06/11 01:16:38 1.4 +++ en_US.ISO8859-1/articles/Makefile.inc 2001/08/23 21:50:49 @@ -3,3 +3,4 @@ # =20 DESTDIR?=3D ${DOCDIR}/en_US.ISO8859-1/articles/${.CURDIR:T} +KDE_DESKTOP_PATH?=3D apps/khelpcenter/plugins/FreeBSD/Articles --gmAlUWRVDrnirEWv-- --KcF6tPGvW9XXJH0t Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjuM0k0ACgkQk6gHZCw343U2mQCdFvewrs6v5+dVGBYFGQC8CkYb d9UAoIufGzrn8RVJ3/bHTKaEuwcA/aJ3 =R5pF -----END PGP SIGNATURE----- --KcF6tPGvW9XXJH0t-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010829123022.R46201>