-# $Id: Makefile.am,v 1.123 2007/10/07 02:50:45 mrsam Exp $
+# $Id: Makefile.am,v 1.146 2009/12/25 21:53:37 mrsam Exp $
#
-# Copyright 1998 - 2007 Double Precision, Inc. See COPYING for
+# Copyright 1998 - 2009 Double Precision, Inc. See COPYING for
# distribution information.
AUTOMAKE_OPTIONS=dist-bzip2
-SUBDIRS=@LIBLTDL_SUBDIR@ @DBSUBDIR@ md5 sha1 libhmac numlib makedat userdb rfc822 random128 liblock liblog
-DIST_SUBDIRS=libltdl gdbmobj bdbobj md5 sha1 libhmac numlib makedat userdb rfc822 random128 liblock liblog
+SUBDIRS=libltdl gdbmobj bdbobj md5 sha1 libhmac numlib makedat userdb unicode rfc822 random128 liblock liblog
INCLUDES = $(LTDLINCL)
modules=@LIBAUTHUSERDB@ \
@LIBAUTHPAM@ @LIBAUTHPWD@ @LIBAUTHSHADOW@ \
@LIBAUTHPGSQL@ @LIBAUTHLDAP@ @LIBAUTHMYSQL@ \
- @LIBAUTHCUSTOM@ @LIBAUTHVCHKPW@ @LIBAUTHPIPE@
+ @LIBAUTHCUSTOM@ @LIBAUTHPIPE@
pkglibexecdir=$(libexecdir)/courier-authlib
pkglibexec_SCRIPTS=authsystem.passwd
EXTRA_LTLIBRARIES=libauthuserdb.la \
libauthpam.la libauthpwd.la libauthshadow.la \
- libauthvchkpw.la \
libauthpgsql.la \
libauthldap.la \
libauthmysql.la \
libauthcustom.la \
libauthpipe.la
-CLEANFILES=authldaprc.h authmysqlrc.h authdaemonrc.h vpopmail_config.h \
+CLEANFILES=authldaprc.h authmysqlrc.h authdaemonrc.h \
authpgsqlrc.h authpiperc.h authdaemon \
authlib.3 authlib.html packageversion.h \
authchangepwdir.h sbindir.h pkglibdir.h pkgincludedir.h \
DISTCLEANFILES=dbobj.config README_authlib.html
commonlibdep=libcourierauthcommon.la
-commonldflags=-module -rpath $(pkglibdir) -export-symbols-regex 'courier_auth.*_init'
+commonldflags=-module -rpath $(pkglibdir) -export-symbols-regex 'courier_auth.*_init' -avoid-version
commonlibadd=libcourierauthcommon.la
libcourierauthcommon_t=@CRYPTLIBS@
authsaslfrombase64.c authsasltobase64.c \
authstaticlist.h \
authsyschangepwd.c authsyscommon.c \
+ authldapescape.c \
cramlib.c cramlib.h \
checkpassword.c cryptpassword.c \
- $(checkpasswordmd5c) $(checkpasswordsha1c)
+ checkpasswordmd5.c checkpasswordsha1.c
libcourierauthcommon_la_DEPENDENCIES=libcourierauth.la
libcourierauthcommon_la_LIBADD=libcourierauth.la
-libcourierauthcommon_la_LDFLAGS=$(libcourierauthcommon_t:%=-Wl,%)
+libcourierauthcommon_la_LDFLAGS=$(libcourierauthcommon_t:%=-Wl,%) -avoid-version
libcourierauth_la_SOURCES=authdaemon.c authdaemonlib.c preauthdaemon.c \
authmoduser2.c authmoduser3.c debug.c \
courierauthdebug.h \
authoption.c
-libcourierauth_la_LIBADD=@HMACLIB@ @MD5LIB@ @SHA1LIB@ numlib/libnumlib.la \
+libcourierauth_la_LIBADD=libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la numlib/libnumlib.la \
random128/librandom128.la rfc822/libencode.la
-libcourierauth_la_LDFLAGS=@NETLIBS@
+libcourierauth_la_LDFLAGS=@NETLIBS@ -avoid-version
# The userdb module
libauthpam_la_SOURCES=authpam.c preauthpam.c authwait.h
libauthpam_la_DEPENDENCIES=$(commonlibdep)
-libauthpam_la_LIBADD=$(commonlibadd)
-libauthpam_la_LDFLAGS=$(commonldflags) $(libauthpam_t)
+libauthpam_la_LIBADD=$(commonlibadd) $(libauthpam_t)
+libauthpam_la_LDFLAGS=$(commonldflags)
# The authpwd module
libauthshadow_la_SOURCES=authshadow.c preauthshadow.c
libauthshadow_la_DEPENDENCIES=$(commonlibdep)
-libauthshadow_la_LIBADD=$(commonlibadd)
-libauthshadow_la_LDFLAGS=$(commonldflags) $(libauthshadow_t)
-
-# The authvchkpw module
-
-libauthvchkpw_t=@VPOPMAILLIBS@ @LIBM@
-libauthvchkpw_la_SOURCES=authvchkpw.c authvchkpwlib.c preauthvchkpw.c
-libauthvchkpw_la_DEPENDENCIES=$(commonlibdep)
-libauthvchkpw_la_LIBADD=$(commonlibadd)
-libauthvchkpw_la_LDFLAGS=$(commonldflags) $(libauthvchkpw_t)
-
-authvchkpw.lo: authvchkpw.c vpopmail_config.h
-preauthvchkpw.lo: preauthvchkpw.c vpopmail_config.h
-
-vpopmail_config.h:
- echo '#include "@vpopmail_home@/include/config.h"' >vpopmail_config.h
+libauthshadow_la_LIBADD=$(commonlibadd) $(libauthshadow_t)
+libauthshadow_la_LDFLAGS=$(commonldflags)
# The authpgsql module
libauthpgsql_la_SOURCES=authpgsql.c preauthpgsql.c authpgsqllib.c authpgsql.h
libauthpgsql_la_DEPENDENCIES=$(commonlibdep)
-libauthpgsql_la_LIBADD=$(commonlibadd)
-libauthpgsql_la_LDFLAGS=$(commonldflags) $(libauthpgsql_t)
+libauthpgsql_la_LIBADD=$(commonlibadd) $(libauthpgsql_t)
+libauthpgsql_la_LDFLAGS=$(commonldflags)
authpgsqllib.lo: authpgsqllib.c authpgsqlrc.h
-
if HAVE_AUTHPGSQL
install-authpgsqlrc:
libauthldap_t=@LDAPLIBS@ @NETLIBS@
libauthldap_la_SOURCES=authldap.c preauthldap.c authldaplib.c authldap.h
libauthldap_la_DEPENDENCIES=$(commonlibdep)
-libauthldap_la_LIBADD=$(commonlibadd)
-libauthldap_la_LDFLAGS=$(commonldflags) $(libauthldap_t)
+libauthldap_la_LIBADD=$(commonlibadd) $(libauthldap_t)
+libauthldap_la_LDFLAGS=$(commonldflags)
authldaplib.lo: authldaplib.c authldaprc.h
libauthmysql_la_SOURCES=authmysql.c preauthmysql.c authmysqllib.c authmysql.h
libauthmysql_la_DEPENDENCIES=$(commonlibdep)
-libauthmysql_la_LIBADD=$(commonlibadd)
-libauthmysql_la_LDFLAGS=$(commonldflags) $(libauthmysql_t)
+libauthmysql_la_LIBADD=$(commonlibadd) $(libauthmysql_t)
+libauthmysql_la_LDFLAGS=$(commonldflags)
authmysqllib.lo: authmysqllib.c authmysqlrc.h
authdaemontest authmksock \
authdaemondprog
-
-if HAVE_MD5
-checkpasswordmd5c=checkpasswordmd5.c
-else
-checkpasswordmd5c=
-endif
-
-if HAVE_SHA1
-checkpasswordsha1c=checkpasswordsha1.c
-else
-checkpasswordsha1c=
-endif
-
install-authdaemonrc:
$(mkinstalldirs) $(DESTDIR)`dirname @authdaemonrc@` || :
sed 's/@ALLMODULES@/$(modules:lib%.la=%)/' <authdaemonrc >authdaemonrc.tmp
EXTRA_DIST=$(HTMLFILES) sysconftool COPYING COPYING.GPL\
authldap.schema \
- checkpasswordmd5.c checkpasswordsha1.c \
+ authldap.ldif \
authldaprc authmysqlrc authpgsqlrc README.ldap \
README.authmysql.myownquery \
README.authdebug.html.in \
authlib.html.in authlib.3.in \
authpasswd.html authpasswd.1 \
authtest.html authtest.1 \
- auth_sasl.html auth_sasl.3 \
+ auth_sasl.html auth_sasl.3 auth_sasl_ex.3 \
auth_generic.html auth_generic.3 \
auth_login.html auth_login.3 \
auth_passwd.html auth_passwd.3 \
authsaslcram.c authsasllogin.c authsaslplain.c \
authsaslfrombase64.c authsasltobase64.c
libcourierauthsasl_la_LIBADD=libcourierauth.la
-libcourierauthsasl_la_LDFLAGS=-export-symbols-regex '^auth_sasl$$'
+libcourierauthsasl_la_LDFLAGS=-export-symbols-regex '^auth_sasl|auth_sasl_ex$$' -avoid-version
libcourierauthsaslclient_la_SOURCES=courierauthsaslclient.h \
authsaslclient.c authsaslclient.h authsaslclientcram.c \
authsaslclientcrammd5.c authsaslclientcramsha1.c \
authsaslclientlogin.c authsaslclientplain.c \
+ authsaslclientexternal.c \
authsaslfrombase64.c authsasltobase64.c
libcourierauthsaslclient_la_LIBADD=libcourierauth.la
-libcourierauthsaslclient_la_LDFLAGS=-export-symbols-regex '^auth_sasl_client$$'
+libcourierauthsaslclient_la_LDFLAGS=-export-symbols-regex '^auth_sasl_client$$' -avoid-version
include_HEADERS=courier_auth_config.h courierauth.h courierauthsasl.h \
courierauthsaslclient.h courierauthdebug.h
auth_enumerate.3 auth_passwd.3 auth_getoption.3 auth_sasl.3
man1=authpasswd.1 authtest.1
-man_MANS=$(man1) $(man3)
+man_MANS=$(man1) $(man3) auth_sasl_ex.3
BUILT1=authlib.html authldaprc.h authmysqlrc.h authpgsqlrc.h authpiperc.h \
- authdaemonrc.h vpopmail_config.h packageversion.h \
+ authdaemonrc.h packageversion.h \
authchangepwdir.h sbindir.h \
pkglibdir.h pkgincludedir.h mailusergroup.h \
README_authlib.html
test "@LIBAUTHUSERDB@" = "" && exit 0 ;\
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) makedat/makedatprog \
$(DESTDIR)$(pkglibexecdir)/makedatprog ; \
- $(INSTALL_SCRIPT) userdb/vchkpw2userdb \
- $(DESTDIR)$(sbindir)/vchkpw2userdb ; \
$(INSTALL_SCRIPT) userdb/pw2userdb \
$(DESTDIR)$(sbindir)/pw2userdb ; \
$(INSTALL_SCRIPT) userdb/makeuserdb \
$(DESTDIR)$(sbindir)/userdbpw ; \
$(INSTALL_SCRIPT) userdb-test-cram-md5.pl \
$(DESTDIR)$(sbindir)/userdb-test-cram-md5
+ for f in $(pkglib_LTLIBRARIES); do . ./$$f; rm -f $(DESTDIR)$(pkglibdir)/$$dlname.0 $(DESTDIR)$(pkglibdir)/$$dlname.0.0; ln -s $$dlname $(DESTDIR)$(pkglibdir)/$$dlname.0; done
+
uninstall-hook: uninstall-authldaprc uninstall-authdaemonrc uninstall-authmysqlrc uninstall-authpgsqlrc
rm -f $(DESTDIR)$(pkglibexecdir)/authdaemond
test "@AUTHUSERDB@" = "" && exit 0 ;\
rm -f $(DESTDIR)$(pkglibexecdir)/makedatprog \
- $(DESTDIR)$(sbindir)/vchkpw2userdb \
$(DESTDIR)$(sbindir)/pw2userdb \
$(DESTDIR)$(sbindir)/makeuserdb \
$(DESTDIR)$(sbindir)/userdb \
$(DESTDIR)$(sbindir)/userdbpw \
$(DESTDIR)$(sbindir)/userdb-test-cram-md5
+ for f in $(pkglib_LTLIBRARIES); do . ./$$f; rm -f $(DESTDIR)$(pkglibdir)/$$dlname.0; done
authlib.html: authlib.html.in
- CONFIG_FILES=authlib.html CONFIG_HEADERS= $(SHELL) ./config.status
+ $(SHELL) ./config.status --file=authlib.html
authlib.3: authlib.3.in
- CONFIG_FILES=authlib.3 CONFIG_HEADERS= $(SHELL) ./config.status
+ $(SHELL) ./config.status --file=authlib.3
if HAVE_SGML
authpasswd.html: authpasswd.sgml docbook/sgml2html
authlib.3.in: authlib.sgml docbook/sgml2man
docbook/sgml2man authlib.sgml authlib.3.in
+ mv authlib.3 authlib.3.in
README_authlib.html.in: README_authlib.sgml docbook/sgml2html
docbook/sgml2html README_authlib.sgml README_authlib.html.in
auth_sasl.3: auth_sasl.sgml docbook/sgml2man
docbook/sgml2man auth_sasl.sgml auth_sasl.3
+auth_sasl_ex.3: auth_sasl.3
+ touch $@
endif
+authldap.ldif: authldap.schema
+ echo 'dn: cn=courier,cn=schema,cn=config' >authldap.ldif.tmp
+ echo 'objectClass: olcSchemaConfig' >>authldap.ldif.tmp
+ echo 'cn: courier' >>authldap.ldif.tmp
+ sed '/^#/d;s/^attributetype/olcAttributeTypes:/;s/^objectclass/olcObjectClasses:/;s/^$$/#/' <$(srcdir)/authldap.schema | tr '\011' ' ' >>authldap.ldif.tmp
+ mv -f authldap.ldif.tmp authldap.ldif
+
README_authlib.html: README_authlib.html.in config.status
- CONFIG_FILES=README_authlib.html CONFIG_HEADERS= $(SHELL) ./config.status
+ $(SHELL) ./config.status --file=README_authlib.html
authdaemond.o: authdaemonrc.h authdaemond.c
# For maintainer's use only
distrelease:
- umask 022; $(MAKE) -$(MAKEFLAGS) distcheck
- $(MAKE) -$(MAKEFLAGS) rpm
+ umask 022; $(MAKE) distcheck
+ $(MAKE) rpm
socksify cvs commit
socksify cvs tag -F @PACKAGE@-latest
- $(MAKE) -$(MAKEFLAGS)
- $(MAKE) -$(MAKEFLAGS)
+ $(MAKE)
+ $(MAKE)
rm -f @PACKAGE@.spec @PACKAGE@.lpspec
- $(MAKE) -$(MAKEFLAGS) @PACKAGE@.spec @PACKAGE@.lpspec
- $(MAKE) -$(MAKEFLAGS) dist
+ $(MAKE) @PACKAGE@.spec @PACKAGE@.lpspec
+ $(MAKE) dist
tagrelease:
socksify cvs tag -F -r @PACKAGE@-latest \
rpm: rpm-build
rpm-build:
- $(MAKE) -$(MAKEFLAGS) bump.rpm.release
- $(MAKE) -$(MAKEFLAGS) dist
- $(MAKE) -$(MAKEFLAGS) dorpm
+ $(MAKE) bump.rpm.release
+ $(MAKE) dist
+ $(MAKE) dorpm
lpm: lpm-build
lpm-build:
- $(MAKE) -$(MAKEFLAGS) bump.rpm.release
- $(MAKE) -$(MAKEFLAGS) dist
- $(MAKE) -$(MAKEFLAGS) dolpm
+ $(MAKE) bump.rpm.release
+ $(MAKE) dist
+ $(MAKE) dolpm
dolpm:
rm -rf lpm
publish: publish-@REPOSITORY@
publish-dev:
- $(MAKE) -$(MAKEFLAGS) dopublish SUBDIR=dev
+ $(MAKE) dopublish SUBDIR=dev
publish-prod:
- $(MAKE) -$(MAKEFLAGS) dopublish SUBDIR=prod
+ $(MAKE) dopublish SUBDIR=prod
dopublish:
lpbuild --resign lpm/*
rm -f rpm/SOURCES/*
rm -f rpm/SPECS/*
rm -f rpm/SRPMS/*
- unset MAKEFLAGS ; test ! -f $$HOME/.bashrc || . $$HOME/.bashrc; rpmbuild -ta --clean @PACKAGE@-@VERSION@.tar.bz2
+ rpmbuild -ta --clean \
+ --define "_topdir `pwd`/rpm" \
+ --define '_rpmdir %{_topdir}/RPMS' \
+ --define '_srcrpmdir %{_topdir}/SRPMS' \
+ --define '_sourcedir %{_topdir}/SOURCES' \
+ --define '_specdir %{_topdir}/SPECS' \
+ --define '_builddir %{_topdir}/BUILD' \
+ --define '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
+ --define '_tmppath %{_var}/tmp' \
+ --define '__spec_prep_pre %{___build_pre}' \
+ @PACKAGE@-@VERSION@.tar.bz2
bump.rpm.release: @PACKAGE@.spec @PACKAGE@.lpspec
test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
mv @PACKAGE@.lpspec.new @PACKAGE@.lpspec
upload-beta:
+ test -z "$(SFPASSWD)" && exit 1; exit 0
rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
socksify ssh grace.speakeasy.net echo @PACKAGE@-@VERSION@.tar.bz2 `ls -l @PACKAGE@-@VERSION@.tar.bz2 | awk ' { print $$5 } '` \>courier-mta.org/@PACKAGE@.beta
- ssh headache 'cd torrents.courier-mta.org/pub/@PACKAGE@-dev && rm -rf @PACKAGE@-@VERSION@ && mkdir @PACKAGE@-@VERSION@ && echo seeder_args=--max_upload_rate 50 >@PACKAGE@-@VERSION@.info && ls -t | sed 1,6d | xargs rm -rf '
- scp @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig headache:torrents.courier-mta.org/pub/@PACKAGE@-dev/@PACKAGE@-@VERSION@
+ ../sftools/release.pl mrsam $(SFPASSWD) courier authlib-devel `echo @VERSION@|sed 's/.*\(........\)/\1/'` @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
upload-dist:
rm -f @PACKAGE@-@VERSION@.tar.bz2.sig; gpg --detach-sign --default-key mrsam@courier-mta.com @PACKAGE@-@VERSION@.tar.bz2; test -f @PACKAGE@-@VERSION@.tar.bz2.sig || exit 1
socksify cvs tag -F -r @PACKAGE@-latest \
`echo @PACKAGE@-@VERSION@ | tr '.' '-'`
- socksify perl -e 'use Net::FTP; $$ftp=Net::FTP->new("upload.sourceforge.net.", Debug => 1, Passive => 1 ) || die; $$ftp->login("anonymous", "anonymous") || die; $$ftp->cwd("/incoming") && $$ftp->binary() && $$ftp->hash(1) && $$ftp->put("@PACKAGE@-@VERSION@.tar.bz2") && $$ftp->put("@PACKAGE@-@VERSION@.tar.bz2.sig") && exit 0; die;'
- ssh headache 'cd torrents.courier-mta.org/pub/@PACKAGE@ && rm -rf @PACKAGE@-@VERSION@ && mkdir @PACKAGE@-@VERSION@ && echo seeder_args=--max_upload_rate 50 >@PACKAGE@-@VERSION@.info && ls -t | sed 1,6d | xargs rm -rf '
- scp @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig headache:torrents.courier-mta.org/pub/@PACKAGE@/@PACKAGE@-@VERSION@
-
+ socksify ../sftools/release.pl mrsam $(SFPASSWD) courier authlib @VERSION@ @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
+ socksify ssh grace.speakeasy.net rm -f courier-mta.org/@PACKAGE@.beta
release-dist:
test -z "$(SFPASSWD)" && exit 1; exit 0
$(man3:%.3=%.html) $(man1:%.1=%.html)
htmldoc: $(HTMLDOCFILES)
- for f in $^; do d=`basename $$f`; test "$$d" = "README.html" && d="index2.html"; xsltproc --nonet $$HOME/www/www.courier-mta.org/xsl/authlib.xsl $$f | perl -ne 's~\$(id):.*\$$~\$(id):'"$$h"'\$$~; print' >html/$$d; done
+ for f in $^; do d=`basename $$f`; test "$$d" = "README.html" && d="index2.html"; tidy -i -q --tidy-mark no --doctype transitional --input-encoding utf8 --output-encoding utf8 -asxml <$$f >$$f.tmp ; xsltproc --nonet $$HOME/www/www.courier-mta.org/xsl/authlib.xsl $$f.tmp | perl -ne 's~\$(id):.*\$$~\$(id):'"$$h"'\$$~; print' >html/$$d; rm -f $$f.tmp; done