diff options
author | grant <grant@pkgsrc.org> | 2004-10-21 14:27:36 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2004-10-21 14:27:36 +0000 |
commit | 798a931bb4ab35d36ad4fe7903f4ab0d5c13d552 (patch) | |
tree | 33c12f96b885de4e38aaf259542d73ad55e5f341 /doc/guide/Makefile | |
parent | 113c554381770570a4e3e6d8417218394e384a08 (diff) | |
download | pkgsrc-798a931bb4ab35d36ad4fe7903f4ab0d5c13d552.tar.gz |
import The pkgsrc guide, the docbook conversion/replacement of
Packages.txt; Packages.txt will be going away.
this package contains the source files and a mechanism to install
pkgsrc/doc/pkgsrc.{html,txt} which are distributed with pkgsrc. it
uses the same docbook infrastructure that is used to build the
documentation on www.NetBSD.org.
Diffstat (limited to 'doc/guide/Makefile')
-rw-r--r-- | doc/guide/Makefile | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/doc/guide/Makefile b/doc/guide/Makefile new file mode 100644 index 00000000000..17b965eb321 --- /dev/null +++ b/doc/guide/Makefile @@ -0,0 +1,97 @@ +# $NetBSD: Makefile,v 1.1.1.1 2004/10/21 14:27:37 grant Exp $ +# + +DISTNAME= htdocs-share-20041021 +PKGNAME= pkgsrc-guide-${PKGVERSION} +CATEGORIES= # empty +MASTER_SITES= ${MASTER_SITE_LOCAL} + +MAINTAINER= packages@NetBSD.org +HOMEPAGE= http://www.NetBSD.org/Documentation/pkgsrc/ +COMMENT= The pkgsrc guide + +# the "install-doc" target installs pkgsrc/doc/pkgsrc.{html,txt} which +# both need to be committed to CVS. + +PKGVERSION!= date '+%Y%m%d' +DIST_SUBDIR= ${PKGBASE} +NO_CONFIGURE= # defined +NO_MTREE= # defined +USE_LANGUAGES= # empty + +PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC +DOCDIR= ${PREFIX}/share/doc/pkgsrc + +BUILD_DEFS+= OUTPUTS +OUTPUTS?= html html-split ascii + +# the html is needed to build the ascii version. +.if !empty(OUTPUTS:Mascii) +OUTPUTS+= html +.endif + +# html output +BUILD_DEPENDS+= docbook>=4.0:../../textproc/docbook +BUILD_DEPENDS+= docbook-xml>=4.0:../../textproc/docbook-xml +BUILD_DEPENDS+= docbook-xsl>=1.62.4:../../textproc/docbook-xsl +BUILD_DEPENDS+= dsssl-docbook-modular>=1.54:../../textproc/dsssl-docbook-modular +BUILD_DEPENDS+= opensp>=1.5:../../textproc/opensp +BUILD_DEPENDS+= libxslt>=1.0.30:../../textproc/libxslt + +.if !empty(OUTPUTS:Mhtml*) +BUILD_DEPENDS+= tidy>=20021108:../../www/tidy +.endif + +.if !empty(OUTPUTS:Mascii) +BUILD_DEPENDS+= w3m>=0.4:../../www/w3m +.endif + +.if !empty(OUTPUTS:Mps) || !empty(OUTPUTS:Mpdf) +BUILD_DEPENDS+= openjade>=1.3.2:../../textproc/openjade +BUILD_DEPENDS+= tex-jadetex>=3.13:../../print/tex-jadetex +USE_GHOSTSCRIPT= build +GHOSTSCRIPT_REQD= 7.05 +. include "../../mk/ghostscript.mk" +.endif + +pre-extract: + @cd ${FILESDIR} && ${PAX} -rw . ${WRKSRC} + +do-build: +.for _output_ in ${OUTPUTS} + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} ${_output_} +.endfor + +do-install: + ${INSTALL_DATA_DIR} ${DOCDIR} +.if !empty(OUTPUTS:Mhtml) || !empty(OUTPUTS:Mhtml-split) + ${INSTALL_DATA} ${WRKSRC}/*.html ${DOCDIR} + ${INSTALL_DATA} ${WRKDIR}/htdocs/NetBSD.css ${DOCDIR} +.endif +.if !empty(OUTPUTS:Mascii) + ${INSTALL_DATA} ${WRKSRC}/pkgsrc.txt ${DOCDIR} +.endif +.if !empty(OUTPUTS:Mpdf) + ${INSTALL_DATA} ${WRKSRC}/pkgsrc.ps ${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/pkgsrc.pdf ${DOCDIR} +.endif + +post-install: + @${FIND} ${DOCDIR} \( -type f -o -type l \) -print \ + | ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \ + >> ${PLIST_SRC} + @${FIND} ${DOCDIR} -type d -print \ + | ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \ + >> ${PLIST_SRC} + +# install the single-file HTML and ascii output into the pkgsrc doc/ +# directory, for distribution with pkgsrc. +# +# note that this uses ${CP} and not ${INSTALL_DATA} because this +# shouldn't be done as root. +# +install-doc: build + ${CP} ${WRKSRC}/pkgsrc.html ${_PKGSRCDIR}/doc + ${CP} ${WRKSRC}/pkgsrc.txt ${_PKGSRCDIR}/doc + +.include "../../mk/bsd.pkg.mk" |