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