forked from brunonymous/vpopmail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
269 lines (206 loc) · 8.47 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# Copyright (C) 1999-2004 Inter7 Internet Technologies, Inc.
@SET_MAKE@
if BUILD_CDB
SUBDIRS=cdb
endif
OBJEXT=o
if BUILD_CDB
EXTRA_DIST=README.* cdb/* vcdb.c vldap.c vmysql.c voracle.pc vpgsql.c vsybase.c
else
EXTRA_DIST=README.* vcdb.c vldap.c vmysql.c voracle.pc vpgsql.c vsybase.c
endif
noinst_HEADERS=md5.h vpopmail.h file_lock.h vauth.h vlimits.h maildirquota.h vcdb.h vldap.h vmysql.h voracle.h vpgsql.h vsybase.h vlog.h global.h hmac_md5.h seek.h vutil.h vlogger.h pwstr.h
COMMONSOURCES=vpopmail.c md5.c bigdir.c vauth.c file_lock.c vpalias.c seek.c vlimits.c maildirquota.c vutil.c vlistlib.c backfill.c client.c conf.c ippp.c vlogger.c pwstr.c
CONFIG_CLEAN_FILES=vauth.c
if BUILD_CDB
CONFIG_CLEAN_FILES+=cdb/conf-cc cdb/conf-ld cdb/compile cdb/load
endif
INSTALL_PROGRAM= ${INSTALL} -o @vpopuser@ -m 711 -g @vpopgroup@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_STRIP_PROGRAM=${INSTALL_PROGRAM} -s
MYSQLCONF=$(DESTDIR)@vpopmaildir@/etc/vpopmail.mysql
VLIMITS=$(DESTDIR)@vpopmaildir@/etc/vlimits.default
VUSAGECCONF=$(DESTDIR)@vpopmaildir@/etc/vusagec.conf
DOVECOT_SQL=$(DESTDIR)@vpopmaildir@/etc/disable-many-domains_procedures.sql
PWD_STRENGTH=$(DESTDIR)@vpopmaildir@/etc/password_strength.conf
noinst_LIBRARIES=libvpopmail.a
libvpopmail_a_SOURCES=$(COMMONSOURCES)
if BUILD_CDB
libvpopmail_a_LIBADD = cdb/*.o
endif
libvpopmail_a_CFLAGS = -fPIC
vpopmailbindir=@vpopmaildir@/bin
vpopmailbin_PROGRAMS = vchkpw vdelivermail clearopensmtp vadddomain \
vdeldomain vpasswd vadduser vdeluser vaddaliasdomain vsetuserquota \
vpopbull vdeloldusers vmoduser valias vuserinfo vmkpasswd vipmap \
vdominfo vconvert vkill vmoddomlimits vchangepw dotqmail2valias \
vpopmaild vlist authvchkpw vusagec vsavealiasdomains vrcptcheck \
vverifypw vmakedotqmail
vusagec_SOURCES = vusagec.c client.c conf.c ippp.c
vusagec_LDADD = libvpopmail.a @auth_libs@
vuserinfo_SOURCES = vuserinfo.c maildirquota.c
vuserinfo_LDADD = libvpopmail.a @auth_libs@
vlist_SOURCES = vlist.c vlistlib.c vutil.c
vlist_LDADD = libvpopmail.a @auth_libs@
authvchkpw_SOURCES = authvchkpw.c hmac_md5.c
authvchkpw_LDADD = libvpopmail.a @auth_libs@
vpopmaild_SOURCES = vpopmaild.c
vpopmaild_LDADD = libvpopmail.a @auth_libs@
vdominfo_SOURCES = vdominfo.c
vdominfo_LDADD = libvpopmail.a @auth_libs@
vchkpw_SOURCES = vchkpw.c md5.c hmac_md5.c
vchkpw_LDADD = libvpopmail.a @auth_libs@
vchkpw_LDFLAGS = -Wl,-z,now
vchangepw_SOURCES = vchangepw.c
vchangepw_LDADD = libvpopmail.a @auth_libs@
dotqmail2valias_SOURCES = dotqmail2valias.c
dotqmail2valias_LDADD = libvpopmail.a @auth_libs@
vdelivermail_SOURCES = vdelivermail.c maildirquota.c
vdelivermail_LDADD = libvpopmail.a @auth_libs@
vkill_SOURCES = vkill.c
vkill_LDADD = libvpopmail.a @auth_libs@
clearopensmtp_SOURCES = clearopensmtp.c
clearopensmtp_LDADD = libvpopmail.a @auth_libs@
vadddomain_SOURCES = vadddomain.c
vadddomain_LDADD = libvpopmail.a @auth_libs@
vdeldomain_SOURCES = vdeldomain.c
vdeldomain_LDADD = libvpopmail.a @auth_libs@
vpasswd_SOURCES = vpasswd.c
vpasswd_LDADD = libvpopmail.a @auth_libs@
vadduser_SOURCES = vadduser.c
vadduser_LDADD = libvpopmail.a @auth_libs@
vdeluser_SOURCES = vdeluser.c
vdeluser_LDADD = libvpopmail.a @auth_libs@
vaddaliasdomain_SOURCES = vaddaliasdomain.c
vaddaliasdomain_LDADD = libvpopmail.a @auth_libs@
vsetuserquota_SOURCES = vsetuserquota.c
vsetuserquota_LDADD = libvpopmail.a @auth_libs@
vpopbull_SOURCES = vpopbull.c
vpopbull_LDADD = libvpopmail.a @auth_libs@
vdeloldusers_SOURCES = vdeloldusers.c
vdeloldusers_LDADD = libvpopmail.a @auth_libs@
vconvert_SOURCES = vconvert.c
vconvert_LDADD = libvpopmail.a @auth_libs@
vmoduser_SOURCES = vmoduser.c
vmoduser_LDADD = libvpopmail.a @auth_libs@
valias_SOURCES = valias.c
valias_LDADD = libvpopmail.a @auth_libs@
vmkpasswd_SOURCES = vmkpasswd.c
vmkpasswd_LDADD = libvpopmail.a @auth_libs@
vipmap_SOURCES = vipmap.c
vipmap_LDADD = libvpopmail.a @auth_libs@
vmoddomlimits_SOURCES = vmoddomlimits.c
vmoddomlimits_LDADD = libvpopmail.a @auth_libs@
vsavealiasdomains_SOURCES = vsavealiasdomains.c
vsavealiasdomains_LDADD = libvpopmail.a @auth_libs@
vrcptcheck_SOURCES = vrcptcheck.c
vrcptcheck_LDADD = libvpopmail.a @auth_libs@
vverifypw_SOURCES = vverifypw.c
vverifypw_LDADD = libvpopmail.a @auth_libs@
vmakedotqmail_SOURCES = vmakedotqmail.c
vmakedotqmail_LDADD = libvpopmail.a @auth_libs@
DEFS=-I. @auth_inc@
install: install-recursive vusage-msg
vusage-msg:
@echo ""
@echo "****************************************************"
@echo ""
@echo " If you plan to use the vpopmail usage daemon"
@echo " run the following commands:"
@echo ""
@echo " cd vusaged && ./configure && make"
@echo ""
@echo " Then follow the INSTALL file to install"
@echo ""
@echo "****************************************************"
@echo ""
install-exec-am:
for d in bin doc etc include lib ; do \
if test ! -d $(DESTDIR)@vpopmaildir@/$$d; then \
$(INSTALL) -d -g @vpopgroup@ -m 0755 -o @vpopuser@ \
$(DESTDIR)@vpopmaildir@/$$d ; \
fi ; \
done
install-data-local:
$(INSTALL) -d -g @vpopgroup@ -m 0700 -o @vpopuser@ \
$(DESTDIR)@vpopmaildir@/@domains_dir@
echo "-I@vpopmaildir@/include" > \
$(DESTDIR)@vpopmaildir@/etc/inc_deps
echo "-L@vpopmaildir@/lib -lvpopmail @auth_libs@ @LIBS@" > \
$(DESTDIR)@vpopmaildir@/etc/lib_deps
if test @MANY_DOMAINS@ = 0; then \
if test ! -r $(DOVECOT_SQL); then \
$(INSTALL) -o root -m 0644 \
dovecot/disable-many-domains_procedures.sql $(DOVECOT_SQL); \
fi \
fi
if test ! -r $(VUSAGECCONF); then \
$(INSTALL) -o @vpopuser@ -m 0644 -g @vpopgroup@ \
vusagec.conf $(VUSAGECCONF); \
fi
if test ! -r $(VLIMITS); then \
$(INSTALL) -o @vpopuser@ -m 0644 -g @vpopgroup@ \
vlimits.default $(VLIMITS); \
fi
if test ! -r $(PWD_STRENGTH); then \
$(INSTALL) -m 644 password_strength.conf $(PWD_STRENGTH); \
fi
if test "@USE_MYSQL@" = "1"; then \
if test ! -r $(MYSQLCONF); then \
echo "# MYSQL CONNECTION SETTINGS FOR VPOPMAIL" >> $(MYSQLCONF); \
echo "#" >> $(MYSQLCONF); \
echo "# Line 1 defines the connection to use for database reads," >> $(MYSQLCONF); \
echo "# Line 2 defines the connection to use for database updates/writes." >> $(MYSQLCONF); \
echo "#" >> $(MYSQLCONF); \
echo "# If you omit line 2, then the same settings will be" >> $(MYSQLCONF); \
echo "# used for both read and write." >> $(MYSQLCONF); \
echo "#" >> $(MYSQLCONF); \
echo "# settings for each line:" >> $(MYSQLCONF); \
echo "# host|port|user|password|database" >> $(MYSQLCONF); \
echo "#" >> $(MYSQLCONF); \
echo "localhost|0|root|secret|vpopmail" >> $(MYSQLCONF); \
echo "#" >> $(MYSQLCONF); \
echo "# Note:" >> $(MYSQLCONF); \
echo "# The value of host may be either a hostname or an IP address." >> $(MYSQLCONF); \
echo "# If host is 'localhost', then sockets (Unix) or named pipes (Windows)" >> $(MYSQLCONF); \
echo "# will be used instead of TCP/IP to connect to the server." >> $(MYSQLCONF); \
fi ; \
chown @vpopuser@ $(MYSQLCONF) ; \
chgrp @vpopgroup@ $(MYSQLCONF) ; \
chmod 0640 $(MYSQLCONF) ; \
fi
$(INSTALL) -o root -m 0644 \
libvpopmail.a $(DESTDIR)@vpopmaildir@/lib/libvpopmail.a
$(INSTALL) -o root -m 0444 \
config.h $(DESTDIR)@vpopmaildir@/include/vpopmail_config.h
for include in vpopmail.h config.h vauth.h vlimits.h storage.h client.h conf.h ippp.h vlogger.h; do \
$(INSTALL) -o root -m 0444 $$include \
$(DESTDIR)@vpopmaildir@/include/ ; \
done
$(INSTALL) -d $(DESTDIR)@vpopmaildir@/doc/man_html
$(INSTALL) -d $(DESTDIR)@vpopmaildir@/doc/doc_html
$(INSTALL) -o @vpopuser@ -m 0444 -g @vpopgroup@ \
doc/man_html/*.* $(DESTDIR)@vpopmaildir@/doc/man_html/
$(INSTALL) -o @vpopuser@ -m 0444 -g @vpopgroup@ \
doc/doc_html/*.* $(DESTDIR)@vpopmaildir@/doc/doc_html/
fix-priv:
if test -r $(MYSQLCONF); then \
chown @vpopuser@ $(MYSQLCONF) ; \
chgrp @vpopgroup@ $(MYSQLCONF) ; \
chmod 0640 $(MYSQLCONF) ; \
fi
@echo "If the recursive chown is taking a long time"
@echo "go ahead and break out of it by pressing control-C"
@echo "this is the last stage of the install and can be skipped"
chmod 700 $(DESTDIR)@vpopmaildir@/@domains_dir@
chown -R @vpopuser@ $(DESTDIR)@vpopmaildir@/@domains_dir@
chgrp -R @vpopgroup@ $(DESTDIR)@vpopmaildir@/@domains_dir@
dist-hook:
-rm $(distdir)/cdb/makefile
pre-dist:
@if test ! -d cdb/makefile; then \
cp cdb/Makefile cdb/makefile; \
echo "distdir:" >> cdb/makefile; \
echo " @echo 'nothing to do in cdb'" >> cdb/makefile; \
echo "" >> cdb/makefile; \
fi
AUTOMAKE_OPTIONS = foreign no-dependencies