I've attached a patch against courier-authlib-0.57 that replaces some
@VAR@ usage with $(VAR) in courier-authlib/Makefile.am. This is
probably only of benefit for people who are preparing courier-authlib
for use in some package system. In my case, I want to install the
example configuration files, e.g. authpgsqlrc, authldaprc, etc., to
a path that's different from the ones configured and hardcoded into
courier-authlib. With this change, I can do this:
make install authpgsqlrc=/usr/local/examples/courier/authpgsqlrc
And install the example authpgsqlrc file into the above path, even
though courier-authlib is configured to look for it in
/usr/local/etc/courier at run-time.
This is nothing against sysconftool, and the *very* nice way that it
allows one to update one's config files to work with newer versions
of courier. I just want to install the example file for
reference/documentation purposes since it's for a package system.
Cheers,
-- Johnny Lam <[EMAIL PROTECTED]>
--- Makefile.am.orig 2005-07-16 14:25:25.000000000 -0400
+++ Makefile.am
@@ -3,7 +3,7 @@
# Copyright 1998 - 2005 Double Precision, Inc. See COPYING for
# distribution information.
-AUTOMAKE = srcdir=${srcdir} @SHELL@ ${srcdir}/automake.fix @AUTOMAKE@
+AUTOMAKE = srcdir=${srcdir} $(SHELL) ${srcdir}/automake.fix @AUTOMAKE@
AUTOMAKE_OPTIONS=dist-bzip2
SUBDIRS=libltdl @DBSUBDIR@ md5 sha1 libhmac numlib makedat userdb rfc822
random128 liblock liblog
@@ -117,7 +117,7 @@ authvchkpw.lo: authvchkpw.c vpopmail_con
preauthvchkpw.lo: preauthvchkpw.c vpopmail_config.h
vpopmail_config.h:
- echo '#include "@vpopmail_home@/include/config.h"' >vpopmail_config.h
+ echo '#include "$(vpopmail_home)/include/config.h"' >vpopmail_config.h
# The authpgsql module
@@ -134,14 +134,14 @@ authpgsqllib.lo: authpgsqllib.c authpgsq
if HAVE_AUTHPGSQL
install-authpgsqlrc:
- $(mkinstalldirs) $(DESTDIR)`dirname @[EMAIL PROTECTED]
+ $(mkinstalldirs) $(DESTDIR)`dirname $(authpgsqlrc)`
$(INSTALL_DATA) -m 660 $(srcdir)/authpgsqlrc \
- $(DESTDIR)@[EMAIL PROTECTED]
- -chown @mailuser@ $(DESTDIR)@[EMAIL PROTECTED]
- -chgrp @mailgroup@ $(DESTDIR)@[EMAIL PROTECTED]
+ $(DESTDIR)$(authpgsqlrc).dist
+ -chown $(mailuser) $(DESTDIR)$(authpgsqlrc).dist
+ -chgrp $(mailgroup) $(DESTDIR)$(authpgsqlrc).dist
uninstall-authpgsqlrc:
- rm -f $(DESTDIR)@[EMAIL PROTECTED]
+ rm -f $(DESTDIR)$(authpgsqlrc).dist
else
@@ -153,7 +153,7 @@ uninstall-authpgsqlrc:
endif
authpgsqlrc.h:
- echo "#define AUTHPGSQLRC \"@[EMAIL PROTECTED]"" >authpgsqlrc.h
+ echo "#define AUTHPGSQLRC \"$(authpgsqlrc)\"" >authpgsqlrc.h
# The authldap module
@@ -169,14 +169,14 @@ authldaplib.lo: authldaplib.c authldaprc
if HAVE_LDAP
install-authldaprc:
- $(mkinstalldirs) $(DESTDIR)`dirname @[EMAIL PROTECTED]
+ $(mkinstalldirs) $(DESTDIR)`dirname $(authldaprc)`
$(INSTALL_DATA) -m 660 $(srcdir)/authldaprc \
- $(DESTDIR)@[EMAIL PROTECTED]
- -chown @mailuser@ $(DESTDIR)@[EMAIL PROTECTED]
- -chgrp @mailgroup@ $(DESTDIR)@[EMAIL PROTECTED]
+ $(DESTDIR)$(authldaprc).dist
+ -chown $(mailuser) $(DESTDIR)$(authldaprc).dist
+ -chgrp $(mailgroup) $(DESTDIR)$(authldaprc).dist
uninstall-authldaprc:
- rm -f $(DESTDIR)@[EMAIL PROTECTED]
+ rm -f $(DESTDIR)$(authldaprc).dist
else
install-authldaprc:
@@ -187,7 +187,7 @@ uninstall-authldaprc:
endif
authldaprc.h:
- echo "#define AUTHLDAPRC \"@[EMAIL PROTECTED]"" >authldaprc.h
+ echo "#define AUTHLDAPRC \"$(authldaprc)\"" >authldaprc.h
# The authmysql module
@@ -202,14 +202,14 @@ authmysqllib.lo: authmysqllib.c authmysq
if HAVE_AUTHMYSQL
install-authmysqlrc:
- $(mkinstalldirs) $(DESTDIR)`dirname @[EMAIL PROTECTED]
+ $(mkinstalldirs) $(DESTDIR)`dirname $(authmysqlrc)`
$(INSTALL_DATA) -m 660 $(srcdir)/authmysqlrc \
- $(DESTDIR)@[EMAIL PROTECTED]
- -chown @mailuser@ $(DESTDIR)@[EMAIL PROTECTED]
- -chgrp @mailgroup@ $(DESTDIR)@[EMAIL PROTECTED]
+ $(DESTDIR)$(authmysqlrc).dist
+ -chown $(mailuser) $(DESTDIR)$(authmysqlrc).dist
+ -chgrp $(mailgroup) $(DESTDIR)$(authmysqlrc).dist
uninstall-authmysqlrc:
- rm -f $(DESTDIR)@[EMAIL PROTECTED]
+ rm -f $(DESTDIR)$(authmysqlrc).dist
else
install-authmysqlrc:
@@ -220,7 +220,7 @@ uninstall-authmysqlrc:
endif
authmysqlrc.h:
- echo "#define AUTHMYSQLRC \"@[EMAIL PROTECTED]"" >authmysqlrc.h
+ echo "#define AUTHMYSQLRC \"$(authmysqlrc)\"" >authmysqlrc.h
# The authcustom module
@@ -238,7 +238,7 @@ libauthpipe_la_LDFLAGS=$(commonldflags)
authpipelib.lo: authpipelib.c authpipelib.h authpiperc.h
authpiperc.h:
- echo "#define PIPE_PROGRAM \"@[EMAIL PROTECTED]"" >authpiperc.h
+ echo "#define PIPE_PROGRAM \"$(authProg)\"" >authpiperc.h
#
@@ -263,19 +263,19 @@ checkpasswordsha1c=
endif
install-authdaemonrc:
- $(mkinstalldirs) $(DESTDIR)`dirname @[EMAIL PROTECTED]
+ $(mkinstalldirs) $(DESTDIR)`dirname $(authdaemonrc)`
sed 's/@ALLMODULES@/$(modules:lib%.la=%)/' <authdaemonrc
>authdaemonrc.tmp
- $(INSTALL_DATA) -m 660 authdaemonrc.tmp $(DESTDIR)@[EMAIL PROTECTED]
+ $(INSTALL_DATA) -m 660 authdaemonrc.tmp $(DESTDIR)$(authdaemonrc).dist
rm -f authdaemonrc.tmp
- -chown @mailuser@ $(DESTDIR)@[EMAIL PROTECTED]
- -chgrp @mailgroup@ $(DESTDIR)@[EMAIL PROTECTED]
+ -chown $(mailuser) $(DESTDIR)$(authdaemonrc).dist
+ -chgrp $(mailgroup) $(DESTDIR)$(authdaemonrc).dist
uninstall-authdaemonrc:
- rm -f $(DESTDIR)@[EMAIL PROTECTED]
+ rm -f $(DESTDIR)$(authdaemonrc).dist
authdaemonrc.h:
- echo "#define AUTHDAEMONRC \"@[EMAIL PROTECTED]"" >authdaemonrc.h
- echo "#define AUTHDAEMONVAR \"@[EMAIL PROTECTED]"" >>authdaemonrc.h
+ echo "#define AUTHDAEMONRC \"$(authdaemonrc)\"" >authdaemonrc.h
+ echo "#define AUTHDAEMONVAR \"$(authdaemonvar)\"" >>authdaemonrc.h
echo "#define AUTHDAEMONPID AUTHDAEMONVAR \"/pid\"" >>authdaemonrc.h
echo "#define AUTHDAEMONSOCK AUTHDAEMONVAR \"/socket\"" >>authdaemonrc.h
echo "#define AUTHDAEMONLOCK AUTHDAEMONVAR \"/lock\"" >>authdaemonrc.h
@@ -379,7 +379,7 @@ authchangepwdir.h: config.status
echo '#define AUTHCHANGEPWDIR "$(pkglibexecdir)"' >authchangepwdir.h
sbindir.h: config.status
- echo '#define SBINDIR "@sbindir@"' >sbindir.h
+ echo '#define SBINDIR "$(sbindir)"' >sbindir.h
pkglibdir.h: config.status
echo '#define PKGLIBDIR "$(pkglibdir)"' >pkglibdir.h
@@ -391,8 +391,8 @@ pkgincludedir.h: config.status
echo '#define PKGINCLUDEDIR "$(includedir)"' >pkgincludedir.h
mailusergroup.h: config.status
- echo '#define MAILUSER "@mailuser@"' >mailusergroup.h
- echo '#define MAILGROUP "@mailgroup@"' >>mailusergroup.h
+ echo '#define MAILUSER "$(mailuser)"' >mailusergroup.h
+ echo '#define MAILGROUP "$(mailgroup)"' >>mailusergroup.h
noinst_DATA=$(BUILT_SOURCES)
@@ -410,10 +410,10 @@ install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(sbindir)
$(mkinstalldirs) $(DESTDIR)$(pkglibexecdir)
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM)
authdaemondprog $(DESTDIR)$(pkglibexecdir)/authdaemond
- $(mkinstalldirs) $(DESTDIR)@authdaemonvar@
- chmod 750 $(DESTDIR)@authdaemonvar@
- -chown @mailuser@ $(DESTDIR)@authdaemonvar@
- -chgrp @mailgroup@ $(DESTDIR)@authdaemonvar@
+ $(mkinstalldirs) $(DESTDIR)$(authdaemonvar)
+ chmod 750 $(DESTDIR)$(authdaemonvar)
+ -chown $(mailuser) $(DESTDIR)$(authdaemonvar)
+ -chgrp $(mailgroup) $(DESTDIR)$(authdaemonvar)
test "@LIBAUTHUSERDB@" = "" && exit 0 ;\
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) makedat/makedatprog \
$(DESTDIR)$(pkglibexecdir)/makedatprog ; \
@@ -521,13 +521,13 @@ authdaemond.o: authdaemonrc.h authdaemon
install-migrate: authmigrate
- @SHELL@ authmigrate
+ $(SHELL) authmigrate
install-configure:
- test -f $(DESTDIR)@[EMAIL PROTECTED] && @SYSCONFTOOL@ $(DESTDIR)@[EMAIL
PROTECTED] || true
- test -f $(DESTDIR)@[EMAIL PROTECTED] && @SYSCONFTOOL@ $(DESTDIR)@[EMAIL
PROTECTED] || true
- test -f $(DESTDIR)@[EMAIL PROTECTED] && @SYSCONFTOOL@ $(DESTDIR)@[EMAIL
PROTECTED] || true
- test -f $(DESTDIR)@[EMAIL PROTECTED] && @SYSCONFTOOL@ $(DESTDIR)@[EMAIL
PROTECTED] || true
+ test -f $(DESTDIR)$(authdaemonrc).dist && $(SYSCONFTOOL)
$(DESTDIR)$(authdaemonrc).dist || true
+ test -f $(DESTDIR)$(authmysqlrc).dist && $(SYSCONFTOOL)
$(DESTDIR)$(authmysqlrc).dist || true
+ test -f $(DESTDIR)$(authpgsqlrc).dist && $(SYSCONFTOOL)
$(DESTDIR)$(authpgsqlrc).dist || true
+ test -f $(DESTDIR)$(authldaprc).dist && $(SYSCONFTOOL)
$(DESTDIR)$(authldaprc).dist || true
# For maintainer's use only