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