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