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