Build courier-authlib (0.60.2-0hcoop7).
[hcoop/debian/courier-authlib.git] / Makefile.am
CommitLineData
64ff59ba 1# $Id: Makefile.am,v 1.123 2007/10/07 02:50:45 mrsam Exp $
d9898ee8 2#
64ff59ba 3# Copyright 1998 - 2007 Double Precision, Inc. See COPYING for
d9898ee8 4# distribution information.
5
d9898ee8 6AUTOMAKE_OPTIONS=dist-bzip2
7
8SUBDIRS=@LIBLTDL_SUBDIR@ @DBSUBDIR@ md5 sha1 libhmac numlib makedat userdb rfc822 random128 liblock liblog
9DIST_SUBDIRS=libltdl gdbmobj bdbobj md5 sha1 libhmac numlib makedat userdb rfc822 random128 liblock liblog
10
11INCLUDES = $(LTDLINCL)
12
13modules=@LIBAUTHUSERDB@ \
14 @LIBAUTHPAM@ @LIBAUTHPWD@ @LIBAUTHSHADOW@ \
15 @LIBAUTHPGSQL@ @LIBAUTHLDAP@ @LIBAUTHMYSQL@ \
16 @LIBAUTHCUSTOM@ @LIBAUTHVCHKPW@ @LIBAUTHPIPE@
17
18pkglibexecdir=$(libexecdir)/courier-authlib
19pkglibexec_SCRIPTS=authsystem.passwd
20
21pkglib_LTLIBRARIES=libcourierauth.la \
22 libcourierauthsasl.la libcourierauthsaslclient.la \
23 libcourierauthcommon.la $(modules)
24sbin_SCRIPTS=authdaemond
25sbin_PROGRAMS=authtest authenumerate authpasswd
26bin_PROGRAMS=courierauthconfig
27
28EXTRA_LTLIBRARIES=libauthuserdb.la \
29 libauthpam.la libauthpwd.la libauthshadow.la \
30 libauthvchkpw.la \
31 libauthpgsql.la \
32 libauthldap.la \
33 libauthmysql.la \
34 libauthcustom.la \
35 libauthpipe.la
36
37CLEANFILES=authldaprc.h authmysqlrc.h authdaemonrc.h vpopmail_config.h \
38 authpgsqlrc.h authpiperc.h authdaemon \
39 authlib.3 authlib.html packageversion.h \
40 authchangepwdir.h sbindir.h pkglibdir.h pkgincludedir.h \
41 mailusergroup.h authinfodaemondlist.c permissions.dat \
42 README.authdebug.html
43
44DISTCLEANFILES=dbobj.config README_authlib.html
45
46commonlibdep=libcourierauthcommon.la
47commonldflags=-module -rpath $(pkglibdir) -export-symbols-regex 'courier_auth.*_init'
48commonlibadd=libcourierauthcommon.la
49
50libcourierauthcommon_t=@CRYPTLIBS@
51libcourierauthcommon_la_SOURCES= \
52 auth.h courierauth.h \
53 authpwdenumerate.c \
54 authsaslfrombase64.c authsasltobase64.c \
55 authstaticlist.h \
56 authsyschangepwd.c authsyscommon.c \
57 cramlib.c cramlib.h \
58 checkpassword.c cryptpassword.c \
59 $(checkpasswordmd5c) $(checkpasswordsha1c)
60
61libcourierauthcommon_la_DEPENDENCIES=libcourierauth.la
62libcourierauthcommon_la_LIBADD=libcourierauth.la
63libcourierauthcommon_la_LDFLAGS=$(libcourierauthcommon_t:%=-Wl,%)
64
65libcourierauth_la_SOURCES=authdaemon.c authdaemonlib.c preauthdaemon.c \
66 authmoduser2.c authmoduser3.c debug.c \
67 courierauthdebug.h \
68 authoption.c
69libcourierauth_la_LIBADD=@HMACLIB@ @MD5LIB@ @SHA1LIB@ numlib/libnumlib.la \
70 random128/librandom128.la rfc822/libencode.la
71libcourierauth_la_LDFLAGS=@NETLIBS@
72
73# The userdb module
74
75libauthuserdb_t=userdb/libuserdb.la @dblibrary@ @LIBGDBM@ @LIBDB@
76libauthuserdb_la_SOURCES=authuserdb.c preauthuserdb.c preauthuserdbcommon.c \
77 authuserdbpwd.c
78libauthuserdb_la_DEPENDENCIES=libcourierauthcommon.la @dblibrary@
79libauthuserdb_la_LIBADD=$(commonlibadd) $(libauthuserdb_t)
80libauthuserdb_la_LDFLAGS=$(commonldflags)
81
82# the authpam module
83
84libauthpam_t=-lpam @SHADOWLIBS@ @AUTHPAMCRYPT@ @LIBDL@
85
86libauthpam_la_SOURCES=authpam.c preauthpam.c authwait.h
87libauthpam_la_DEPENDENCIES=$(commonlibdep)
88libauthpam_la_LIBADD=$(commonlibadd)
89libauthpam_la_LDFLAGS=$(commonldflags) $(libauthpam_t)
90
91# The authpwd module
92
93libauthpwd_la_SOURCES=authpwd.c preauthpwd.c
94libauthpwd_la_DEPENDENCIES=$(commonlibdep)
95libauthpwd_la_LIBADD=$(commonlibadd)
96libauthpwd_la_LDFLAGS=$(commonldflags)
97
98# The authshadow module
99
100libauthshadow_t=@SHADOWLIBS@
101
102libauthshadow_la_SOURCES=authshadow.c preauthshadow.c
103libauthshadow_la_DEPENDENCIES=$(commonlibdep)
104libauthshadow_la_LIBADD=$(commonlibadd)
105libauthshadow_la_LDFLAGS=$(commonldflags) $(libauthshadow_t)
106
107# The authvchkpw module
108
109libauthvchkpw_t=@VPOPMAILLIBS@ @LIBM@
110libauthvchkpw_la_SOURCES=authvchkpw.c authvchkpwlib.c preauthvchkpw.c
111libauthvchkpw_la_DEPENDENCIES=$(commonlibdep)
112libauthvchkpw_la_LIBADD=$(commonlibadd)
113libauthvchkpw_la_LDFLAGS=$(commonldflags) $(libauthvchkpw_t)
114
115authvchkpw.lo: authvchkpw.c vpopmail_config.h
116preauthvchkpw.lo: preauthvchkpw.c vpopmail_config.h
117
118vpopmail_config.h:
119 echo '#include "@vpopmail_home@/include/config.h"' >vpopmail_config.h
120
121# The authpgsql module
122
123libauthpgsql_t=@PGSQL_LIBS@ @LIBM@ @NETLIBS@
124
125libauthpgsql_la_SOURCES=authpgsql.c preauthpgsql.c authpgsqllib.c authpgsql.h
126libauthpgsql_la_DEPENDENCIES=$(commonlibdep)
127libauthpgsql_la_LIBADD=$(commonlibadd)
128libauthpgsql_la_LDFLAGS=$(commonldflags) $(libauthpgsql_t)
129
130authpgsqllib.lo: authpgsqllib.c authpgsqlrc.h
131
132
133if HAVE_AUTHPGSQL
134
135install-authpgsqlrc:
136 $(mkinstalldirs) $(DESTDIR)`dirname @authpgsqlrc@` || :
137 $(INSTALL_DATA) -m 660 $(srcdir)/authpgsqlrc \
138 $(DESTDIR)@authpgsqlrc@.dist
139 -chown @mailuser@ $(DESTDIR)@authpgsqlrc@.dist
140 -chgrp @mailgroup@ $(DESTDIR)@authpgsqlrc@.dist
141
142uninstall-authpgsqlrc:
143 rm -f $(DESTDIR)@authpgsqlrc@.dist
144
145else
146
147install-authpgsqlrc:
148 @:
149
150uninstall-authpgsqlrc:
151 @:
152endif
153
154authpgsqlrc.h:
155 echo "#define AUTHPGSQLRC \"@authpgsqlrc@\"" >authpgsqlrc.h
156
157
158# The authldap module
159
160libauthldap_t=@LDAPLIBS@ @NETLIBS@
161libauthldap_la_SOURCES=authldap.c preauthldap.c authldaplib.c authldap.h
162libauthldap_la_DEPENDENCIES=$(commonlibdep)
163libauthldap_la_LIBADD=$(commonlibadd)
164libauthldap_la_LDFLAGS=$(commonldflags) $(libauthldap_t)
165
166authldaplib.lo: authldaplib.c authldaprc.h
167
168if HAVE_LDAP
169
170install-authldaprc:
171 $(mkinstalldirs) $(DESTDIR)`dirname @authldaprc@` || :
172 $(INSTALL_DATA) -m 660 $(srcdir)/authldaprc \
173 $(DESTDIR)@authldaprc@.dist
174 -chown @mailuser@ $(DESTDIR)@authldaprc@.dist
175 -chgrp @mailgroup@ $(DESTDIR)@authldaprc@.dist
176
177uninstall-authldaprc:
178 rm -f $(DESTDIR)@authldaprc@.dist
179
180else
181install-authldaprc:
182 @:
183
184uninstall-authldaprc:
185 @:
186endif
187
188authldaprc.h:
189 echo "#define AUTHLDAPRC \"@authldaprc@\"" >authldaprc.h
190
191# The authmysql module
192
193libauthmysql_t=@MYSQL_LIBS@ @LIBM@ @NETLIBS@
194
195libauthmysql_la_SOURCES=authmysql.c preauthmysql.c authmysqllib.c authmysql.h
196libauthmysql_la_DEPENDENCIES=$(commonlibdep)
197libauthmysql_la_LIBADD=$(commonlibadd)
198libauthmysql_la_LDFLAGS=$(commonldflags) $(libauthmysql_t)
199
200authmysqllib.lo: authmysqllib.c authmysqlrc.h
201
202if HAVE_AUTHMYSQL
203install-authmysqlrc:
204 $(mkinstalldirs) $(DESTDIR)`dirname @authmysqlrc@` || :
205 $(INSTALL_DATA) -m 660 $(srcdir)/authmysqlrc \
206 $(DESTDIR)@authmysqlrc@.dist
207 -chown @mailuser@ $(DESTDIR)@authmysqlrc@.dist
208 -chgrp @mailgroup@ $(DESTDIR)@authmysqlrc@.dist
209
210uninstall-authmysqlrc:
211 rm -f $(DESTDIR)@authmysqlrc@.dist
212
213else
214install-authmysqlrc:
215 @:
216
217uninstall-authmysqlrc:
218 @:
219endif
220
221authmysqlrc.h:
222 echo "#define AUTHMYSQLRC \"@authmysqlrc@\"" >authmysqlrc.h
223
224# The authcustom module
225
226libauthcustom_la_SOURCES=authcustom.c preauthcustom.c authcustom.h
227libauthcustom_la_DEPENDENCIES=$(commonlibdep)
228libauthcustom_la_LIBADD=$(commonlibadd)
229libauthcustom_la_LDFLAGS=$(commonldflags)
230
231# The authpipe module
232libauthpipe_la_SOURCES=authpipe.c authpipelib.h authpipelib.c
233libauthpipe_la_DEPENDENCIES=$(commonlibdep)
234libauthpipe_la_LIBADD=$(commonlibadd)
235libauthpipe_la_LDFLAGS=$(commonldflags)
236
237authpipelib.lo: authpipelib.c authpipelib.h authpiperc.h
238
239authpiperc.h:
240 echo "#define PIPE_PROGRAM \"@authProg@\"" >authpiperc.h
241
242
243#
244# AUTHMODULES should be listed in the best authentication order
245#
246
247noinst_PROGRAMS= \
248 authdaemontest authmksock \
249 authdaemondprog
250
251
252if HAVE_MD5
253checkpasswordmd5c=checkpasswordmd5.c
254else
255checkpasswordmd5c=
256endif
257
258if HAVE_SHA1
259checkpasswordsha1c=checkpasswordsha1.c
260else
261checkpasswordsha1c=
262endif
263
264install-authdaemonrc:
265 $(mkinstalldirs) $(DESTDIR)`dirname @authdaemonrc@` || :
266 sed 's/@ALLMODULES@/$(modules:lib%.la=%)/' <authdaemonrc >authdaemonrc.tmp
267 $(INSTALL_DATA) -m 660 authdaemonrc.tmp $(DESTDIR)@authdaemonrc@.dist
268 rm -f authdaemonrc.tmp
269 -chown @mailuser@ $(DESTDIR)@authdaemonrc@.dist
270 -chgrp @mailgroup@ $(DESTDIR)@authdaemonrc@.dist
271
272uninstall-authdaemonrc:
273 rm -f $(DESTDIR)@authdaemonrc@.dist
274
275authdaemonrc.h:
276 echo "#define AUTHDAEMONRC \"@authdaemonrc@\"" >authdaemonrc.h
277 echo "#define AUTHDAEMONVAR \"@authdaemonvar@\"" >>authdaemonrc.h
278 echo "#define AUTHDAEMONPID AUTHDAEMONVAR \"/pid\"" >>authdaemonrc.h
279 echo "#define AUTHDAEMONSOCK AUTHDAEMONVAR \"/socket\"" >>authdaemonrc.h
280 echo "#define AUTHDAEMONLOCK AUTHDAEMONVAR \"/lock\"" >>authdaemonrc.h
281
282HTMLFILES=README.html NEWS.html INSTALL.html \
283 README.authmysql.html README.authpostgres.html
284
285EXTRA_DIST=$(HTMLFILES) sysconftool COPYING COPYING.GPL\
286 authldap.schema \
287 checkpasswordmd5.c checkpasswordsha1.c \
288 authldaprc authmysqlrc authpgsqlrc README.ldap \
289 README.authmysql.myownquery \
64ff59ba 290 README.authdebug.html.in \
d9898ee8 291 courier-authlib.spec \
292 courier-authlib.lpspec pgpkeys.txt \
293 README_authlib.html.in \
294 authlib.html.in authlib.3.in \
295 authpasswd.html authpasswd.1 \
296 authtest.html authtest.1 \
297 auth_sasl.html auth_sasl.3 \
298 auth_generic.html auth_generic.3 \
299 auth_login.html auth_login.3 \
300 auth_passwd.html auth_passwd.3 \
301 auth_getuserinfo.html auth_getuserinfo.3 \
302 auth_enumerate.html auth_enumerate.3 \
303 auth_getoption.html auth_getoption.3 \
64ff59ba 304 samplepipe.pl
d9898ee8 305
306README: README.html
64ff59ba 307 links -dump -no-references README.html >README
d9898ee8 308
309NEWS: NEWS.html
64ff59ba 310 links -dump -no-references NEWS.html >NEWS
d9898ee8 311
312INSTALL: INSTALL.html
64ff59ba 313 rm -f INSTALL; links -dump -no-references INSTALL.html >INSTALL
d9898ee8 314
315libcourierauthsasl_la_SOURCES=\
316 authsasl.c courierauthsasl.h \
317 authsaslcram.c authsasllogin.c authsaslplain.c \
318 authsaslfrombase64.c authsasltobase64.c
319libcourierauthsasl_la_LIBADD=libcourierauth.la
320libcourierauthsasl_la_LDFLAGS=-export-symbols-regex '^auth_sasl$$'
321
322libcourierauthsaslclient_la_SOURCES=courierauthsaslclient.h \
323 authsaslclient.c authsaslclient.h authsaslclientcram.c \
324 authsaslclientcrammd5.c authsaslclientcramsha1.c \
325 authsaslclientlogin.c authsaslclientplain.c \
326 authsaslfrombase64.c authsasltobase64.c
327libcourierauthsaslclient_la_LIBADD=libcourierauth.la
328libcourierauthsaslclient_la_LDFLAGS=-export-symbols-regex '^auth_sasl_client$$'
329
330include_HEADERS=courier_auth_config.h courierauth.h courierauthsasl.h \
331 courierauthsaslclient.h courierauthdebug.h
332
333courierauthconfig_SOURCES=authinfo.c
334
335authpasswd_SOURCES=authpasswd.c
336authpasswd_LDADD=libcourierauthcommon.la \
337 libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la rfc822/libencode.la
338
339authtest_SOURCES=authtest.c
340authtest_DEPENDENCIES=libcourierauth.la
341authtest_LDADD=libcourierauth.la
342
343authenumerate_SOURCES=authenumerate.c
344authenumerate_DEPENDENCIES = libcourierauth.la \
345 numlib/libnumlib.la
346authenumerate_LDADD = libcourierauth.la \
347 numlib/libnumlib.la
348authenumerate_LDFLAGS=
349
350#
351# The main daemon.
352
353authdaemondprog_SOURCES=authdaemond.c
354authdaemondprog_DEPENDENCIES=libcourierauthcommon.la \
355 liblock/liblock.la $(modules) \
356 libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la \
357 rfc822/libencode.la numlib/libnumlib.la
358authdaemondprog_LDADD=$(LIBLTDL) libcourierauthcommon.la liblock/liblock.la \
359 libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la \
360 rfc822/libencode.la numlib/libnumlib.la
361authdaemondprog_LDFLAGS=-export-dynamic $(modules:%=-dlopen %) @NETLIBS@
362
363authdaemontest_SOURCES=authdaemontest.c
364authdaemontest_DEPENDENCIES=libcourierauthcommon.la
365authdaemontest_LDADD=libcourierauthcommon.la @NETLIBS@
366authdaemontest_LDFLAGS=-static
367
368authmksock_SOURCES=authmksock.c
369authmksock_LDADD=@NETLIBS@
370
371man3=authlib.3 auth_generic.3 auth_login.3 auth_getuserinfo.3 \
372 auth_enumerate.3 auth_passwd.3 auth_getoption.3 auth_sasl.3
373man1=authpasswd.1 authtest.1
374
375man_MANS=$(man1) $(man3)
376
377BUILT1=authlib.html authldaprc.h authmysqlrc.h authpgsqlrc.h authpiperc.h \
378 authdaemonrc.h vpopmail_config.h packageversion.h \
379 authchangepwdir.h sbindir.h \
380 pkglibdir.h pkgincludedir.h mailusergroup.h \
381 README_authlib.html
382BUILT_SOURCES=$(BUILT1) $(man3:%.3=%.html) $(man1:%.1=%.html)
383
384authchangepwdir.h: config.status
385 echo '#define AUTHCHANGEPWDIR "$(pkglibexecdir)"' >authchangepwdir.h
386
387sbindir.h: config.status
388 echo '#define SBINDIR "@sbindir@"' >sbindir.h
389
390pkglibdir.h: config.status
391 echo '#define PKGLIBDIR "$(pkglibdir)"' >pkglibdir.h
392
393packageversion.h: config.status
394 echo '#define PKGVERSION "@PACKAGE_VERSION@"' >packageversion.h
395
396pkgincludedir.h: config.status
397 echo '#define PKGINCLUDEDIR "$(includedir)"' >pkgincludedir.h
398
399mailusergroup.h: config.status
400 echo '#define MAILUSER "@mailuser@"' >mailusergroup.h
401 echo '#define MAILGROUP "@mailgroup@"' >>mailusergroup.h
402
403noinst_DATA=$(BUILT_SOURCES)
404
405dist-hook:
406 for f in $(BUILT1) ; do rm -f $(distdir)/$$f; done
407
408# automake still a bit stupid...
409
410install-data-hook: install-authdaemonrc install-authpgsqlrc \
411 install-authldaprc install-authmysqlrc
412 :
413
414install-exec-hook:
415 $(mkinstalldirs) $(DESTDIR)$(bindir) || :
416 $(mkinstalldirs) $(DESTDIR)$(sbindir) || :
417 $(mkinstalldirs) $(DESTDIR)$(pkglibexecdir) || :
418 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) authdaemondprog $(DESTDIR)$(pkglibexecdir)/authdaemond
419 $(mkinstalldirs) $(DESTDIR)@authdaemonvar@ || :
420 chmod 750 $(DESTDIR)@authdaemonvar@
421 -chown @mailuser@ $(DESTDIR)@authdaemonvar@
422 -chgrp @mailgroup@ $(DESTDIR)@authdaemonvar@
423 test "@LIBAUTHUSERDB@" = "" && exit 0 ;\
424 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) makedat/makedatprog \
425 $(DESTDIR)$(pkglibexecdir)/makedatprog ; \
426 $(INSTALL_SCRIPT) userdb/vchkpw2userdb \
427 $(DESTDIR)$(sbindir)/vchkpw2userdb ; \
428 $(INSTALL_SCRIPT) userdb/pw2userdb \
429 $(DESTDIR)$(sbindir)/pw2userdb ; \
430 $(INSTALL_SCRIPT) userdb/makeuserdb \
431 $(DESTDIR)$(sbindir)/makeuserdb ; \
432 $(INSTALL_SCRIPT) userdb/userdb.pl \
433 $(DESTDIR)$(sbindir)/userdb ; \
434 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) userdb/userdbpw \
435 $(DESTDIR)$(sbindir)/userdbpw ; \
436 $(INSTALL_SCRIPT) userdb-test-cram-md5.pl \
437 $(DESTDIR)$(sbindir)/userdb-test-cram-md5
438
439uninstall-hook: uninstall-authldaprc uninstall-authdaemonrc uninstall-authmysqlrc uninstall-authpgsqlrc
440 rm -f $(DESTDIR)$(pkglibexecdir)/authdaemond
441 test "@AUTHUSERDB@" = "" && exit 0 ;\
442 rm -f $(DESTDIR)$(pkglibexecdir)/makedatprog \
443 $(DESTDIR)$(sbindir)/vchkpw2userdb \
444 $(DESTDIR)$(sbindir)/pw2userdb \
445 $(DESTDIR)$(sbindir)/makeuserdb \
446 $(DESTDIR)$(sbindir)/userdb \
447 $(DESTDIR)$(sbindir)/userdbpw \
448 $(DESTDIR)$(sbindir)/userdb-test-cram-md5
449
450authlib.html: authlib.html.in
451 CONFIG_FILES=authlib.html CONFIG_HEADERS= $(SHELL) ./config.status
452
453authlib.3: authlib.3.in
454 CONFIG_FILES=authlib.3 CONFIG_HEADERS= $(SHELL) ./config.status
455
456if HAVE_SGML
457authpasswd.html: authpasswd.sgml docbook/sgml2html
458 docbook/sgml2html authpasswd.sgml authpasswd.html
459
460authpasswd.1: authpasswd.sgml docbook/sgml2man
461 docbook/sgml2man authpasswd.sgml authpasswd.1
462
463authtest.html: authtest.sgml docbook/sgml2html
464 docbook/sgml2html authtest.sgml authtest.html
465
466authtest.1: authtest.sgml docbook/sgml2man
467 docbook/sgml2man authtest.sgml authtest.1
468
469authlib.html.in: authlib.sgml docbook/sgml2html
470 docbook/sgml2html authlib.sgml authlib.html.in
471
472authlib.3.in: authlib.sgml docbook/sgml2man
473 docbook/sgml2man authlib.sgml authlib.3.in
474
475README_authlib.html.in: README_authlib.sgml docbook/sgml2html
476 docbook/sgml2html README_authlib.sgml README_authlib.html.in
477
478auth_generic.html: auth_generic.sgml authcallback.sgml docbook/sgml2html
479 docbook/sgml2html auth_generic.sgml auth_generic.html
480
481auth_generic.3: auth_generic.sgml authcallback.sgml docbook/sgml2man
482 docbook/sgml2man auth_generic.sgml auth_generic.3
483
484auth_login.html: auth_login.sgml authcallback.sgml docbook/sgml2html
485 docbook/sgml2html auth_login.sgml auth_login.html
486
487auth_login.3: auth_login.sgml authcallback.sgml docbook/sgml2man
488 docbook/sgml2man auth_login.sgml auth_login.3
489
490auth_getuserinfo.html: auth_getuserinfo.sgml authcallback.sgml docbook/sgml2html
491 docbook/sgml2html auth_getuserinfo.sgml auth_getuserinfo.html
492
493auth_getuserinfo.3: auth_getuserinfo.sgml authcallback.sgml docbook/sgml2man
494 docbook/sgml2man auth_getuserinfo.sgml auth_getuserinfo.3
495
496auth_enumerate.html: auth_enumerate.sgml docbook/sgml2html
497 docbook/sgml2html auth_enumerate.sgml auth_enumerate.html
498
499auth_enumerate.3: auth_enumerate.sgml docbook/sgml2man
500 docbook/sgml2man auth_enumerate.sgml auth_enumerate.3
501
502auth_passwd.html: auth_passwd.sgml docbook/sgml2html
503 docbook/sgml2html auth_passwd.sgml auth_passwd.html
504
505auth_passwd.3: auth_passwd.sgml docbook/sgml2man
506 docbook/sgml2man auth_passwd.sgml auth_passwd.3
507
508auth_getoption.html: auth_getoption.sgml docbook/sgml2html
509 docbook/sgml2html auth_getoption.sgml auth_getoption.html
510
511auth_getoption.3: auth_getoption.sgml docbook/sgml2man
512 docbook/sgml2man auth_getoption.sgml auth_getoption.3
513
514auth_sasl.html: auth_sasl.sgml docbook/sgml2html
515 docbook/sgml2html auth_sasl.sgml auth_sasl.html
516
517auth_sasl.3: auth_sasl.sgml docbook/sgml2man
518 docbook/sgml2man auth_sasl.sgml auth_sasl.3
519
520
521endif
522
523README_authlib.html: README_authlib.html.in config.status
524 CONFIG_FILES=README_authlib.html CONFIG_HEADERS= $(SHELL) ./config.status
525
526authdaemond.o: authdaemonrc.h authdaemond.c
527
528
529install-migrate: authmigrate
530 @SHELL@ authmigrate
531
532install-configure:
533 test -f $(DESTDIR)@authdaemonrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authdaemonrc@.dist || true
534 test -f $(DESTDIR)@authmysqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authmysqlrc@.dist || true
535 test -f $(DESTDIR)@authpgsqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authpgsqlrc@.dist || true
536 test -f $(DESTDIR)@authldaprc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authldaprc@.dist || true
537
538# For maintainer's use only
539
540distrelease:
541 umask 022; $(MAKE) -$(MAKEFLAGS) distcheck
542 $(MAKE) -$(MAKEFLAGS) rpm
543 socksify cvs commit
544 socksify cvs tag -F @PACKAGE@-latest
545 $(MAKE) -$(MAKEFLAGS)
546 $(MAKE) -$(MAKEFLAGS)
547 rm -f @PACKAGE@.spec @PACKAGE@.lpspec
548 $(MAKE) -$(MAKEFLAGS) @PACKAGE@.spec @PACKAGE@.lpspec
549 $(MAKE) -$(MAKEFLAGS) dist
550
551tagrelease:
552 socksify cvs tag -F -r @PACKAGE@-latest \
553 `echo @PACKAGE@-@VERSION@ | tr '.' '-'`
554
555rpm: rpm-build
556
557rpm-build:
558 $(MAKE) -$(MAKEFLAGS) bump.rpm.release
559 $(MAKE) -$(MAKEFLAGS) dist
560 $(MAKE) -$(MAKEFLAGS) dorpm
561
562lpm: lpm-build
563
564lpm-build:
565 $(MAKE) -$(MAKEFLAGS) bump.rpm.release
566 $(MAKE) -$(MAKEFLAGS) dist
567 $(MAKE) -$(MAKEFLAGS) dolpm
568
569dolpm:
570 rm -rf lpm
571 mkdir lpm
572 lpbuild `test "@REPOSITORY@" == "" || echo --define "repository=1"` --srcbuild -o lpm @PACKAGE@-@VERSION@.tar.bz2
573
574publish: publish-@REPOSITORY@
575
576publish-dev:
577 $(MAKE) -$(MAKEFLAGS) dopublish SUBDIR=dev
578
579publish-prod:
580 $(MAKE) -$(MAKEFLAGS) dopublish SUBDIR=prod
581
582dopublish:
583 lpbuild --resign lpm/*
584 rm -rf lpmtmp
585 mkdir lpmtmp
586 ln lpm/* lpmtmp
587 rm -f lpmtmp/*debuginfo*
588 mv lpmtmp/*.src.lp repository-$(SUBDIR)/`lpm -q --distribution`/sources
589 mv lpmtmp/*.lp repository-$(SUBDIR)/`lpm -q --distribution`/packages
590 rm -rf lpmtmp
591 ls -t repository-$(SUBDIR)/`lpm -q --distribution`/sources | tail -n +6 | xargs -r -n 1 lpm --erase repository-$(SUBDIR)
592 lpm --sync repository-$(SUBDIR)
593 rsync -a -v --delete-after repository-$(SUBDIR)/`lpm -q --distribution`/. headache:lpmtool.com/www/repositories/$(SUBDIR)/courier-authlib/`lpm -q --distribution`
594
595dorpm:
596 rm -rf rpm/BUILD/*
597 rm -f rpm/RPMS/*/*
598 rm -f rpm/SOURCES/*
599 rm -f rpm/SPECS/*
600 rm -f rpm/SRPMS/*
601 unset MAKEFLAGS ; test ! -f $$HOME/.bashrc || . $$HOME/.bashrc; rpmbuild -ta --clean @PACKAGE@-@VERSION@.tar.bz2
602
603bump.rpm.release: @PACKAGE@.spec @PACKAGE@.lpspec
604 test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
605 NEXT_RELEASE=0; \
606 test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE"; \
607 RELEASE=`expr $$NEXT_RELEASE + 1`; \
608 echo "VERSION=@VERSION@" >$(srcdir)/rpm.release; \
609 echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \
64ff59ba 610 sed 's/^Release: .*/Release: '$$RELEASE'%{?dist}%{?courier_release}/' \
d9898ee8 611 <@PACKAGE@.spec >@PACKAGE@.spec.new; \
612 mv @PACKAGE@.spec.new @PACKAGE@.spec; \
613 sed 's/^Release: .*/Release: '$$RELEASE'/' \
614 <@PACKAGE@.lpspec >@PACKAGE@.lpspec.new; \
615 mv @PACKAGE@.lpspec.new @PACKAGE@.lpspec
616
617upload-beta:
618 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
64ff59ba 619 socksify ssh grace.speakeasy.net echo @PACKAGE@-@VERSION@.tar.bz2 `ls -l @PACKAGE@-@VERSION@.tar.bz2 | awk ' { print $$5 } '` \>courier-mta.org/@PACKAGE@.beta
d9898ee8 620 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 '
621 scp @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig headache:torrents.courier-mta.org/pub/@PACKAGE@-dev/@PACKAGE@-@VERSION@
622
623upload-dist:
624 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
625 socksify cvs tag -F -r @PACKAGE@-latest \
626 `echo @PACKAGE@-@VERSION@ | tr '.' '-'`
627 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;'
628 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 '
629 scp @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig headache:torrents.courier-mta.org/pub/@PACKAGE@/@PACKAGE@-@VERSION@
630
631
632release-dist:
633 test -z "$(SFPASSWD)" && exit 1; exit 0
634 ./changelog.pl >changelog.txt
635 emacs releasenotes.txt
636 test -f releasenotes.txt || exit 1
637 socksify ../sftools/release.pl mrsam $(SFPASSWD) courier authlib @VERSION@ releasenotes.txt changelog.txt @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig
64ff59ba 638 socksify ssh grace.speakeasy.net rm -f courier-mta.org/@PACKAGE@.beta
d9898ee8 639
640HTMLDOCFILES=$(HTMLFILES) README.authdebug.html README_authlib.html \
641 $(man3:%.3=%.html) $(man1:%.1=%.html)
642
643htmldoc: $(HTMLDOCFILES)
64ff59ba 644 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