Subject: Re: making PLIST conditional based on options?
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Mark Davies <mark@mcs.vuw.ac.nz>
List: pkgsrc-users
Date: 10/22/2006 16:39:59
On Sunday 22 October 2006 14:31, Steven M. Bellovin wrote:
> I'm creating a package where one file may or may not be installed,
> depending on option settings. What's the best way to do that? Have a
> PLIST.withoption and a PLIST.withoutoption, and set PLIST_SRC
> conditionally?
If its just one or two files I'd do the variable in the PLIST that
conditionally evaluates to "" or a comment approach.
.if !empty(PKG_OPTIONS:Mfoo)
PLIST_SUBST+= HAVE_FOO=""
.else
PLIST_SUBST+= HAVE_FOO="@comment "
.endif
with the relevant entry in the PLIST being:
${HAVE_FOO}/path/name
cheers
mark