Subject: -docs framework proposal
To: None <tech-pkg@netbsd.org>
From: Michal Pasternak <michal@pasternak.w.lub.pl>
List: tech-pkg
Date: 11/25/2003 15:57:48
Hi,

Currently, there's no framework for handling documentation packages
installation in pkgsrc.

Various -doc packages handle this in a different manner.

For example, check:
    editors/ce-doc 
    databases/postgresql-doc
    lang/py22-html-docs
    games/crafty-doc
    net/coda_doc
    
They all have it done in a different manner.

My proposal: we should cooperate to unify docs handling in pkgsrc.

As the most popular documentation format for manuals is HTML, I suggest:
there should be a file, like mk/docs.pkg.mk, which would:

      - define DOCPREFIX and DOCPKGSUFX
      
      - requre Makefile of the package to set DOCTYPE (eg. html, sgml, 
      	xml)
      
      - define a target to compile (preprocess) the documentation (for HTML
        docs it would be empty; for docs generated by various parsing tools
	it would contain needed commands)

      - require the package Makefile to set DOCDIR (one or more directories
	existing in WRKSRC after extraction/compilation, containing needed
	docs)
	
      - define a simple do-install target, that would just copy structure
      	from DOCDIR to ${DOCPREFIX}/${PKGNAME}-${DOCPKGSUFX}

Creating such framework would allow us to unify handling packages with docs
and to make creating of such packages easier.

Whatever you think about this, please remember, that 100 different html doc
packages handling installation in 100 different ways could be a problem
someday.

Regards,
-- 
Michal Pasternak :: http://pasternak.w.lub.pl