Commit | Line | Data |
---|---|---|
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 | 6 | AUTOMAKE_OPTIONS=dist-bzip2 |
7 | ||
8d138742 | 8 | SUBDIRS=libltdl gdbmobj bdbobj md5 sha1 libhmac numlib makedat userdb unicode rfc822 random128 liblock liblog |
d9898ee8 | 9 | |
10 | INCLUDES = $(LTDLINCL) | |
11 | ||
12 | modules=@LIBAUTHUSERDB@ \ | |
13 | @LIBAUTHPAM@ @LIBAUTHPWD@ @LIBAUTHSHADOW@ \ | |
14 | @LIBAUTHPGSQL@ @LIBAUTHLDAP@ @LIBAUTHMYSQL@ \ | |
ac40fd9e | 15 | @LIBAUTHCUSTOM@ @LIBAUTHPIPE@ |
d9898ee8 | 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 \ | |
d9898ee8 | 29 | libauthpgsql.la \ |
30 | libauthldap.la \ | |
31 | libauthmysql.la \ | |
32 | libauthcustom.la \ | |
33 | libauthpipe.la | |
34 | ||
ac40fd9e | 35 | CLEANFILES=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 | ||
42 | DISTCLEANFILES=dbobj.config README_authlib.html | |
43 | ||
44 | commonlibdep=libcourierauthcommon.la | |
ac40fd9e | 45 | commonldflags=-module -rpath $(pkglibdir) -export-symbols-regex 'courier_auth.*_init' -avoid-version |
d9898ee8 | 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 \ | |
8d138742 | 55 | authldapescape.c \ |
d9898ee8 | 56 | cramlib.c cramlib.h \ |
57 | checkpassword.c cryptpassword.c \ | |
ac40fd9e | 58 | checkpasswordmd5.c checkpasswordsha1.c |
d9898ee8 | 59 | |
60 | libcourierauthcommon_la_DEPENDENCIES=libcourierauth.la | |
61 | libcourierauthcommon_la_LIBADD=libcourierauth.la | |
ac40fd9e | 62 | libcourierauthcommon_la_LDFLAGS=$(libcourierauthcommon_t:%=-Wl,%) -avoid-version |
d9898ee8 | 63 | |
64 | libcourierauth_la_SOURCES=authdaemon.c authdaemonlib.c preauthdaemon.c \ | |
65 | authmoduser2.c authmoduser3.c debug.c \ | |
66 | courierauthdebug.h \ | |
67 | authoption.c | |
ac40fd9e | 68 | libcourierauth_la_LIBADD=libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la numlib/libnumlib.la \ |
d9898ee8 | 69 | random128/librandom128.la rfc822/libencode.la |
ac40fd9e | 70 | libcourierauth_la_LDFLAGS=@NETLIBS@ -avoid-version |
d9898ee8 | 71 | |
72 | # The userdb module | |
73 | ||
74 | libauthuserdb_t=userdb/libuserdb.la @dblibrary@ @LIBGDBM@ @LIBDB@ | |
75 | libauthuserdb_la_SOURCES=authuserdb.c preauthuserdb.c preauthuserdbcommon.c \ | |
76 | authuserdbpwd.c | |
77 | libauthuserdb_la_DEPENDENCIES=libcourierauthcommon.la @dblibrary@ | |
78 | libauthuserdb_la_LIBADD=$(commonlibadd) $(libauthuserdb_t) | |
79 | libauthuserdb_la_LDFLAGS=$(commonldflags) | |
80 | ||
81 | # the authpam module | |
82 | ||
83 | libauthpam_t=-lpam @SHADOWLIBS@ @AUTHPAMCRYPT@ @LIBDL@ | |
84 | ||
85 | libauthpam_la_SOURCES=authpam.c preauthpam.c authwait.h | |
86 | libauthpam_la_DEPENDENCIES=$(commonlibdep) | |
ac40fd9e | 87 | libauthpam_la_LIBADD=$(commonlibadd) $(libauthpam_t) |
88 | libauthpam_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 89 | |
90 | # The authpwd module | |
91 | ||
92 | libauthpwd_la_SOURCES=authpwd.c preauthpwd.c | |
93 | libauthpwd_la_DEPENDENCIES=$(commonlibdep) | |
94 | libauthpwd_la_LIBADD=$(commonlibadd) | |
95 | libauthpwd_la_LDFLAGS=$(commonldflags) | |
96 | ||
97 | # The authshadow module | |
98 | ||
99 | libauthshadow_t=@SHADOWLIBS@ | |
100 | ||
101 | libauthshadow_la_SOURCES=authshadow.c preauthshadow.c | |
102 | libauthshadow_la_DEPENDENCIES=$(commonlibdep) | |
ac40fd9e | 103 | libauthshadow_la_LIBADD=$(commonlibadd) $(libauthshadow_t) |
104 | libauthshadow_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 105 | |
106 | # The authpgsql module | |
107 | ||
108 | libauthpgsql_t=@PGSQL_LIBS@ @LIBM@ @NETLIBS@ | |
109 | ||
110 | libauthpgsql_la_SOURCES=authpgsql.c preauthpgsql.c authpgsqllib.c authpgsql.h | |
111 | libauthpgsql_la_DEPENDENCIES=$(commonlibdep) | |
ac40fd9e | 112 | libauthpgsql_la_LIBADD=$(commonlibadd) $(libauthpgsql_t) |
113 | libauthpgsql_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 114 | |
115 | authpgsqllib.lo: authpgsqllib.c authpgsqlrc.h | |
116 | ||
d9898ee8 | 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.c authldap.h | |
146 | libauthldap_la_DEPENDENCIES=$(commonlibdep) | |
ac40fd9e | 147 | libauthldap_la_LIBADD=$(commonlibadd) $(libauthldap_t) |
148 | libauthldap_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 149 | |
150 | authldaplib.lo: authldaplib.c authldaprc.h | |
151 | ||
152 | if HAVE_LDAP | |
153 | ||
154 | install-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 | ||
161 | uninstall-authldaprc: | |
162 | rm -f $(DESTDIR)@authldaprc@.dist | |
163 | ||
164 | else | |
165 | install-authldaprc: | |
166 | @: | |
167 | ||
168 | uninstall-authldaprc: | |
169 | @: | |
170 | endif | |
171 | ||
172 | authldaprc.h: | |
173 | echo "#define AUTHLDAPRC \"@authldaprc@\"" >authldaprc.h | |
174 | ||
175 | # The authmysql module | |
176 | ||
177 | libauthmysql_t=@MYSQL_LIBS@ @LIBM@ @NETLIBS@ | |
178 | ||
179 | libauthmysql_la_SOURCES=authmysql.c preauthmysql.c authmysqllib.c authmysql.h | |
180 | libauthmysql_la_DEPENDENCIES=$(commonlibdep) | |
ac40fd9e | 181 | libauthmysql_la_LIBADD=$(commonlibadd) $(libauthmysql_t) |
182 | libauthmysql_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 183 | |
184 | authmysqllib.lo: authmysqllib.c authmysqlrc.h | |
185 | ||
186 | if HAVE_AUTHMYSQL | |
187 | install-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 | ||
194 | uninstall-authmysqlrc: | |
195 | rm -f $(DESTDIR)@authmysqlrc@.dist | |
196 | ||
197 | else | |
198 | install-authmysqlrc: | |
199 | @: | |
200 | ||
201 | uninstall-authmysqlrc: | |
202 | @: | |
203 | endif | |
204 | ||
205 | authmysqlrc.h: | |
206 | echo "#define AUTHMYSQLRC \"@authmysqlrc@\"" >authmysqlrc.h | |
207 | ||
208 | # The authcustom module | |
209 | ||
210 | libauthcustom_la_SOURCES=authcustom.c preauthcustom.c authcustom.h | |
211 | libauthcustom_la_DEPENDENCIES=$(commonlibdep) | |
212 | libauthcustom_la_LIBADD=$(commonlibadd) | |
213 | libauthcustom_la_LDFLAGS=$(commonldflags) | |
214 | ||
215 | # The authpipe module | |
216 | libauthpipe_la_SOURCES=authpipe.c authpipelib.h authpipelib.c | |
217 | libauthpipe_la_DEPENDENCIES=$(commonlibdep) | |
218 | libauthpipe_la_LIBADD=$(commonlibadd) | |
219 | libauthpipe_la_LDFLAGS=$(commonldflags) | |
220 | ||
221 | authpipelib.lo: authpipelib.c authpipelib.h authpiperc.h | |
222 | ||
223 | authpiperc.h: | |
224 | echo "#define PIPE_PROGRAM \"@authProg@\"" >authpiperc.h | |
225 | ||
226 | ||
227 | # | |
228 | # AUTHMODULES should be listed in the best authentication order | |
229 | # | |
230 | ||
231 | noinst_PROGRAMS= \ | |
232 | authdaemontest authmksock \ | |
233 | authdaemondprog | |
234 | ||
d9898ee8 | 235 | install-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 | ||
243 | uninstall-authdaemonrc: | |
244 | rm -f $(DESTDIR)@authdaemonrc@.dist | |
245 | ||
246 | authdaemonrc.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 | ||
253 | HTMLFILES=README.html NEWS.html INSTALL.html \ | |
254 | README.authmysql.html README.authpostgres.html | |
255 | ||
256 | EXTRA_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 | |
277 | README: README.html | |
dd184caf | 278 | links -dump -no-references README.html >README |
d9898ee8 | 279 | |
280 | NEWS: NEWS.html | |
dd184caf | 281 | links -dump -no-references NEWS.html >NEWS |
d9898ee8 | 282 | |
283 | INSTALL: INSTALL.html | |
dd184caf | 284 | rm -f INSTALL; links -dump -no-references INSTALL.html >INSTALL |
d9898ee8 | 285 | |
286 | libcourierauthsasl_la_SOURCES=\ | |
287 | authsasl.c courierauthsasl.h \ | |
288 | authsaslcram.c authsasllogin.c authsaslplain.c \ | |
289 | authsaslfrombase64.c authsasltobase64.c | |
290 | libcourierauthsasl_la_LIBADD=libcourierauth.la | |
ac40fd9e | 291 | libcourierauthsasl_la_LDFLAGS=-export-symbols-regex '^auth_sasl|auth_sasl_ex$$' -avoid-version |
d9898ee8 | 292 | |
293 | libcourierauthsaslclient_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 |
299 | libcourierauthsaslclient_la_LIBADD=libcourierauth.la | |
ac40fd9e | 300 | libcourierauthsaslclient_la_LDFLAGS=-export-symbols-regex '^auth_sasl_client$$' -avoid-version |
d9898ee8 | 301 | |
302 | include_HEADERS=courier_auth_config.h courierauth.h courierauthsasl.h \ | |
303 | courierauthsaslclient.h courierauthdebug.h | |
304 | ||
305 | courierauthconfig_SOURCES=authinfo.c | |
306 | ||
307 | authpasswd_SOURCES=authpasswd.c | |
308 | authpasswd_LDADD=libcourierauthcommon.la \ | |
309 | libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la rfc822/libencode.la | |
310 | ||
311 | authtest_SOURCES=authtest.c | |
312 | authtest_DEPENDENCIES=libcourierauth.la | |
313 | authtest_LDADD=libcourierauth.la | |
314 | ||
315 | authenumerate_SOURCES=authenumerate.c | |
316 | authenumerate_DEPENDENCIES = libcourierauth.la \ | |
317 | numlib/libnumlib.la | |
318 | authenumerate_LDADD = libcourierauth.la \ | |
319 | numlib/libnumlib.la | |
320 | authenumerate_LDFLAGS= | |
321 | ||
322 | # | |
323 | # The main daemon. | |
324 | ||
325 | authdaemondprog_SOURCES=authdaemond.c | |
326 | authdaemondprog_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 | |
330 | authdaemondprog_LDADD=$(LIBLTDL) libcourierauthcommon.la liblock/liblock.la \ | |
331 | libhmac/libhmac.la md5/libmd5.la sha1/libsha1.la \ | |
332 | rfc822/libencode.la numlib/libnumlib.la | |
333 | authdaemondprog_LDFLAGS=-export-dynamic $(modules:%=-dlopen %) @NETLIBS@ | |
334 | ||
335 | authdaemontest_SOURCES=authdaemontest.c | |
336 | authdaemontest_DEPENDENCIES=libcourierauthcommon.la | |
337 | authdaemontest_LDADD=libcourierauthcommon.la @NETLIBS@ | |
338 | authdaemontest_LDFLAGS=-static | |
339 | ||
340 | authmksock_SOURCES=authmksock.c | |
341 | authmksock_LDADD=@NETLIBS@ | |
342 | ||
343 | man3=authlib.3 auth_generic.3 auth_login.3 auth_getuserinfo.3 \ | |
344 | auth_enumerate.3 auth_passwd.3 auth_getoption.3 auth_sasl.3 | |
345 | man1=authpasswd.1 authtest.1 | |
346 | ||
8d138742 | 347 | man_MANS=$(man1) $(man3) auth_sasl_ex.3 |
d9898ee8 | 348 | |
349 | BUILT1=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 | |
354 | BUILT_SOURCES=$(BUILT1) $(man3:%.3=%.html) $(man1:%.1=%.html) | |
355 | ||
356 | authchangepwdir.h: config.status | |
357 | echo '#define AUTHCHANGEPWDIR "$(pkglibexecdir)"' >authchangepwdir.h | |
358 | ||
359 | sbindir.h: config.status | |
360 | echo '#define SBINDIR "@sbindir@"' >sbindir.h | |
361 | ||
362 | pkglibdir.h: config.status | |
363 | echo '#define PKGLIBDIR "$(pkglibdir)"' >pkglibdir.h | |
364 | ||
365 | packageversion.h: config.status | |
366 | echo '#define PKGVERSION "@PACKAGE_VERSION@"' >packageversion.h | |
367 | ||
368 | pkgincludedir.h: config.status | |
369 | echo '#define PKGINCLUDEDIR "$(includedir)"' >pkgincludedir.h | |
370 | ||
371 | mailusergroup.h: config.status | |
372 | echo '#define MAILUSER "@mailuser@"' >mailusergroup.h | |
373 | echo '#define MAILGROUP "@mailgroup@"' >>mailusergroup.h | |
374 | ||
375 | noinst_DATA=$(BUILT_SOURCES) | |
376 | ||
377 | dist-hook: | |
378 | for f in $(BUILT1) ; do rm -f $(distdir)/$$f; done | |
379 | ||
380 | # automake still a bit stupid... | |
381 | ||
382 | install-data-hook: install-authdaemonrc install-authpgsqlrc \ | |
383 | install-authldaprc install-authmysqlrc | |
384 | : | |
385 | ||
386 | install-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 | |
411 | uninstall-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 | |
422 | authlib.html: authlib.html.in | |
8d138742 | 423 | $(SHELL) ./config.status --file=authlib.html |
d9898ee8 | 424 | |
425 | authlib.3: authlib.3.in | |
8d138742 | 426 | $(SHELL) ./config.status --file=authlib.3 |
d9898ee8 | 427 | |
428 | if HAVE_SGML | |
429 | authpasswd.html: authpasswd.sgml docbook/sgml2html | |
430 | docbook/sgml2html authpasswd.sgml authpasswd.html | |
431 | ||
432 | authpasswd.1: authpasswd.sgml docbook/sgml2man | |
433 | docbook/sgml2man authpasswd.sgml authpasswd.1 | |
434 | ||
435 | authtest.html: authtest.sgml docbook/sgml2html | |
436 | docbook/sgml2html authtest.sgml authtest.html | |
437 | ||
438 | authtest.1: authtest.sgml docbook/sgml2man | |
439 | docbook/sgml2man authtest.sgml authtest.1 | |
440 | ||
441 | authlib.html.in: authlib.sgml docbook/sgml2html | |
442 | docbook/sgml2html authlib.sgml authlib.html.in | |
443 | ||
444 | authlib.3.in: authlib.sgml docbook/sgml2man | |
445 | docbook/sgml2man authlib.sgml authlib.3.in | |
8d138742 | 446 | mv authlib.3 authlib.3.in |
d9898ee8 | 447 | |
448 | README_authlib.html.in: README_authlib.sgml docbook/sgml2html | |
449 | docbook/sgml2html README_authlib.sgml README_authlib.html.in | |
450 | ||
451 | auth_generic.html: auth_generic.sgml authcallback.sgml docbook/sgml2html | |
452 | docbook/sgml2html auth_generic.sgml auth_generic.html | |
453 | ||
454 | auth_generic.3: auth_generic.sgml authcallback.sgml docbook/sgml2man | |
455 | docbook/sgml2man auth_generic.sgml auth_generic.3 | |
456 | ||
457 | auth_login.html: auth_login.sgml authcallback.sgml docbook/sgml2html | |
458 | docbook/sgml2html auth_login.sgml auth_login.html | |
459 | ||
460 | auth_login.3: auth_login.sgml authcallback.sgml docbook/sgml2man | |
461 | docbook/sgml2man auth_login.sgml auth_login.3 | |
462 | ||
463 | auth_getuserinfo.html: auth_getuserinfo.sgml authcallback.sgml docbook/sgml2html | |
464 | docbook/sgml2html auth_getuserinfo.sgml auth_getuserinfo.html | |
465 | ||
466 | auth_getuserinfo.3: auth_getuserinfo.sgml authcallback.sgml docbook/sgml2man | |
467 | docbook/sgml2man auth_getuserinfo.sgml auth_getuserinfo.3 | |
468 | ||
469 | auth_enumerate.html: auth_enumerate.sgml docbook/sgml2html | |
470 | docbook/sgml2html auth_enumerate.sgml auth_enumerate.html | |
471 | ||
472 | auth_enumerate.3: auth_enumerate.sgml docbook/sgml2man | |
473 | docbook/sgml2man auth_enumerate.sgml auth_enumerate.3 | |
474 | ||
475 | auth_passwd.html: auth_passwd.sgml docbook/sgml2html | |
476 | docbook/sgml2html auth_passwd.sgml auth_passwd.html | |
477 | ||
478 | auth_passwd.3: auth_passwd.sgml docbook/sgml2man | |
479 | docbook/sgml2man auth_passwd.sgml auth_passwd.3 | |
480 | ||
481 | auth_getoption.html: auth_getoption.sgml docbook/sgml2html | |
482 | docbook/sgml2html auth_getoption.sgml auth_getoption.html | |
483 | ||
484 | auth_getoption.3: auth_getoption.sgml docbook/sgml2man | |
485 | docbook/sgml2man auth_getoption.sgml auth_getoption.3 | |
486 | ||
487 | auth_sasl.html: auth_sasl.sgml docbook/sgml2html | |
488 | docbook/sgml2html auth_sasl.sgml auth_sasl.html | |
489 | ||
490 | auth_sasl.3: auth_sasl.sgml docbook/sgml2man | |
491 | docbook/sgml2man auth_sasl.sgml auth_sasl.3 | |
492 | ||
8d138742 CE |
493 | auth_sasl_ex.3: auth_sasl.3 |
494 | touch $@ | |
d9898ee8 | 495 | |
496 | endif | |
497 | ||
8d138742 CE |
498 | authldap.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 | 505 | README_authlib.html: README_authlib.html.in config.status |
8d138742 | 506 | $(SHELL) ./config.status --file=README_authlib.html |
d9898ee8 | 507 | |
508 | authdaemond.o: authdaemonrc.h authdaemond.c | |
509 | ||
510 | ||
511 | install-migrate: authmigrate | |
512 | @SHELL@ authmigrate | |
513 | ||
514 | install-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 | ||
522 | distrelease: | |
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 | |
533 | tagrelease: | |
534 | socksify cvs tag -F -r @PACKAGE@-latest \ | |
535 | `echo @PACKAGE@-@VERSION@ | tr '.' '-'` | |
536 | ||
537 | rpm: rpm-build | |
538 | ||
539 | rpm-build: | |
8d138742 CE |
540 | $(MAKE) bump.rpm.release |
541 | $(MAKE) dist | |
542 | $(MAKE) dorpm | |
d9898ee8 | 543 | |
544 | lpm: lpm-build | |
545 | ||
546 | lpm-build: | |
8d138742 CE |
547 | $(MAKE) bump.rpm.release |
548 | $(MAKE) dist | |
549 | $(MAKE) dolpm | |
d9898ee8 | 550 | |
551 | dolpm: | |
552 | rm -rf lpm | |
553 | mkdir lpm | |
554 | lpbuild `test "@REPOSITORY@" == "" || echo --define "repository=1"` --srcbuild -o lpm @PACKAGE@-@VERSION@.tar.bz2 | |
555 | ||
556 | publish: publish-@REPOSITORY@ | |
557 | ||
558 | publish-dev: | |
8d138742 | 559 | $(MAKE) dopublish SUBDIR=dev |
d9898ee8 | 560 | |
561 | publish-prod: | |
8d138742 | 562 | $(MAKE) dopublish SUBDIR=prod |
d9898ee8 | 563 | |
564 | dopublish: | |
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 | ||
577 | dorpm: | |
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 | |
595 | bump.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 | ||
609 | upload-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 | |
615 | upload-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 | |
622 | release-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 | |
630 | HTMLDOCFILES=$(HTMLFILES) README.authdebug.html README_authlib.html \ | |
631 | $(man3:%.3=%.html) $(man1:%.1=%.html) | |
632 | ||
633 | htmldoc: $(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 |