Subject: Re: How to depend on an HTTP server?
To: Amitai Schlair <schmonz@schmonz.com>
From: Johnny Lam <jlam@jgrind.org>
List: tech-pkg
Date: 11/19/2001 22:24:45
On Mon, Nov 19, 2001 at 11:29:10PM -0500, Amitai Schlair wrote:
> I'm packaging sqwebmail <URL:http://www.inter7.com/sqwebmail/>, a webmail
> program that runs as a CGI. The Makefile has the following goop:
> 
> DEPENDS+=        apache>=1.3.22:../../www/apache
> 
> CONFIGURE_ARGS+= --enable-cgibindir=${LOCALBASE}/libexec/cgi-bin \
>                  --enable-imagedir=${LOCALBASE}/share/httpd/htdocs/images \
>                  --enable-mimetypes=${LOCALBASE}/etc/httpd/mime.types
> 
> But this package shouldn't really depend on Apache; it just wants an HTTP
> server capable of executing CGI programs, and wants to know where to install
> the executable and images so that it runs and displays properly.
> 
> There's a meta-pkgs/web-server, but it isn't what I want here. I'm thinking
> it would be handy if there were a meta-package (and/or perhaps some logic in
> bsd.pkg.mk, a la USE_JAVA) that provides WWW_DOCROOTDIR, WWW_CGIBINDIR,
> WWW_CONFDIR and the like.
> 
> What's the right way to do this?

Take a look at mail/squirrelmail, www/horde, and mail/imp.  They don't
depend on a webserver, but rather install their files into a directory tree
and leaves it to the package admin to either create the necessary symlinks
or include an example Apache config file into httpd.conf.

	Cheers,

	-- Johnny Lam <jlam@jgrind.org>