Subject: Re: learning how to port to pkgsrc
To: Georg Schwarz <georg.schwarz@freenet.de>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 12/30/2004 17:44:39
On Thu, 30 Dec 2004, Georg Schwarz wrote:

> I thought it was time to learn how to port things to pkgsrc, so I
> figured I should try with an easy example.
> I would like to ask you to please review and test the result of my
> attempts.
> It's small enough to include it here:

pkgsrc-wip gives you a full playground in which you can implement, test, and
get review for packages.  It integrates as an extra "wip" directory into
your pkgsrc tree.  http://pkgsrc-wip.sourceforge.net/ has a full explanation
on how to get commit access.

That said, it looks pretty good with the caveats below.  If you'd add it to
pkgsrc-wip, we could get some more folks trying it out in the wild.

> I've tested it on my IRIX 5.3 machine and it works there.
> Nevertheless I've still a few questions:
>
> - boa needs flex and yacc to build. Can I simply assume they are present
> on the system?

Not for flex; you need USE_GNU_TOOLS+=lex for that.  A plain yacc should be
present on all systems, however.  (If you need bison, not yacc, you need
USE_GNU_TOOLS+=yacc as well.)

> - are the extra commands to create the examples/boa and doc/boa
> directories needed, or would they be created automatically if not
> existing?

You need them in the Makefile, yes.  (In the PLIST, only @dirrm is needed.)

> - what is the policy of preserving documents that come with the original
> tar archive in share/doc?

"Whatever seems appropriate."  It's somewhat arbitrary.  If the only
extensive docs come in a README, for instance, keep the README.

> - should I try to rewrite the paths in the sample boa.conf,  or would
> that simply be overkill?

You could do that if you want, if you can come up with sane defaults for
them.  You'd need a patch to put in @SUBSTITUTION@ tags, and a FILES_SUBST
to do the interpolation for you.

> - Do you think it would be a good idea to have a MESSAGE pointing out
> the sample config file?

This is generated for you if you use CONF_FILES (you'll need
USE_PKGINSTALL=YES to get that functionality).

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com>