On 4/24/06, David F. Skoll <[EMAIL PROTECTED]> wrote: > Jonas Eckerman wrote: > > > + my $LOCAL_STATE_DIR = '/var/lib'; > > That works for FreeBSD, but look at Mail-SpamAssassin's Makefile.PL. > It contains a subroutine "_set_macro_LOCALSTATEDIR" that supposedly > sets the default for LOCAL_STATE_DIR. If anyone doesn't think > SpamAssassin is an evil piece of code, _set_macro_LOCALSTATEDIR should > remove all remaining doubts. > > If/when I find a general-purpose way to detect what the [EMAIL PROTECTED]&$&#$ > LOCAL_STATE_DIR should be set to for a given SpamAssassin installation, > I will patch MIMEDefang to use it. If I can't figure it out, I'll > just use /var/lib.
sa-update knows what LOCAL_STATE_DIR is, and sa-update is simply Perl code, so how about just taking its setting of LOCAL_STATE_DIR and eval'ing it? my $LOCAL_STATE_DIR; my $setlocalstatedir = `grep '^my \$LOCAL_STATE_DIR' /usr/bin/sa-update`; $setlocalstatedir =~ s/^my //; # Remove leading "my" so that $LOCAL_STATE_DIR isn't scoped locally to eval block eval $setlocalstatedir; Or is that too much of a hack? Josh Kelley _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list [email protected] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

