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 | ||
d50284c4 | 7 | SUBDIRS=libs/gdbmobj libs/bdbobj libs/md5 libs/sha1 libs/libhmac libs/numlib libs/makedat userdb 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 \ | |
0e333c05 CE |
20 | libcourierauthcommon.la libcourierauthsasl.la libcourierauthsaslclient.la \ |
21 | $(modules) | |
d9898ee8 | 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 \ | |
0e333c05 CE |
51 | authconfigfile.cpp \ |
52 | authconfigfile.h \ | |
d9898ee8 | 53 | authpwdenumerate.c \ |
54 | authsaslfrombase64.c authsasltobase64.c \ | |
b0322a85 | 55 | courierauthstaticlist.h \ |
d9898ee8 | 56 | authsyschangepwd.c authsyscommon.c \ |
8d138742 | 57 | authldapescape.c \ |
0e333c05 | 58 | cramlib.c \ |
d9898ee8 | 59 | checkpassword.c cryptpassword.c \ |
ac40fd9e | 60 | checkpasswordmd5.c checkpasswordsha1.c |
d9898ee8 | 61 | |
62 | libcourierauthcommon_la_DEPENDENCIES=libcourierauth.la | |
63 | libcourierauthcommon_la_LIBADD=libcourierauth.la | |
ac40fd9e | 64 | libcourierauthcommon_la_LDFLAGS=$(libcourierauthcommon_t:%=-Wl,%) -avoid-version |
d9898ee8 | 65 | |
66 | libcourierauth_la_SOURCES=authdaemon.c authdaemonlib.c preauthdaemon.c \ | |
67 | authmoduser2.c authmoduser3.c debug.c \ | |
68 | courierauthdebug.h \ | |
69 | authoption.c | |
b0322a85 CE |
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 | |
ac40fd9e | 72 | libcourierauth_la_LDFLAGS=@NETLIBS@ -avoid-version |
d9898ee8 | 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) | |
ac40fd9e | 89 | libauthpam_la_LIBADD=$(commonlibadd) $(libauthpam_t) |
90 | libauthpam_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 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) | |
ac40fd9e | 105 | libauthshadow_la_LIBADD=$(commonlibadd) $(libauthshadow_t) |
106 | libauthshadow_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 107 | |
108 | # The authpgsql module | |
109 | ||
110 | libauthpgsql_t=@PGSQL_LIBS@ @LIBM@ @NETLIBS@ | |
111 | ||
0e333c05 | 112 | libauthpgsql_la_SOURCES=authpgsql.c authpgsqllib.cpp authpgsql.h |
d9898ee8 | 113 | libauthpgsql_la_DEPENDENCIES=$(commonlibdep) |
ac40fd9e | 114 | libauthpgsql_la_LIBADD=$(commonlibadd) $(libauthpgsql_t) |
115 | libauthpgsql_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 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@ | |
0e333c05 | 145 | libauthldap_la_SOURCES=authldap.c preauthldap.c authldaplib.cpp authldap.h |
d9898ee8 | 146 | libauthldap_la_DEPENDENCIES=$(commonlibdep) |
ac40fd9e | 147 | libauthldap_la_LIBADD=$(commonlibadd) $(libauthldap_t) |
148 | libauthldap_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 149 | |
d9898ee8 | 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 | ||
0e333c05 | 177 | libauthmysql_la_SOURCES=authmysql.cpp preauthmysql.cpp authmysqllib.cpp authmysql.h |
d9898ee8 | 178 | libauthmysql_la_DEPENDENCIES=$(commonlibdep) |
ac40fd9e | 179 | libauthmysql_la_LIBADD=$(commonlibadd) $(libauthmysql_t) |
180 | libauthmysql_la_LDFLAGS=$(commonldflags) | |
d9898ee8 | 181 | |
d9898ee8 | 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 | ||
b0322a85 CE |
204 | # The authsqlite module |
205 | ||
206 | libauthsqlite_t=@SQLITE_LIBS@ @NETLIBS@ | |
207 | ||
0e333c05 | 208 | libauthsqlite_la_SOURCES=authsqlite.cpp authsqlitelib.cpp authsqlite.h |
b0322a85 CE |
209 | libauthsqlite_la_DEPENDENCIES=$(commonlibdep) |
210 | libauthsqlite_la_LIBADD=$(commonlibadd) $(libauthsqlite_t) | |
211 | libauthsqlite_la_LDFLAGS=$(commonldflags) | |
212 | ||
b0322a85 CE |
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 | ||
d9898ee8 | 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 | ||
d9898ee8 | 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 \ | |
b0322a85 | 281 | README.authsqlite.html README.authmysql.html README.authpostgres.html |
d9898ee8 | 282 | |
0e333c05 CE |
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 | ||
d9898ee8 | 293 | EXTRA_DIST=$(HTMLFILES) sysconftool COPYING COPYING.GPL\ |
294 | authldap.schema \ | |
8d138742 | 295 | authldap.ldif \ |
0e333c05 | 296 | $(GITFILES) README.ldap \ |
d9898ee8 | 297 | README.authmysql.myownquery \ |
dd184caf | 298 | README.authdebug.html.in \ |
d9898ee8 | 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 \ | |
8d138742 | 305 | auth_sasl.html auth_sasl.3 auth_sasl_ex.3 \ |
d9898ee8 | 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 \ | |
d50284c4 | 310 | auth_mkhomedir.html auth_mkhomedir.3 \ |
d9898ee8 | 311 | auth_enumerate.html auth_enumerate.3 \ |
312 | auth_getoption.html auth_getoption.3 \ | |
dd184caf | 313 | samplepipe.pl |
d9898ee8 | 314 | |
315 | README: README.html | |
dd184caf | 316 | links -dump -no-references README.html >README |
d9898ee8 | 317 | |
318 | NEWS: NEWS.html | |
dd184caf | 319 | links -dump -no-references NEWS.html >NEWS |
d9898ee8 | 320 | |
321 | INSTALL: INSTALL.html | |
dd184caf | 322 | rm -f INSTALL; links -dump -no-references INSTALL.html >INSTALL |
d9898ee8 | 323 | |
324 | libcourierauthsasl_la_SOURCES=\ | |
325 | authsasl.c courierauthsasl.h \ | |
326 | authsaslcram.c authsasllogin.c authsaslplain.c \ | |
327 | authsaslfrombase64.c authsasltobase64.c | |
b0322a85 CE |
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 | |
d9898ee8 | 330 | |
331 | libcourierauthsaslclient_la_SOURCES=courierauthsaslclient.h \ | |
332 | authsaslclient.c authsaslclient.h authsaslclientcram.c \ | |
333 | authsaslclientcrammd5.c authsaslclientcramsha1.c \ | |
334 | authsaslclientlogin.c authsaslclientplain.c \ | |
ac40fd9e | 335 | authsaslclientexternal.c \ |
d9898ee8 | 336 | authsaslfrombase64.c authsasltobase64.c |
337 | libcourierauthsaslclient_la_LIBADD=libcourierauth.la | |
ac40fd9e | 338 | libcourierauthsaslclient_la_LDFLAGS=-export-symbols-regex '^auth_sasl_client$$' -avoid-version |
d9898ee8 | 339 | |
340 | include_HEADERS=courier_auth_config.h courierauth.h courierauthsasl.h \ | |
b0322a85 | 341 | courierauthsaslclient.h courierauthdebug.h courierauthstaticlist.h |
d9898ee8 | 342 | |
343 | courierauthconfig_SOURCES=authinfo.c | |
344 | ||
345 | authpasswd_SOURCES=authpasswd.c | |
346 | authpasswd_LDADD=libcourierauthcommon.la \ | |
b0322a85 | 347 | libs/libhmac/libhmac.la libs/md5/libmd5.la libs/sha1/libsha1.la libs/rfc822/libencode.la |
d9898ee8 | 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 \ | |
b0322a85 | 355 | libs/numlib/libnumlib.la |
d9898ee8 | 356 | authenumerate_LDADD = libcourierauth.la \ |
b0322a85 | 357 | libs/numlib/libnumlib.la |
d9898ee8 | 358 | authenumerate_LDFLAGS= |
359 | ||
360 | # | |
361 | # The main daemon. | |
362 | ||
0e333c05 CE |
363 | authdaemondprog_SOURCES=authdaemond.c authdaemondcpp.cpp |
364 | ||
d9898ee8 | 365 | authdaemondprog_DEPENDENCIES=libcourierauthcommon.la \ |
0e333c05 | 366 | libcourierauth.la \ |
b0322a85 CE |
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 | |
0e333c05 | 370 | authdaemondprog_LDADD=$(LIBLTDL) libcourierauthcommon.la libcourierauth.la libs/liblock/liblock.la \ |
b0322a85 CE |
371 | libs/libhmac/libhmac.la libs/md5/libmd5.la libs/sha1/libsha1.la \ |
372 | libs/rfc822/libencode.la libs/numlib/libnumlib.la | |
d9898ee8 | 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 | ||
d50284c4 | 383 | man3=authlib.3 auth_generic.3 auth_login.3 auth_getuserinfo.3 auth_mkhomedir.3 \ |
d9898ee8 | 384 | auth_enumerate.3 auth_passwd.3 auth_getoption.3 auth_sasl.3 |
385 | man1=authpasswd.1 authtest.1 | |
386 | ||
8d138742 | 387 | man_MANS=$(man1) $(man3) auth_sasl_ex.3 |
d9898ee8 | 388 | |
389 | BUILT1=authlib.html authldaprc.h authmysqlrc.h authpgsqlrc.h authpiperc.h \ | |
ac40fd9e | 390 | authdaemonrc.h packageversion.h \ |
d9898ee8 | 391 | authchangepwdir.h sbindir.h \ |
392 | pkglibdir.h pkgincludedir.h mailusergroup.h \ | |
393 | README_authlib.html | |
0e333c05 CE |
394 | BUILT_SOURCES=$(BUILT1) $(GITFILES) $(man3:%.3=%.html) $(man1:%.1=%.html) \ |
395 | authsqliterc.h authmysqlrc.h authpgsqlrc.h authldaprc.h | |
d9898ee8 | 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 \ | |
b0322a85 | 424 | install-authldaprc install-authmysqlrc install-authsqliterc |
d9898ee8 | 425 | : |
426 | ||
427 | install-exec-hook: | |
428 | $(mkinstalldirs) $(DESTDIR)$(bindir) || : | |
429 | $(mkinstalldirs) $(DESTDIR)$(sbindir) || : | |
430 | $(mkinstalldirs) $(DESTDIR)$(pkglibexecdir) || : | |
b0322a85 CE |
431 | chmod 755 $(DESTDIR)$(pkglibexecdir) |
432 | -chown @mailuser@ $(DESTDIR)$(pkglibexecdir) | |
433 | -chgrp @mailgroup@ $(DESTDIR)$(pkglibexecdir) | |
d9898ee8 | 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 ;\ | |
b0322a85 | 440 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) libs/makedat/makedatprog \ |
d9898ee8 | 441 | $(DESTDIR)$(pkglibexecdir)/makedatprog ; \ |
d9898ee8 | 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 | ||
b0322a85 | 453 | uninstall-hook: uninstall-authldaprc uninstall-authdaemonrc uninstall-authmysqlrc uninstall-authpgsqlrc uninstall-authsqliterc |
d9898ee8 | 454 | rm -f $(DESTDIR)$(pkglibexecdir)/authdaemond |
455 | test "@AUTHUSERDB@" = "" && exit 0 ;\ | |
456 | rm -f $(DESTDIR)$(pkglibexecdir)/makedatprog \ | |
d9898ee8 | 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 | |
8d138742 | 464 | $(SHELL) ./config.status --file=authlib.html |
d9898ee8 | 465 | |
466 | authlib.3: authlib.3.in | |
8d138742 | 467 | $(SHELL) ./config.status --file=authlib.3 |
d9898ee8 | 468 | |
469 | if HAVE_SGML | |
d50284c4 | 470 | |
b0322a85 CE |
471 | authpasswd.html: authpasswd.sgml libs/docbook/sgml2html |
472 | libs/docbook/sgml2html authpasswd.sgml authpasswd.html | |
d9898ee8 | 473 | |
b0322a85 CE |
474 | authpasswd.1: authpasswd.sgml libs/docbook/sgml2man |
475 | libs/docbook/sgml2man authpasswd.sgml authpasswd.1 | |
d9898ee8 | 476 | |
b0322a85 CE |
477 | authtest.html: authtest.sgml libs/docbook/sgml2html |
478 | libs/docbook/sgml2html authtest.sgml authtest.html | |
d9898ee8 | 479 | |
b0322a85 CE |
480 | authtest.1: authtest.sgml libs/docbook/sgml2man |
481 | libs/docbook/sgml2man authtest.sgml authtest.1 | |
d9898ee8 | 482 | |
b0322a85 CE |
483 | authlib.html.in: authlib.sgml libs/docbook/sgml2html |
484 | libs/docbook/sgml2html authlib.sgml authlib.html.in | |
d9898ee8 | 485 | |
b0322a85 CE |
486 | authlib.3.in: authlib.sgml libs/docbook/sgml2man |
487 | libs/docbook/sgml2man authlib.sgml authlib.3.in | |
8d138742 | 488 | mv authlib.3 authlib.3.in |
d9898ee8 | 489 | |
b0322a85 | 490 | README_authlib.html.in: README_authlib.sgml optionlist.sgml libs/docbook/sgml2html |
d50284c4 | 491 | libs/docbook/sgml2html README_authlib.sgml README_authlib.html.in "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 492 | |
b0322a85 | 493 | auth_generic.html: auth_generic.sgml authcallback.sgml optionlist.sgml libs/docbook/sgml2html |
d50284c4 | 494 | libs/docbook/sgml2html auth_generic.sgml auth_generic.html "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 495 | |
b0322a85 | 496 | auth_generic.3: auth_generic.sgml authcallback.sgml optionlist.sgml libs/docbook/sgml2man |
d50284c4 | 497 | libs/docbook/sgml2man auth_generic.sgml auth_generic.3 "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 498 | |
b0322a85 | 499 | auth_login.html: auth_login.sgml authcallback.sgml optionlist.sgml libs/docbook/sgml2html |
d50284c4 | 500 | libs/docbook/sgml2html auth_login.sgml auth_login.html "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 501 | |
b0322a85 | 502 | auth_login.3: auth_login.sgml authcallback.sgml optionlist.sgml libs/docbook/sgml2man |
d50284c4 | 503 | libs/docbook/sgml2man auth_login.sgml auth_login.3 "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 504 | |
b0322a85 | 505 | auth_getuserinfo.html: auth_getuserinfo.sgml authcallback.sgml optionlist.sgml libs/docbook/sgml2html |
d50284c4 | 506 | libs/docbook/sgml2html auth_getuserinfo.sgml auth_getuserinfo.html "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 507 | |
b0322a85 | 508 | auth_getuserinfo.3: auth_getuserinfo.sgml authcallback.sgml optionlist.sgml libs/docbook/sgml2man |
d50284c4 CE |
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/" | |
d9898ee8 | 516 | |
b0322a85 | 517 | auth_enumerate.html: auth_enumerate.sgml libs/docbook/sgml2html |
d50284c4 | 518 | libs/docbook/sgml2html auth_enumerate.sgml auth_enumerate.html "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 519 | |
b0322a85 | 520 | auth_enumerate.3: auth_enumerate.sgml libs/docbook/sgml2man |
d50284c4 | 521 | libs/docbook/sgml2man auth_enumerate.sgml auth_enumerate.3 "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 522 | |
b0322a85 | 523 | auth_passwd.html: auth_passwd.sgml libs/docbook/sgml2html |
d50284c4 | 524 | libs/docbook/sgml2html auth_passwd.sgml auth_passwd.html "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 525 | |
b0322a85 | 526 | auth_passwd.3: auth_passwd.sgml libs/docbook/sgml2man |
d50284c4 | 527 | libs/docbook/sgml2man auth_passwd.sgml auth_passwd.3 "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 528 | |
b0322a85 | 529 | auth_getoption.html: auth_getoption.sgml libs/docbook/sgml2html |
d50284c4 | 530 | libs/docbook/sgml2html auth_getoption.sgml auth_getoption.html "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 531 | |
b0322a85 | 532 | auth_getoption.3: auth_getoption.sgml libs/docbook/sgml2man |
d50284c4 | 533 | libs/docbook/sgml2man auth_getoption.sgml auth_getoption.3 "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 534 | |
b0322a85 | 535 | auth_sasl.html: auth_sasl.sgml libs/docbook/sgml2html |
d50284c4 | 536 | libs/docbook/sgml2html auth_sasl.sgml auth_sasl.html "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 537 | |
b0322a85 | 538 | auth_sasl.3: auth_sasl.sgml libs/docbook/sgml2man |
d50284c4 | 539 | libs/docbook/sgml2man auth_sasl.sgml auth_sasl.3 "--stringparam man.base.url.for.relative.links http://www.courier-mta.org/authlib/" |
d9898ee8 | 540 | |
8d138742 CE |
541 | auth_sasl_ex.3: auth_sasl.3 |
542 | touch $@ | |
d9898ee8 | 543 | |
544 | endif | |
545 | ||
8d138742 CE |
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 | ||
d9898ee8 | 553 | README_authlib.html: README_authlib.html.in config.status |
8d138742 | 554 | $(SHELL) ./config.status --file=README_authlib.html |
d9898ee8 | 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 | |
b0322a85 | 567 | test -f $(DESTDIR)@authsqliterc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authsqliterc@.dist || true |
d9898ee8 | 568 | |
569 | # For maintainer's use only | |
570 | ||
571 | distrelease: | |
8d138742 CE |
572 | umask 022; $(MAKE) distcheck |
573 | $(MAKE) rpm | |
8d138742 CE |
574 | $(MAKE) |
575 | $(MAKE) | |
d9898ee8 | 576 | rm -f @PACKAGE@.spec @PACKAGE@.lpspec |
8d138742 CE |
577 | $(MAKE) @PACKAGE@.spec @PACKAGE@.lpspec |
578 | $(MAKE) dist | |
d9898ee8 | 579 | |
d9898ee8 | 580 | rpm: rpm-build |
581 | ||
582 | rpm-build: | |
8d138742 CE |
583 | $(MAKE) bump.rpm.release |
584 | $(MAKE) dist | |
585 | $(MAKE) dorpm | |
d9898ee8 | 586 | |
587 | lpm: lpm-build | |
588 | ||
589 | lpm-build: | |
8d138742 CE |
590 | $(MAKE) bump.rpm.release |
591 | $(MAKE) dist | |
592 | $(MAKE) dolpm | |
d9898ee8 | 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: | |
8d138742 | 602 | $(MAKE) dopublish SUBDIR=dev |
d9898ee8 | 603 | |
604 | publish-prod: | |
8d138742 | 605 | $(MAKE) dopublish SUBDIR=prod |
d9898ee8 | 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/* | |
8d138742 CE |
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 | |
d9898ee8 | 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; \ | |
dd184caf | 645 | sed 's/^Release: .*/Release: '$$RELEASE'%{?dist}%{?courier_release}/' \ |
d9898ee8 | 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 | |
0e333c05 | 654 | ~/src/sftools/release.pl mrsam courier authlib-devel `echo @VERSION@|sed 's/.*\(........\)/\1/'` @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig |
d9898ee8 | 655 | |
656 | upload-dist: | |
b0322a85 CE |
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@' | |
0e333c05 | 659 | socksify ~/src/sftools/release.pl mrsam courier authlib @VERSION@ @PACKAGE@-@VERSION@.tar.bz2 @PACKAGE@-@VERSION@.tar.bz2.sig |
d9898ee8 | 660 | |
661 | HTMLDOCFILES=$(HTMLFILES) README.authdebug.html README_authlib.html \ | |
b0322a85 | 662 | $(man3:%.3=%.html) $(man1:%.1=%.html) userdb/userdb.html userdb/makeuserdb.html userdb/userdbpw.html |
d9898ee8 | 663 | |
664 | htmldoc: $(HTMLDOCFILES) | |
b0322a85 | 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 |