Subject: Re: My first package: sysutils/am-utils
To: =?ISO-8859-1?Q?Edgar_Fu=DF?= <>
From: Julio M. Merino Vidal <>
List: tech-pkg
Date: 03/18/2007 17:36:14
On 18/03/2007, at 13:01, Edgar Fu=DF wrote:

> Hello.
> I'm not entirely sure wheter I'm on the right list to discuss this.

Yes, this is the right list.

> Reading the description, tech-pkg is more about the pkgsrc =20
> infrastructure,
> but pkgsrc-users looks like the wrong place too.
> I felt like creating a sysutils/am-utils package.
> Why would someone want this given it's in the base distribution?
> -- Max OS X doesn't have it, but pkgsrc runs nicely on Mac OS.
> -- The version in base doesn't have LDAP support.

This is the same case as, e.g., postfix.  It is in base but is also =20
available in pkgsrc so that it is easy to build a version with =20
features not included in the base system.
> So could someone please comment on the attached "my first package"?
> I must admit I'm deeply impressed by all the pkgsrc infrastructure
> one can build on, but very unsure about whether I'm using it =20
> correctly.
> Some particular questions:
> As ditributed, am-utils seems to have no way to tell the configure =20
> script
> where exactly to look for libraries like LDAP. What's the proposed =20
> method
> of handling this?

If it depends on -I and -L flags, using the framework =20
should just DTRT.  In other words, you pull in the ldap =20=

file and the framework will do the appropriate changes so that the =20
configure script sees the correct library/headers.

If instead the configure script has some hardcoded paths in it (some =20
of the really ugly ones do!), you should patch it to remove those =20
paths and only list the "correct" ones, which could be ${PREFIX}/=20

> It looks like files in files/ get no checksum computed by make =20
> distinfo.
> Is this correct?

Yep, it is correct.  I don't know why we don't do this though.

> Should the startup script put the pid in @VARBASE@/run or /var/run?

@VARBASE@/run.  VARBASE defaults to /var, so this will work on most =20
systems.  Those who tune VARBASE should know what they are doing.

> Is there an infrastructure for handling foreign startup scripts.
> especially those for Mac OS X? I've built one, but no idea how to
> integrate that into the package.

AFAIK, pkgsrc can only handle rc.subr-style scripts by means of =20
RCD_SCRIPTS.  Your best bet is to install the Mac OS X startup script =20=

in the examples directory (${PREFIX}/share/examples/am-utils/...) and =20=

then add a MESSAGE.Darwin file that tells the user about that file.

I'm looking forward to discussing better Mac OS X support in the next =20=

pkgsrcCon :-)

Hope this helps,

Julio M. Merino Vidal <>