1 | #
|
---|
2 | # Copyright Rainer Wichmann (2006)
|
---|
3 | #
|
---|
4 | # License Information:
|
---|
5 | # This program is free software; you can redistribute it and/or modify
|
---|
6 | # it under the terms of the GNU General Public License as published by
|
---|
7 | # the Free Software Foundation; either version 2 of the License, or
|
---|
8 | # (at your option) any later version.
|
---|
9 | #
|
---|
10 | # This program is distributed in the hope that it will be useful,
|
---|
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
13 | # GNU General Public License for more details.
|
---|
14 | #
|
---|
15 | # You should have received a copy of the GNU General Public License
|
---|
16 | # along with this program; if not, write to the Free Software
|
---|
17 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
18 |
|
---|
19 |
|
---|
20 | # --- boiler-plate stuff ---
|
---|
21 | #
|
---|
22 | SHELL = /bin/sh
|
---|
23 |
|
---|
24 | srcdir = @srcdir@
|
---|
25 | srcsrc = @srcdir@/src
|
---|
26 | srcinc = @srcdir@/include
|
---|
27 | top_srcdir = @top_srcdir@
|
---|
28 |
|
---|
29 | # Don't use VPATH - it's a portability mess
|
---|
30 | #
|
---|
31 | # VPATH = $(top_srcdir)/src
|
---|
32 |
|
---|
33 | prefix = @prefix@
|
---|
34 | exec_prefix = @exec_prefix@
|
---|
35 |
|
---|
36 | sbindir = @sbindir@
|
---|
37 | sysconfdir = @sysconfdir@
|
---|
38 | localstatedir = @localstatedir@
|
---|
39 | mandir = @mandir@
|
---|
40 | datarootdir = @datarootdir@
|
---|
41 | mytmpdir = @mytmpdir@
|
---|
42 |
|
---|
43 | configfile = @myconffile@
|
---|
44 | mydatafile = @mydatafile@
|
---|
45 | mylockfile = @mylockfile@
|
---|
46 | mylogfile = @mylogfile@
|
---|
47 |
|
---|
48 | mydatadir = @mydataroot@
|
---|
49 | mylogdir = @mylogdir@
|
---|
50 | mylockdir = @mylockdir@
|
---|
51 |
|
---|
52 | selectconfig = @selectconfig@
|
---|
53 |
|
---|
54 | top_builddir = .
|
---|
55 |
|
---|
56 | INSTALL = @INSTALL@
|
---|
57 | INSTALL_PROGRAM = @INSTALL@ -s -m 700
|
---|
58 | INSTALL_SHELL = @INSTALL@ -m 700
|
---|
59 | INSTALL_DATA = @INSTALL@ -m 600
|
---|
60 | INSTALL_MAN = @INSTALL@ -m 644
|
---|
61 | INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
---|
62 | INSTALL_NAME = @install_name@
|
---|
63 | INSTALL_DSYS = @INSTALL@ -m 755
|
---|
64 |
|
---|
65 | PACKAGE = @PACKAGE@
|
---|
66 | VERSION = @VERSION@
|
---|
67 | BUILD_NUM = 1
|
---|
68 |
|
---|
69 | DEFAULT_MAINTAINER = Nobody Nowhere <nobody@example.com>
|
---|
70 |
|
---|
71 | VFLAG = @mytclient@
|
---|
72 | SETPWD = @setpwd_prg@
|
---|
73 | STEGIN = @stegin_prg@
|
---|
74 | SAMHAIN = @sh_main_prg@
|
---|
75 | YULECTL = @yulectl_prg@
|
---|
76 | XOR_CODE = @xor_code@
|
---|
77 | SH_LKM = @sh_lkm@
|
---|
78 | TIGER_SRC = @tiger_src@
|
---|
79 |
|
---|
80 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
---|
81 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
---|
82 |
|
---|
83 |
|
---|
84 | CC = @CC@
|
---|
85 | BUILD_CC = @BUILD_CC@
|
---|
86 | # DBGDEF = -pg -DSH_PROFILE=1
|
---|
87 | DBGDEF = @mydebugdef@
|
---|
88 | DEFS = $(DBGDEF) @DEFS@ -I. -I$(top_srcdir)/include
|
---|
89 | CPPFLAGS = @CPPFLAGS@
|
---|
90 | LDFLAGS = @LDFLAGS@
|
---|
91 | LIBS_TRY = @LIBS@
|
---|
92 | LIBS_SOCK = @sh_libsocket@
|
---|
93 | LIBS_KVM = @sh_libkvm@
|
---|
94 | CFLAGS = @CFLAGS@
|
---|
95 | CUTEST =
|
---|
96 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(CUTEST)
|
---|
97 | LINK = $(CC) $(DBGDEF) -O $(LDFLAGS) -o $@
|
---|
98 |
|
---|
99 | DESTDIR =
|
---|
100 |
|
---|
101 | TAR = tar
|
---|
102 | GZIP = --best
|
---|
103 |
|
---|
104 | # For creating a packed client
|
---|
105 | #
|
---|
106 | CLIENTPASSWD =
|
---|
107 |
|
---|
108 | .SUFFIXES: # Delete the default suffixes
|
---|
109 |
|
---|
110 | #
|
---|
111 | # --- Files -------
|
---|
112 | #
|
---|
113 |
|
---|
114 |
|
---|
115 | HEADERS = samhain.h sh_unix.h sh_utils.h sh_error.h sh_error_min.h sh_files.h \
|
---|
116 | sh_getopt.h sh_readconf.h sh_tiger.h sh_hash.h \
|
---|
117 | sh_mail.h sh_mail_int.h sh_nmail.h sh_filter.h \
|
---|
118 | sh_mem.h sh_entropy.h sh_forward.h sh_modules.h sh_utmp.h \
|
---|
119 | sh_kern.h sh_suidchk.h sh_srp.h sh_fifo.h sh_html.h sh_tools.h \
|
---|
120 | sh_gpg.h sh_cat.h sh_calls.h sh_extern.h sh_database.h sh_trace.h \
|
---|
121 | sh_schedule.h bignum.h trustfile.h slib.h zAVLTree.h \
|
---|
122 | lzoconf.h minilzo.h rijndael-alg-fst.h rijndael-api-fst.h \
|
---|
123 | rijndael-boxes-fst.h sh_socket.h sh_ignore.h sh_prelude.h \
|
---|
124 | sh_mounts.h sh_userfiles.h sh_static.h sh_prelink.h \
|
---|
125 | sh_processcheck.h sh_portcheck.h sh_pthread.h sh_string.h \
|
---|
126 | sh_log_check.h sh_log_evalrule.h sh_log_correlate.h \
|
---|
127 | sh_log_mark.h sh_log_repeat.h sh_inotify.h sh_registry.h sh_ipvx.h \
|
---|
128 | sh_restrict.h
|
---|
129 |
|
---|
130 |
|
---|
131 | SOURCES = $(srcsrc)/samhain.c $(srcsrc)/sh_unix.c \
|
---|
132 | $(srcsrc)/sh_utils.c $(srcsrc)/sh_error.c \
|
---|
133 | $(srcsrc)/sh_files.c $(srcsrc)/sh_getopt.c \
|
---|
134 | $(srcsrc)/sh_readconf.c $(srcsrc)/sh_tiger0.c \
|
---|
135 | $(srcsrc)/sh_tiger1.c $(srcsrc)/sh_tiger2.c \
|
---|
136 | $(srcsrc)/sh_tiger1_64.c $(srcsrc)/sh_tiger2_64.c \
|
---|
137 | $(srcsrc)/sh_hash.c $(srcsrc)/sh_mail.c $(srcsrc)/sh_nmail.c \
|
---|
138 | $(srcsrc)/sh_mem.c $(srcsrc)/sh_entropy.c \
|
---|
139 | $(srcsrc)/sh_forward.c $(srcsrc)/sh_modules.c \
|
---|
140 | $(srcsrc)/sh_utmp.c $(srcsrc)/sh_login_track.c $(srcsrc)/sh_kern.c \
|
---|
141 | $(srcsrc)/sh_suidchk.c $(srcsrc)/sh_srp.c \
|
---|
142 | $(srcsrc)/sh_fifo.c $(srcsrc)/sh_tools.c \
|
---|
143 | $(srcsrc)/sh_html.c $(srcsrc)/sh_gpg.c \
|
---|
144 | $(srcsrc)/sh_cat.c $(srcsrc)/sh_calls.c \
|
---|
145 | $(srcsrc)/sh_extern.c $(srcsrc)/sh_database.c \
|
---|
146 | $(srcsrc)/sh_err_log.c $(srcsrc)/sh_err_console.c \
|
---|
147 | $(srcsrc)/sh_err_syslog.c $(srcsrc)/sh_schedule.c \
|
---|
148 | $(srcsrc)/bignum.c $(srcsrc)/mkhdr.c \
|
---|
149 | $(srcsrc)/samhain_setpwd.c $(srcsrc)/samhain_stealth.c \
|
---|
150 | $(srcsrc)/encode.c $(srcsrc)/sstrip.c \
|
---|
151 | $(srcsrc)/trustfile.c $(srcsrc)/exepack.c \
|
---|
152 | $(srcsrc)/exepack_fill.c $(srcsrc)/exepack_mkdata.c \
|
---|
153 | $(srcsrc)/minilzo.c $(srcsrc)/slib.c \
|
---|
154 | $(srcsrc)/rijndael-alg-fst.c $(srcsrc)/rijndael-api-fst.c \
|
---|
155 | $(srcsrc)/zAVLTree.c $(srcsrc)/bignum.c \
|
---|
156 | $(srcsrc)/sh_socket.c $(srcsrc)/sh_ignore.c \
|
---|
157 | $(srcsrc)/yulectl.c $(srcsrc)/sh_mounts.c \
|
---|
158 | $(srcsrc)/sh_userfiles.c $(srcsrc)/sh_prelude.c \
|
---|
159 | $(srcsrc)/sh_prelink.c $(srcsrc)/sh_static.c \
|
---|
160 | $(srcsrc)/sh_portcheck.c $(srcsrc)/sh_port2proc.c\
|
---|
161 | $(srcsrc)/sh_processcheck.c $(srcsrc)/sh_filter.c \
|
---|
162 | $(srcsrc)/sh_pthread.c $(srcsrc)/sh_string.c \
|
---|
163 | $(srcsrc)/sh_log_parse_syslog.c $(srcsrc)/sh_log_parse_pacct.c \
|
---|
164 | $(srcsrc)/sh_log_parse_samba.c $(srcsrc)/sh_log_parse_generic.c \
|
---|
165 | $(srcsrc)/sh_log_parse_apache.c $(srcsrc)/sh_log_evalrule.c \
|
---|
166 | $(srcsrc)/sh_log_correlate.c $(srcsrc)/sh_log_mark.c \
|
---|
167 | $(srcsrc)/sh_log_check.c $(srcsrc)/dnmalloc.c \
|
---|
168 | $(srcsrc)/sh_inotify.c $(srcsrc)/sh_log_repeat.c \
|
---|
169 | $(srcsrc)/sh_audit.c $(srcsrc)/sh_registry.c \
|
---|
170 | $(srcsrc)/sh_ipvx.c $(srcsrc)/sh_restrict.c $(srcsrc)/sh_filetype.c \
|
---|
171 | $(srcsrc)/t-test1.c
|
---|
172 |
|
---|
173 | OBJECTS = sh_files.o sh_tiger0.o sh_tiger2.o sh_tiger2_64.o \
|
---|
174 | samhain.o sh_unix.o sh_utils.o sh_error.o \
|
---|
175 | sh_getopt.o sh_readconf.o sh_filter.o \
|
---|
176 | sh_hash.o sh_mail.o sh_nmail.o sh_mem.o sh_login_track.o \
|
---|
177 | sh_entropy.o sh_forward.o sh_modules.o sh_utmp.o sh_kern.o \
|
---|
178 | sh_suidchk.o sh_srp.o sh_fifo.o sh_tools.o sh_html.o sh_gpg.o \
|
---|
179 | sh_cat.o sh_calls.o sh_extern.o sh_database.o sh_err_log.o \
|
---|
180 | sh_err_console.o sh_err_syslog.o sh_schedule.o bignum.o \
|
---|
181 | trustfile.o rijndael-alg-fst.o rijndael-api-fst.o slib.o \
|
---|
182 | zAVLTree.o sh_socket.o sh_ignore.o sh_prelude.o \
|
---|
183 | sh_mounts.o sh_userfiles.o sh_prelink.o sh_static.o \
|
---|
184 | sh_processcheck.o sh_portcheck.o sh_port2proc.o \
|
---|
185 | sh_log_parse_syslog.o sh_log_parse_pacct.o sh_log_parse_apache.o \
|
---|
186 | sh_log_parse_samba.o sh_log_evalrule.o sh_log_check.o \
|
---|
187 | sh_log_parse_generic.o \
|
---|
188 | sh_log_correlate.o sh_log_mark.o sh_log_repeat.o \
|
---|
189 | sh_pthread.o sh_string.o sh_inotify.o dnmalloc.o \
|
---|
190 | sh_audit.o sh_registry.o sh_ipvx.o sh_restrict.o sh_filetype.o
|
---|
191 |
|
---|
192 | KERN = kern_head.h kern_head.c
|
---|
193 |
|
---|
194 | TESTSUITE = test.sh testcompile.sh testhash.sh testtiger.txt \
|
---|
195 | testtimesrv.sh \
|
---|
196 | testext.sh testrc_1ext.in test_ext.c.in testrun_1d.sh \
|
---|
197 | testrun_1.sh testrun_1a.sh testrun_1b.sh testrun_1c.sh testrc_1 \
|
---|
198 | testrun_2.sh testrun_2a.sh testrun_2b.sh testrc_2.in \
|
---|
199 | testrun_2c.sh testrun_2d.sh
|
---|
200 |
|
---|
201 | DIST_COMMON = README COPYING LICENSE samhain.jpg \
|
---|
202 | samhainrc.linux samhainrc.solaris samhainrc.freebsd samhainrc.aix5.2.0 \
|
---|
203 | samhainrc.netbsd yulerc.template \
|
---|
204 | Install.sh
|
---|
205 |
|
---|
206 | DIST_NEEDED = Makefile.in deploy.sh.in samhain-install.sh.in \
|
---|
207 | samhain.spec.in rules.deb.in rules.deb-light.in samhain.spec hp_ux.psf.in \
|
---|
208 | stealth_template.jpg \
|
---|
209 | config.guess config.h.in stamp-h.in config.sub configure \
|
---|
210 | configure.ac acconfig.h aclocal.m4 install-sh missing mkinstalldirs \
|
---|
211 | c_random.sh c_bits.sh depend.sum depend.dep stamp-hdep
|
---|
212 |
|
---|
213 | DISTFILES = $(DIST_COMMON) $(DIST_NEEDED) \
|
---|
214 | src include man scripts init docs sql_init test dsys
|
---|
215 |
|
---|
216 | PROGRAMS = $(SETPWD) $(STEGIN) $(SAMHAIN) $(YULECTL)
|
---|
217 |
|
---|
218 | #----------------------------------------------------------
|
---|
219 | #
|
---|
220 | # the first target is the default one
|
---|
221 | #
|
---|
222 | #----------------------------------------------------------
|
---|
223 |
|
---|
224 | all: $(top_srcdir)/depend.sum $(SETPWD) $(STEGIN) $(SAMHAIN) $(YULECTL) @sh_lkm@ sstrip
|
---|
225 |
|
---|
226 |
|
---|
227 | #----------------------------------------------------------
|
---|
228 | #
|
---|
229 | # rules for automatic updating of configuration information
|
---|
230 | # after changing the configuration files
|
---|
231 | #
|
---|
232 | #----------------------------------------------------------
|
---|
233 |
|
---|
234 | $(top_srcdir)/configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
|
---|
235 | cd $(srcdir) && autoconf
|
---|
236 |
|
---|
237 | # autoheader might not change config.h.in, so touch a stamp file.
|
---|
238 | $(top_srcdir)/config.h.in: $(top_srcdir)/stamp-h.in
|
---|
239 | touch $(top_srcdir)/config.h.in
|
---|
240 |
|
---|
241 | $(top_srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
|
---|
242 | cd $(top_srcdir) && autoheader
|
---|
243 | echo timestamp > $(top_srcdir)/stamp-h.in
|
---|
244 |
|
---|
245 | config.h: stamp-h
|
---|
246 | @sleep 1; \
|
---|
247 | touch config.h
|
---|
248 |
|
---|
249 | stamp-h: $(top_srcdir)/config.h.in config.status
|
---|
250 | ./config.status
|
---|
251 |
|
---|
252 | Makefile: $(top_srcdir)/Makefile.in config.status
|
---|
253 | ./config.status
|
---|
254 |
|
---|
255 | samhain-install.sh: $(top_srcdir)/samhain-install.sh.in config.status
|
---|
256 | ./config.status
|
---|
257 |
|
---|
258 | config.status: $(top_srcdir)/configure
|
---|
259 | ./config.status --recheck
|
---|
260 |
|
---|
261 | #----------------------------------------------------------
|
---|
262 | #
|
---|
263 | # rules for automatic dependency tracking
|
---|
264 | #
|
---|
265 | #----------------------------------------------------------
|
---|
266 |
|
---|
267 |
|
---|
268 | depend-gen: $(srcsrc)/depend-gen.c
|
---|
269 | @echo "$(BUILD_CC) -I. -o depend-gen $(srcsrc)/depend-gen.c"; \
|
---|
270 | $(BUILD_CC) -I. -o depend-gen $(srcsrc)/depend-gen.c 2>/dev/null || \
|
---|
271 | echo "failed to compile ... hope depend.dep is ok"
|
---|
272 |
|
---|
273 | # redo if sources change
|
---|
274 | #
|
---|
275 | $(top_srcdir)/depend.dep: depend-gen $(SOURCES)
|
---|
276 | @echo "update depend.dep ..."; \
|
---|
277 | test -f $(srcdir)/depend.dep || echo > $(srcdir)/depend.dep; \
|
---|
278 | if test -f depend-gen; then \
|
---|
279 | failfiles=""; \
|
---|
280 | for ff in $(SOURCES) $(srcsrc)/kern_head.c; do \
|
---|
281 | ./depend-gen -i '$$(srcinc)/' -o $(top_srcdir)/depend.dep $$ff || \
|
---|
282 | failfiles="$${failfiles} $$ff"; \
|
---|
283 | done; \
|
---|
284 | if test x"$${failfiles}" != x; then \
|
---|
285 | echo "--------------------------------------------------------";\
|
---|
286 | echo " depend-gen failed to update depend.dep. You can safely"; \
|
---|
287 | echo " ignore this error, unless you have modified the source"; \
|
---|
288 | echo " files and changed their dependencies."; \
|
---|
289 | echo "--------------------------------------------------------";\
|
---|
290 | else \
|
---|
291 | echo $(srcsrc) > $(top_srcdir)/stamp-dep; \
|
---|
292 | fi; \
|
---|
293 | else \
|
---|
294 | echo "depend-gen not found ... depend.dep not modified"; \
|
---|
295 | fi
|
---|
296 |
|
---|
297 | # only updated if depencies change
|
---|
298 | #
|
---|
299 | $(top_srcdir)/depend.sum: $(top_srcdir)/depend.dep
|
---|
300 | @if test -f depend-gen; then \
|
---|
301 | nsum=`./depend-gen -c $(top_srcdir)/depend.dep|awk '{print $$1}'`; \
|
---|
302 | osum=`cat $(top_srcdir)/depend.sum 2>/dev/null`; \
|
---|
303 | if test "x$$osum" != "x$$nsum"; then \
|
---|
304 | echo "update $(top_srcdir)/depend.sum ..."; \
|
---|
305 | echo $$nsum > $(top_srcdir)/depend.sum; \
|
---|
306 | echo timestamp > $(top_srcdir)/stamp-hdep; \
|
---|
307 | fi; \
|
---|
308 | fi;
|
---|
309 |
|
---|
310 | $(top_srcdir)/stamp-hdep:
|
---|
311 | touch $(top_srcdir)/stamp-hdep && touch $(top_srcdir)/Makefile.in
|
---|
312 |
|
---|
313 | $(top_srcdir)/Makefile.in: $(top_srcdir)/stamp-hdep
|
---|
314 | @echo "update Makefile.in ..."; \
|
---|
315 | echo "cp Makefile.in Makefile.in.bak"; \
|
---|
316 | cp $(top_srcdir)/Makefile.in $(top_srcdir)/Makefile.in.bak; \
|
---|
317 | if test -f depend-gen; then \
|
---|
318 | failfiles=""; \
|
---|
319 | for ff in $(SOURCES) $(srcsrc)/kern_head.c; do \
|
---|
320 | ./depend-gen -i '$$(srcinc)/' -o $(top_srcdir)/Makefile.in $$ff || \
|
---|
321 | failfiles="$${failfiles} $$ff"; \
|
---|
322 | done; \
|
---|
323 | if test x"$${failfiles}" != x; then \
|
---|
324 | echo "--------------------------------------------------------";\
|
---|
325 | echo " depend-gen failed to update Makefile.in. You can safely"; \
|
---|
326 | echo " ignore this error, unless you have modified the source"; \
|
---|
327 | echo " files and changed their dependencies."; \
|
---|
328 | echo "--------------------------------------------------------";\
|
---|
329 | else \
|
---|
330 | echo $(srcsrc) > $(top_srcdir)/stamp-dep; \
|
---|
331 | fi; \
|
---|
332 | fi
|
---|
333 |
|
---|
334 | # do it manually
|
---|
335 | #
|
---|
336 | depend: depend-gen
|
---|
337 | @echo "update Makefile.in ..."; \
|
---|
338 | for ff in $(SOURCES) $(srcsrc)/kern_head.c; do \
|
---|
339 | ./depend-gen -i '$$(srcinc)/' -o $(top_srcdir)/Makefile.in $$ff; \
|
---|
340 | echo $(srcsrc) > $(top_srcdir)/stamp-dep; \
|
---|
341 | done
|
---|
342 |
|
---|
343 |
|
---|
344 | #----------------------------------------------------------
|
---|
345 | #
|
---|
346 | # CLEAN rules
|
---|
347 | #
|
---|
348 | #----------------------------------------------------------
|
---|
349 |
|
---|
350 |
|
---|
351 | # everything created by make
|
---|
352 | #
|
---|
353 |
|
---|
354 | CLEANFILES = encode config_xor.h depend-gen sh_ks.h sh_ks_xor.h kern_head \
|
---|
355 | internal.h sh_MK.h trustfile sstrip samhain mkhdr encode cutest \
|
---|
356 | yule samhain_setpwd samhain_stealth samhainrc yulectl samhain_hide.ko
|
---|
357 |
|
---|
358 | clean:
|
---|
359 | -rm -f core *.o
|
---|
360 | @-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
---|
361 |
|
---|
362 |
|
---|
363 | # everything created by (./configure && make)
|
---|
364 | #
|
---|
365 |
|
---|
366 | DISTCLEANFILES = Makefile samhain.spec sh_gpg_checksum.h sh_gpg_fp.h \
|
---|
367 | init/samhain.startLinux init/samhain.startGentoo \
|
---|
368 | init/samhain.startLSB init/samhain.startFreeBSD \
|
---|
369 | init/samhain.startSolaris init/samhain.startHPUX \
|
---|
370 | init/samhain.startIRIX init/samhain.startMACOSX \
|
---|
371 | deploy.sh sh_MK.h samhain-install.sh sh_gpg_chksum.h sh_gpg_fp.h \
|
---|
372 | rules.deb rules.deb-light \
|
---|
373 | scripts/samhainadmin.pl scripts/check_samhain.pl \
|
---|
374 | scripts/samhain.ebuild scripts/samhain.ebuild-light
|
---|
375 |
|
---|
376 | TESTCLEANFILES = samhain.build samhain.new yule.html \
|
---|
377 | test_ext test_ext.c test_ext.res testhash.tmp \
|
---|
378 | testrc1.signed testrc_1ext testrc_2 testrc_2.signed \
|
---|
379 | test_dnmalloc
|
---|
380 |
|
---|
381 | distclean: clean
|
---|
382 | -rm -f config.status config.log configure.lineno config.h config.cache
|
---|
383 | @-test -z "$(TESTCLEANFILES)" || rm -f $(TESTCLEANFILES)
|
---|
384 | @-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
---|
385 |
|
---|
386 |
|
---|
387 | #----------------------------------------------------------
|
---|
388 | #
|
---|
389 | # TEST rules
|
---|
390 | #
|
---|
391 | #----------------------------------------------------------
|
---|
392 |
|
---|
393 | test14: test
|
---|
394 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
395 | export TOP_SRCDIR && ./test.sh 14 `hostname -f`
|
---|
396 |
|
---|
397 | test13: test
|
---|
398 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
399 | export TOP_SRCDIR && ./test.sh 13 `hostname -f`
|
---|
400 |
|
---|
401 | test12: test
|
---|
402 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
403 | export TOP_SRCDIR && ./test.sh 12 `hostname -f`
|
---|
404 |
|
---|
405 | test11: test
|
---|
406 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
407 | export TOP_SRCDIR && ./test.sh 11 `hostname -f`
|
---|
408 |
|
---|
409 | test10: test
|
---|
410 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
411 | export TOP_SRCDIR && ./test.sh 10 `hostname -f`
|
---|
412 |
|
---|
413 | test7: test
|
---|
414 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
415 | export TOP_SRCDIR && ./test.sh 7
|
---|
416 |
|
---|
417 | test6: test
|
---|
418 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
419 | export TOP_SRCDIR && ./test.sh 6
|
---|
420 |
|
---|
421 | test5: test
|
---|
422 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
423 | export TOP_SRCDIR && ./test.sh 5
|
---|
424 |
|
---|
425 | test4: test
|
---|
426 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
427 | export TOP_SRCDIR && ./test.sh 4
|
---|
428 |
|
---|
429 | test3: test
|
---|
430 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
431 | export TOP_SRCDIR && ./test.sh 3
|
---|
432 |
|
---|
433 | test2: test
|
---|
434 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
435 | export TOP_SRCDIR && ./test.sh 2
|
---|
436 |
|
---|
437 | test1: test
|
---|
438 | @cd test && TOP_SRCDIR=$(top_srcdir) && \
|
---|
439 | export TOP_SRCDIR && ./test.sh 1
|
---|
440 |
|
---|
441 | test:
|
---|
442 | @if test -f test; then \
|
---|
443 | :; \
|
---|
444 | else \
|
---|
445 | cp -pr $(top_srcdir)/test .; \
|
---|
446 | cat $(top_srcdir)/test/test.sh | \
|
---|
447 | sed 's%XXXSRCXXX%$(top_srcdir)%' > test/test.sh; \
|
---|
448 | chmod +x test/test.sh; \
|
---|
449 | fi
|
---|
450 |
|
---|
451 | test_dnmalloc: $(srcsrc)/t-test1.c dnmalloc.o
|
---|
452 | $(COMPILE) $(VFLAG) -o t-test1.o -c $(srcsrc)/t-test1.c; \
|
---|
453 | $(LINK) t-test1.o dnmalloc.o $(LIBS_TRY)
|
---|
454 |
|
---|
455 |
|
---|
456 | #----------------------------------------------------------
|
---|
457 | #
|
---|
458 | # INSTALL rules
|
---|
459 | #
|
---|
460 | #----------------------------------------------------------
|
---|
461 |
|
---|
462 | install: install-lkm install-program install-man install-data
|
---|
463 | @echo; \
|
---|
464 | echo " You can use 'samhain-install.sh uninstall' for uninstalling"; \
|
---|
465 | echo " i.e. you might consider saving that script for future use";\
|
---|
466 | echo; \
|
---|
467 | echo " Use 'make install-boot' if you want @install_name@ to start on system boot"; \
|
---|
468 | echo
|
---|
469 |
|
---|
470 | install-light: install-lkm install-program install-data
|
---|
471 | @echo; \
|
---|
472 | echo " You can use 'samhain-install.sh uninstall' for uninstalling"; \
|
---|
473 | echo " i.e. you might consider saving that script for future use";\
|
---|
474 | echo; \
|
---|
475 | echo " Use 'make install-boot' if you want @install_name@ to start on system boot"; \
|
---|
476 | echo
|
---|
477 |
|
---|
478 | purge: uninstall-lkm uninstall-program uninstall-man
|
---|
479 | @echo "./samhain-install.sh --destdir=$(DESTDIR) --force --verbose uninstall-data"; \
|
---|
480 | ./samhain-install.sh --destdir=$(DESTDIR) --force --verbose uninstall-data
|
---|
481 |
|
---|
482 | remove: uninstall
|
---|
483 |
|
---|
484 | uninstall: uninstall-lkm uninstall-program uninstall-man uninstall-data
|
---|
485 | @echo; \
|
---|
486 | echo " Use 'make purge' if you also want to uninstall the configuration file"; \
|
---|
487 | echo " Use 'make uninstall-boot' to uninstall the runlevel scripts"; \
|
---|
488 | echo
|
---|
489 |
|
---|
490 | #
|
---|
491 | # --- boot ---
|
---|
492 | #
|
---|
493 | install-boot: samhain-install.sh
|
---|
494 | ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-boot
|
---|
495 |
|
---|
496 |
|
---|
497 | uninstall-boot: samhain-install.sh
|
---|
498 | ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-boot
|
---|
499 |
|
---|
500 | #
|
---|
501 | # --- program ---
|
---|
502 | #
|
---|
503 |
|
---|
504 | # -- NEW --
|
---|
505 | install-lkm: @sh_lkm@
|
---|
506 | @RVER=`uname -r`; \
|
---|
507 | if test "x@sh_lkm@" != "x"; then \
|
---|
508 | if test -d /lib/modules/$$RVER; then \
|
---|
509 | MODDIR="/lib/modules/$$RVER"; \
|
---|
510 | elif test -d /lib/modules/misc; then \
|
---|
511 | MODDIR="/lib/modules/misc"; \
|
---|
512 | elif test -d /lib/modules; then \
|
---|
513 | MODDIR="/lib/modules/misc"; \
|
---|
514 | fi; \
|
---|
515 | $(mkinstalldirs) $(DESTDIR)$${MODDIR}; \
|
---|
516 | list='@sh_lkm@'; for p in $$list; do \
|
---|
517 | echo " cp $$p $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'`"; \
|
---|
518 | cp $$p $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'` ; \
|
---|
519 | chown root $(DESTDIR)$${MODDIR}/`echo $$p|sed 's%samhain%@install_name@%'`; \
|
---|
520 | done; \
|
---|
521 | if test "x$(DESTDIR)" = x; then \
|
---|
522 | echo " depmod -a || /sbin/depmod -a"; \
|
---|
523 | depmod -a || /sbin/depmod -a; \
|
---|
524 | fi; \
|
---|
525 | fi
|
---|
526 |
|
---|
527 | uninstall-lkm:
|
---|
528 | @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-lkm";\
|
---|
529 | ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-lkm
|
---|
530 |
|
---|
531 |
|
---|
532 | install-program: $(PROGRAMS) sstrip
|
---|
533 | @$(mkinstalldirs) $(DESTDIR)$(sbindir)
|
---|
534 | @if test x$(mytmpdir) != x; then \
|
---|
535 | $(mkinstalldirs) $(DESTDIR)$(mytmpdir); \
|
---|
536 | fi
|
---|
537 | @list='$(PROGRAMS)'; for p in $$list; do \
|
---|
538 | if test -f $$p; then \
|
---|
539 | echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`"; \
|
---|
540 | $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
|
---|
541 | chmod 0700 $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
|
---|
542 | echo " ./sstrip $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`"; \
|
---|
543 | ./sstrip $(DESTDIR)$(sbindir)/`echo $$p|sed 's%samhain%@install_name@%'|sed 's%yule%@install_name@%'`; \
|
---|
544 | else :; fi; \
|
---|
545 | done
|
---|
546 |
|
---|
547 | uninstall-program:
|
---|
548 | @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-program";\
|
---|
549 | ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-program
|
---|
550 |
|
---|
551 |
|
---|
552 | #
|
---|
553 | # -- data files
|
---|
554 | #
|
---|
555 |
|
---|
556 | install-user:
|
---|
557 | @if test "x@need_user_install@" = x1; then \
|
---|
558 | echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-user @myident@"; \
|
---|
559 | ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-user @myident@; \
|
---|
560 | fi
|
---|
561 | @if test x"$(VFLAG)" = "x-DSH_WITH_SERVER"; then \
|
---|
562 | echo " chown root $(DESTDIR)$(mydatadir)"; \
|
---|
563 | chown root $(DESTDIR)$(mydatadir); \
|
---|
564 | echo " chmod 755 $(DESTDIR)$(mydatadir)"; \
|
---|
565 | chmod 755 $(DESTDIR)$(mydatadir); \
|
---|
566 | echo " chown @myident@ $(DESTDIR)$(configfile)"; \
|
---|
567 | chown @myident@ $(DESTDIR)$(configfile); \
|
---|
568 | if test x"$(mylogdir)" = "x/var/log"; then \
|
---|
569 | if test x"@myident@" = xroot; then \
|
---|
570 | :; \
|
---|
571 | else \
|
---|
572 | echo; \
|
---|
573 | echo " ----------------------------------------------------------------"; \
|
---|
574 | echo " Directory $(mylogdir) (log file) looks like a system directory."; \
|
---|
575 | echo " You may run into problems (need write access for user @myident@)."; \
|
---|
576 | echo " ----------------------------------------------------------------"; \
|
---|
577 | echo; \
|
---|
578 | fi; \
|
---|
579 | else \
|
---|
580 | echo " chown @myident@ $(DESTDIR)$(mylogdir)"; \
|
---|
581 | chown @myident@ $(DESTDIR)$(mylogdir); \
|
---|
582 | fi; \
|
---|
583 | fi
|
---|
584 |
|
---|
585 | install-data: trustfile
|
---|
586 | @$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
|
---|
587 | @$(mkinstalldirs) $(DESTDIR)$(mylockdir)
|
---|
588 | @$(mkinstalldirs) $(DESTDIR)$(mylogdir)
|
---|
589 | @$(mkinstalldirs) $(DESTDIR)$(mydatadir); \
|
---|
590 | chmod 700 $(DESTDIR)$(mydatadir)
|
---|
591 | @if test -f samhainrc.$(selectconfig); then \
|
---|
592 | :; \
|
---|
593 | else \
|
---|
594 | if test -f $(srcdir)/samhainrc.$(selectconfig); then \
|
---|
595 | cp $(srcdir)/samhainrc.$(selectconfig) . ; \
|
---|
596 | fi; \
|
---|
597 | fi; \
|
---|
598 | if test -f yulerc; then \
|
---|
599 | :; \
|
---|
600 | else \
|
---|
601 | if test -f $(srcdir)/yulerc.template; then \
|
---|
602 | cp $(srcdir)/yulerc.template yulerc; \
|
---|
603 | fi; \
|
---|
604 | fi; \
|
---|
605 | if test -f stealth_template.jpg; then \
|
---|
606 | :; \
|
---|
607 | else \
|
---|
608 | if test -f $(srcdir)/stealth_template.jpg; then \
|
---|
609 | cp $(srcdir)/stealth_template.jpg . ; \
|
---|
610 | fi; \
|
---|
611 | fi
|
---|
612 | @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-data"; \
|
---|
613 | ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-data || \
|
---|
614 | echo " ERROR: Failed to install the configuration file to $(DESTDIR)$(configfile). You need to install the configuration file manually."
|
---|
615 | @if test x"$(VFLAG)" = "x-DSH_WITH_SERVER"; then \
|
---|
616 | echo;\
|
---|
617 | echo " -----------------------------------------------------";\
|
---|
618 | echo " The server will run as user @myident@ if started with";\
|
---|
619 | echo " root privileges, otherwise as the user of the parent ";\
|
---|
620 | echo " process (use --enable-identity=USER to change).";\
|
---|
621 | echo;\
|
---|
622 | echo " You may want to use: make install-user";\
|
---|
623 | echo;\
|
---|
624 | echo " - to add the user @myident@ (if not existing already)";\
|
---|
625 | echo " - to chown the data directory $(mydatadir)";\
|
---|
626 | echo " - to chown the log file directory $(mylogdir)";\
|
---|
627 | echo " - to chown the configuration file $(configfile)";\
|
---|
628 | echo " -----------------------------------------------------";\
|
---|
629 | else \
|
---|
630 | if test "x@need_user_install@" = x1; then \
|
---|
631 | echo;\
|
---|
632 | echo " -----------------------------------------------------";\
|
---|
633 | echo " You may want to use: make install-user";\
|
---|
634 | echo;\
|
---|
635 | echo " - to add the user @myident@ (if not existing already)";\
|
---|
636 | echo " -----------------------------------------------------";\
|
---|
637 | fi; \
|
---|
638 | fi
|
---|
639 |
|
---|
640 | uninstall-data:
|
---|
641 | @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-data"; \
|
---|
642 | ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-data
|
---|
643 |
|
---|
644 | #
|
---|
645 | # -- man files
|
---|
646 | #
|
---|
647 |
|
---|
648 | install-man:
|
---|
649 | $(mkinstalldirs) $(DESTDIR)$(mandir)/man8
|
---|
650 | $(mkinstalldirs) $(DESTDIR)$(mandir)/man5
|
---|
651 | @if test -f $(top_srcdir)/man/samhain.8 ; then \
|
---|
652 | echo " $(INSTALL_MAN) $(top_srcdir)/man/samhain.8 $(DESTDIR)$(mandir)/man8/@install_name@.8"; \
|
---|
653 | $(INSTALL_MAN) $(top_srcdir)/man/samhain.8 $(DESTDIR)$(mandir)/man8/@install_name@.8; \
|
---|
654 | fi
|
---|
655 | @if test -f $(top_srcdir)/man/samhainrc.5 ; then \
|
---|
656 | echo " $(INSTALL_MAN) $(top_srcdir)/man/samhainrc.5 $(DESTDIR)$(mandir)/man5/@install_name@rc.5"; \
|
---|
657 | $(INSTALL_MAN) $(top_srcdir)/man/samhainrc.5 $(DESTDIR)$(mandir)/man5/@install_name@rc.5; \
|
---|
658 | fi
|
---|
659 |
|
---|
660 | uninstall-man:
|
---|
661 | @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-man";\
|
---|
662 | ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-man
|
---|
663 |
|
---|
664 |
|
---|
665 | #----------------------------------------------------------
|
---|
666 | #
|
---|
667 | # BUILD rules
|
---|
668 | #
|
---|
669 | #----------------------------------------------------------
|
---|
670 |
|
---|
671 | run: run-light
|
---|
672 |
|
---|
673 | run-light: all
|
---|
674 | @echo "Building $(PACKAGE)-$(VERSION).run"; \
|
---|
675 | STAGE=$(PACKAGE)-$(VERSION); \
|
---|
676 | mkdir $$STAGE; \
|
---|
677 | if test x"$$?" != x0; then \
|
---|
678 | echo "ERROR ... mkdir $$STAGE failed"; \
|
---|
679 | exit 1; \
|
---|
680 | fi; \
|
---|
681 | $(MAKE) DESTDIR=$$STAGE install-light; \
|
---|
682 | rm -f $$STAGE/@sbindir@/@install_name@_stealth; \
|
---|
683 | echo "#! /bin/sh" > $$STAGE/setup.sh; \
|
---|
684 | if test x$(mytmpdir) != x; then \
|
---|
685 | echo "./mkinstalldirs @mytmpdir@ || exit 1" >> $$STAGE/setup.sh; \
|
---|
686 | fi; \
|
---|
687 | echo "./mkinstalldirs @sbindir@ || exit 1" >> $$STAGE/setup.sh; \
|
---|
688 | echo "./mkinstalldirs @sysconfdir@ || exit 1" >> $$STAGE/setup.sh; \
|
---|
689 | echo "./mkinstalldirs @mylockdir@ || exit 1" >> $$STAGE/setup.sh; \
|
---|
690 | echo "./mkinstalldirs @mylogdir@ || exit 1" >> $$STAGE/setup.sh; \
|
---|
691 | echo "./mkinstalldirs @mydataroot@ || exit 1" >> $$STAGE/setup.sh; \
|
---|
692 | echo "chmod 700 @mydataroot@ || exit 1" >> $$STAGE/setup.sh; \
|
---|
693 | if test -f $$STAGE/lib/modules; then \
|
---|
694 | RVER=`uname -r`; \
|
---|
695 | echo "chown root:root lib/modules/$$RVER/*" >> $$STAGE/setup.sh; \
|
---|
696 | if test -d /lib/modules/$$RVER; then \
|
---|
697 | echo "./mkinstalldirs /lib/modules/$$RVER" >> $$STAGE/setup.sh; \
|
---|
698 | echo "cp -p lib/modules/$$RVER/* /lib/modules/$$RVER/" >> $$STAGE/setup.sh; \
|
---|
699 | elif test -d /lib/modules/misc; then \
|
---|
700 | echo "./mkinstalldirs /lib/modules/misc" >> $$STAGE/setup.sh; \
|
---|
701 | echo "cp -p lib/modules/misc/* /lib/modules/misc/" >> $$STAGE/setup.sh; \
|
---|
702 | elif test -d /lib/modules; then \
|
---|
703 | echo "./mkinstalldirs /lib/modules/misc" >> $$STAGE/setup.sh; \
|
---|
704 | echo "cp -p lib/modules/misc/* /lib/modules/misc/" >> $$STAGE/setup.sh; \
|
---|
705 | fi; \
|
---|
706 | echo "/sbin/depmod -a" >> $$STAGE/setup.sh; \
|
---|
707 | fi; \
|
---|
708 | temp=`echo $(sbindir) | sed s,^/,,`; \
|
---|
709 | echo "chown root $$temp/*" >> $$STAGE/setup.sh; \
|
---|
710 | echo "cp -p $$temp/* $(sbindir) || exit 1" >> $$STAGE/setup.sh; \
|
---|
711 | temp=`echo $(sysconfdir) | sed s,^/,,`; \
|
---|
712 | echo "chown root $$temp/*" >> $$STAGE/setup.sh; \
|
---|
713 | configfile=`echo @myconffile@ | sed 's%^REQ_FROM_SERVER%%'`; \
|
---|
714 | echo "test -f $$configfile || cp -p $$temp/* $$configfile" >> $$STAGE/setup.sh; \
|
---|
715 | echo "./samhain-install.sh --express --verbose install-boot || echo 'Cannot install init script'" >> $$STAGE/setup.sh; \
|
---|
716 | cp $(top_srcdir)/mkinstalldirs $$STAGE/; \
|
---|
717 | cp $(top_srcdir)/install-sh $$STAGE/; \
|
---|
718 | cp ./samhain-install.sh $$STAGE/; \
|
---|
719 | cp -r init/ $$STAGE/; \
|
---|
720 | chmod +x $$STAGE/setup.sh; \
|
---|
721 | chmod +x $$STAGE/samhain-install.sh; \
|
---|
722 | chmod +x $$STAGE/mkinstalldirs; \
|
---|
723 | chmod +x $$STAGE/install-sh; \
|
---|
724 | $(top_srcdir)/scripts/makeself/makeself.sh --header $(top_srcdir)/scripts/makeself/makeself-header.sh --nocomp --nomd5 --notemp $$STAGE $(PACKAGE)-$(VERSION).run "$(PACKAGE)_$(VERSION)_self_extracting_installer" ./setup.sh && \
|
---|
725 | rm -r $(PACKAGE)-$(VERSION)
|
---|
726 |
|
---|
727 | emerge-prepare: dist
|
---|
728 | @echo "Building $(PACKAGE)-$(VERSION)"; \
|
---|
729 | test -f /etc/make.globals && . /etc/make.globals; \
|
---|
730 | test -f /etc/make.conf && . /etc/make.conf; \
|
---|
731 | echo "$(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz"; \
|
---|
732 | $(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz; \
|
---|
733 | if test "x$${PORTDIR_OVERLAY}" = "x"; then \
|
---|
734 | COPY_TO="$${PORTDIR}"; \
|
---|
735 | else \
|
---|
736 | COPY_TO="$${PORTDIR_OVERLAY}"; \
|
---|
737 | fi; \
|
---|
738 | $(mkinstalldirs) $${COPY_TO}/app-admin/@install_name@; \
|
---|
739 | echo "$(INSTALL_MAN) scripts/samhain.ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild";\
|
---|
740 | $(INSTALL_MAN) scripts/samhain.ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild; \
|
---|
741 | test -f $${COPY_TO}/app-admin/@install_name@/files/digest-@install_name@-$(VERSION) && rm $${COPY_TO}/app-admin/@install_name@/files/digest-@install_name@-$(VERSION);\
|
---|
742 | ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild digest;
|
---|
743 |
|
---|
744 | emerge-prepare-light: dist
|
---|
745 | @echo "Building $(PACKAGE)-$(VERSION)"; \
|
---|
746 | test -f /etc/make.globals && . /etc/make.globals; \
|
---|
747 | test -f /etc/make.conf && . /etc/make.conf; \
|
---|
748 | echo "$(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz"; \
|
---|
749 | $(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz; \
|
---|
750 | if test "x$${PORTDIR_OVERLAY}" = "x"; then \
|
---|
751 | COPY_TO="$${PORTDIR}"; \
|
---|
752 | else \
|
---|
753 | COPY_TO="$${PORTDIR_OVERLAY}"; \
|
---|
754 | fi; \
|
---|
755 | $(mkinstalldirs) $${COPY_TO}/app-admin/@install_name@; \
|
---|
756 | echo "$(INSTALL_MAN) scripts/samhain.ebuild-light $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild";\
|
---|
757 | $(INSTALL_MAN) scripts/samhain.ebuild-light $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild; \
|
---|
758 | test -f $${COPY_TO}/app-admin/@install_name@/files/digest-@install_name@-$(VERSION) && rm $${COPY_TO}/app-admin/@install_name@/files/digest-@install_name@-$(VERSION);\
|
---|
759 | ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild digest;
|
---|
760 |
|
---|
761 |
|
---|
762 | tbz2: emerge-prepare
|
---|
763 | @emerge --buildpkgonly @install_name@; \
|
---|
764 | test -f /etc/make.globals && . /etc/make.globals; \
|
---|
765 | test -f /etc/make.conf && . /etc/make.conf; \
|
---|
766 | echo; \
|
---|
767 | echo "@install_name@-$(VERSION).tbz2 should be in $${PKGDIR}/All"; \
|
---|
768 | if test -f $${PKGDIR}/All/@install_name@-$(VERSION).tbz2; then \
|
---|
769 | echo "Package $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 built."; \
|
---|
770 | mv $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 $(PACKAGE)-$(VERSION).tbz2; \
|
---|
771 | rm -f $${PKGDIR}/app-admin/@install_name@-$(VERSION).tbz2; \
|
---|
772 | rm -rf $${PORTAGE_TMPDIR}/portage/@install_name@-$(VERSION); \
|
---|
773 | else \
|
---|
774 | echo "Error ... cannot find package."; \
|
---|
775 | exit 1; \
|
---|
776 | fi; \
|
---|
777 | echo
|
---|
778 |
|
---|
779 | tbz2-light: emerge-prepare-light
|
---|
780 | @emerge --buildpkgonly @install_name@; \
|
---|
781 | test -f /etc/make.globals && . /etc/make.globals; \
|
---|
782 | test -f /etc/make.conf && . /etc/make.conf; \
|
---|
783 | echo; \
|
---|
784 | if test -f $${PKGDIR}/All/@install_name@-$(VERSION).tbz2; then \
|
---|
785 | echo "Package $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 built."; \
|
---|
786 | mv $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 $(PACKAGE)-$(VERSION).tbz2; \
|
---|
787 | rm -f $${PKGDIR}/app-admin/@install_name@-$(VERSION).tbz2; \
|
---|
788 | rm -rf $${PORTAGE_TMPDIR}/portage/@install_name@-$(VERSION); \
|
---|
789 | else \
|
---|
790 | echo "Error ... cannot find package."; \
|
---|
791 | exit 1; \
|
---|
792 | fi; \
|
---|
793 | echo
|
---|
794 |
|
---|
795 | emerge:
|
---|
796 | emerge $(PACKAGE);
|
---|
797 |
|
---|
798 | deb-light:
|
---|
799 | @echo "creating subdirectory debian"; \
|
---|
800 | mkdir -p debian; \
|
---|
801 | cp rules.deb-light debian/rules; \
|
---|
802 | chmod +x debian/rules; \
|
---|
803 | echo $(sbindir) | sed s,^/,, > debian/dirs; \
|
---|
804 | if test x$(mytmpdir) != x; then \
|
---|
805 | echo $(mytmpdir) | sed s,^/,, >> debian/dirs; \
|
---|
806 | fi; \
|
---|
807 | echo $(sysconfdir) | sed s,^/,, >> debian/dirs; \
|
---|
808 | echo etc/init.d >> debian/dirs; \
|
---|
809 | echo $(mydatadir) | sed s,^/,, >> debian/dirs; \
|
---|
810 | echo $(mylogdir) | sed s,^/,, >> debian/dirs; \
|
---|
811 | echo $(mylockdir) | sed s,^/,, >> debian/dirs; \
|
---|
812 | if test "x@sh_lkm@" != x; then \
|
---|
813 | RVER=`uname -r`; \
|
---|
814 | if test -d /lib/modules/$$RVER; then \
|
---|
815 | echo "lib/modules/$$RVER" >> debian/dirs; \
|
---|
816 | elif test -d /lib/modules/misc; then \
|
---|
817 | echo "lib/modules/misc" >> debian/dirs; \
|
---|
818 | elif test -d /lib/modules; then \
|
---|
819 | echo "lib/modules/misc" >> debian/dirs; \
|
---|
820 | fi; \
|
---|
821 | fi; \
|
---|
822 | $(MAKE) deb-run
|
---|
823 |
|
---|
824 | deb:
|
---|
825 | @echo "creating subdirectory debian"; \
|
---|
826 | mkdir -p debian; \
|
---|
827 | cp rules.deb debian/rules; \
|
---|
828 | chmod +x debian/rules; \
|
---|
829 | echo $(sbindir) | sed s,^/,, > debian/dirs; \
|
---|
830 | if test x$(mytmpdir) != x; then \
|
---|
831 | echo $(mytmpdir) | sed s,^/,, >> debian/dirs; \
|
---|
832 | fi; \
|
---|
833 | echo $(sysconfdir) | sed s,^/,, >> debian/dirs; \
|
---|
834 | echo etc/init.d >> debian/dirs; \
|
---|
835 | echo $(mydatadir) | sed s,^/,, >> debian/dirs; \
|
---|
836 | echo $(mylogdir) | sed s,^/,, >> debian/dirs; \
|
---|
837 | echo $(mylockdir) | sed s,^/,, >> debian/dirs; \
|
---|
838 | echo $(mandir)/man5 | sed s,^/,, >> debian/dirs; \
|
---|
839 | echo $(mandir)/man8 | sed s,^/,, >> debian/dirs; \
|
---|
840 | echo usr/share/doc/$(PACKAGE) >> debian/dirs; \
|
---|
841 | if test "x@sh_lkm@" != x; then \
|
---|
842 | RVER=`uname -r`; \
|
---|
843 | if test -d /lib/modules/$$RVER; then \
|
---|
844 | echo "lib/modules/$$RVER" >> debian/dirs; \
|
---|
845 | elif test -d /lib/modules/misc; then \
|
---|
846 | echo "lib/modules/misc" >> debian/dirs; \
|
---|
847 | elif test -d /lib/modules; then \
|
---|
848 | echo "lib/modules/misc" >> debian/dirs; \
|
---|
849 | fi; \
|
---|
850 | fi; \
|
---|
851 | echo $(top_srcdir)/README > debian/docs; \
|
---|
852 | echo $(top_srcdir)/test/testtiger.txt >> debian/docs; \
|
---|
853 | echo $(srcsrc)/simple-bignum.tar.bz2 >> debian/docs; \
|
---|
854 | echo $(top_srcdir)/scripts/head.html >> debian/docs; \
|
---|
855 | echo $(top_srcdir)/scripts/foot.html >> debian/docs; \
|
---|
856 | echo $(top_srcdir)/samhain.jpg >> debian/docs; \
|
---|
857 | echo $(top_srcdir)/docs/BUGS >> debian/docs; \
|
---|
858 | echo $(top_srcdir)/docs/HOWTO-client+server.html >> debian/docs; \
|
---|
859 | echo $(top_srcdir)/docs/HOWTO-samhain+GnuPG.html >> debian/docs; \
|
---|
860 | echo $(top_srcdir)/docs/MANUAL-2_3.html.tar >> debian/docs; \
|
---|
861 | echo $(top_srcdir)/docs/MANUAL-2_3.pdf >> debian/docs; \
|
---|
862 | echo $(top_srcdir)/docs/README.gcc_bug >> debian/docs; \
|
---|
863 | echo $(top_srcdir)/docs/README.LZO >> debian/docs; \
|
---|
864 | echo $(top_srcdir)/docs/README.sstrip >> debian/docs; \
|
---|
865 | echo $(top_srcdir)/docs/README.UPGRADE >> debian/docs; \
|
---|
866 | echo $(top_srcdir)/docs/README.win2K >> debian/docs; \
|
---|
867 | echo $(top_srcdir)/docs/TODO >> debian/docs; \
|
---|
868 | $(MAKE) deb-run
|
---|
869 |
|
---|
870 | deb-run:
|
---|
871 | @maintainer=`gpg --list-secret-keys | grep 'uid ' | cut -d" " -f 5- | sed 's/^ *//' | sed q1`;\
|
---|
872 | if test "x$$maintainer" = x; then \
|
---|
873 | maintainer="$(DEFAULT_MAINTAINER)"; \
|
---|
874 | fi; \
|
---|
875 | echo "$(PACKAGE) ($(VERSION)-$(BUILD_NUM)) stable; urgency=low" > debian/changelog; \
|
---|
876 | echo >> debian/changelog; \
|
---|
877 | echo " * Initial release." >> debian/changelog; \
|
---|
878 | echo >> debian/changelog; \
|
---|
879 | echo " -- $$maintainer `date -R`" >> debian/changelog; \
|
---|
880 | echo >> debian/changelog; \
|
---|
881 | echo "Local variables:" >> debian/changelog; \
|
---|
882 | echo "mode: debian-changelog" >> debian/changelog; \
|
---|
883 | echo "End:" >> debian/changelog; \
|
---|
884 | cp $(top_srcdir)/COPYING debian/copyright; \
|
---|
885 | touch debian/README.debian; \
|
---|
886 | echo "Document: @install_name@-manual" > debian/@install_name@.doc-base; \
|
---|
887 | echo "Title: @install_name@ Manual" >> debian/@install_name@.doc-base; \
|
---|
888 | echo "Author: Rainer Wichmann" >> debian/@install_name@.doc-base; \
|
---|
889 | echo "Abstract: This manual describes what @install_name@ is" >> debian/@install_name@.doc-base; \
|
---|
890 | echo " and how it can be used to check the file integrity of your" >> debian/@install_name@.doc-base; \
|
---|
891 | echo " server." >> debian/@install_name@.doc-base; \
|
---|
892 | echo "Section: System/Security" >> debian/@install_name@.doc-base; \
|
---|
893 | echo >> debian/@install_name@.doc-base; \
|
---|
894 | echo >> debian/@install_name@.doc-base; \
|
---|
895 | echo "Format: Postscript" >> debian/@install_name@.doc-base; \
|
---|
896 | echo "Files: /usr/share/doc/@install_name@/manual.pdf.gz" >> debian/@install_name@.doc-base; \
|
---|
897 | echo >> debian/@install_name@.doc-base; \
|
---|
898 | echo "Format: HTML" >> debian/@install_name@.doc-base; \
|
---|
899 | echo "Index: /usr/share/doc/@install_name@/manual.html/index.html" >> debian/@install_name@.doc-base; \
|
---|
900 | echo "Files: /usr/share/doc/@install_name@/manual.html/*.html" >> debian/@install_name@.doc-base; \
|
---|
901 | if test -f /usr/lib/lsb/install_initd; then \
|
---|
902 | cp init/samhain.startLSB debian/@install_name@.init; \
|
---|
903 | else \
|
---|
904 | cp init/samhain.startLinux debian/@install_name@.init; \
|
---|
905 | fi; \
|
---|
906 | echo "Source: samhain" > debian/control; \
|
---|
907 | echo "Section: admin" >> debian/control; \
|
---|
908 | echo "Priority: optional" >> debian/control; \
|
---|
909 | echo "Maintainer: $$maintainer" >> debian/control; \
|
---|
910 | echo "Standards-Version: 3.2.1" >> debian/control; \
|
---|
911 | echo >> debian/control; \
|
---|
912 | echo "Package: @install_name@" >> debian/control; \
|
---|
913 | echo "Architecture: any" >> debian/control; \
|
---|
914 | echo "Depends: libc6" >> debian/control; \
|
---|
915 | echo "Description: File integrity checker" >> debian/control; \
|
---|
916 | echo " A file integrity checker" >> debian/control; \
|
---|
917 | echo "running debuild -us -uc"; \
|
---|
918 | debuild -us -uc -b; \
|
---|
919 | DEBFILE=`find ../ -follow -maxdepth 1 -cnewer ./debian/control 2>/dev/null | grep '@install_name@_$(VERSION)' | grep '\.deb'`; \
|
---|
920 | if test x"$$DEBFILE" = x; then \
|
---|
921 | echo "Error ... cannot find package file"; \
|
---|
922 | exit 1; \
|
---|
923 | else \
|
---|
924 | echo "Package $$DEBFILE built."; \
|
---|
925 | cp $$DEBFILE ./$(PACKAGE)-$(VERSION)-$(BUILD_NUM).deb; \
|
---|
926 | ln -s ./$(PACKAGE)-$(VERSION)-$(BUILD_NUM).deb ./$(PACKAGE)-$(VERSION).deb; \
|
---|
927 | fi; \
|
---|
928 | echo
|
---|
929 |
|
---|
930 | #
|
---|
931 | # Check samhain.spec
|
---|
932 | #
|
---|
933 | rpmspec-full:
|
---|
934 | @grep 'install-light' samhain.spec >/dev/null 2>&1; \
|
---|
935 | if test x"$$?" = "x0"; then \
|
---|
936 | echo "Your samhain.spec is from rpm-light. Please run"; \
|
---|
937 | echo " .config.status to re-create the original samhain.spec"; \
|
---|
938 | exit 1; \
|
---|
939 | fi
|
---|
940 |
|
---|
941 | # when editing the spec file, make an additional blank after 'make'
|
---|
942 | # to avoid that it matches on a second processing
|
---|
943 | #
|
---|
944 | rpmspec-light: samhain.spec
|
---|
945 | @echo "Stripping docs from samhain.spec"; \
|
---|
946 | cat samhain.spec | sed 's,make DESTDIR=$${RPM_BUILD_ROOT} install,make DESTDIR=$${RPM_BUILD_ROOT} install-light,' | sed s,shkeep=yes,shkeep=no, | sed s,%doc.*,, | sed s,%attr.*,, > samhain.spec-light; \
|
---|
947 | mv samhain.spec-light samhain.spec
|
---|
948 |
|
---|
949 | rpm-light: rpmspec-light distrpm
|
---|
950 | rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
|
---|
951 | @RPMTOP=`cat ~/.rpmmacros 2>/dev/null | grep '%_topdir' | awk '{ print $$2}'`; \
|
---|
952 | if test x"$$RPMTOP" = x; then RPMTOP=/usr/src; fi; \
|
---|
953 | echo "Searching the RPM package below $$RPMTOP ..."; \
|
---|
954 | RPMFILE=`find $$RPMTOP -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
|
---|
955 | echo; \
|
---|
956 | if test x"$$RPMFILE" = x; then \
|
---|
957 | echo "Error ... cannot find package file"; \
|
---|
958 | exit 1; \
|
---|
959 | else \
|
---|
960 | echo "Package $$RPMFILE built."; \
|
---|
961 | echo "Copying it to ./$(PACKAGE)-$(VERSION).rpm"; \
|
---|
962 | cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
|
---|
963 | fi; \
|
---|
964 | echo
|
---|
965 |
|
---|
966 | rpm: rpmspec-full distrpm
|
---|
967 | rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
|
---|
968 | @RPMTOP=`cat ~/.rpmmacros 2>/dev/null | grep '%_topdir' | awk '{ print $$2}'`; \
|
---|
969 | if test x"$$RPMTOP" = x; then RPMTOP=/usr/src; fi; \
|
---|
970 | echo "Searching the RPM package below $$RPMTOP ..."; \
|
---|
971 | RPMFILE=`find $$RPMTOP -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
|
---|
972 | echo; \
|
---|
973 | if test x"$$RPMFILE" = x; then \
|
---|
974 | echo "Error ... cannot find package file"; \
|
---|
975 | exit 1; \
|
---|
976 | else \
|
---|
977 | echo "Package $$RPMFILE built."; \
|
---|
978 | echo "Copying it to ./$(PACKAGE)-$(VERSION).rpm"; \
|
---|
979 | cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
|
---|
980 | fi; \
|
---|
981 | echo
|
---|
982 |
|
---|
983 | srpm-dist: rpmspec-full samhain.spec
|
---|
984 | @cat samhain.spec | \
|
---|
985 | sed s%\-\-with\-base=.*\,[0123456789]*%% | \
|
---|
986 | sed s%\'\'%% > samhain.spec.m; \
|
---|
987 | mv samhain.spec.m samhain.spec
|
---|
988 | $(MAKE) distrpm
|
---|
989 | rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
|
---|
990 |
|
---|
991 |
|
---|
992 | srpm: rpmspec-full distrpm
|
---|
993 | rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
|
---|
994 |
|
---|
995 | solaris-pkg-light: all
|
---|
996 | @STAGE=/tmp/samhain-pkg-staging; \
|
---|
997 | mkdir $$STAGE; \
|
---|
998 | if test x"$$?" != x0; then \
|
---|
999 | echo "ERROR ... mkdir $$STAGE failed"; \
|
---|
1000 | exit 1; \
|
---|
1001 | fi; \
|
---|
1002 | $(MAKE) DESTDIR=$$STAGE install-light;
|
---|
1003 | $(MAKE) solaris-pkg-finish
|
---|
1004 |
|
---|
1005 | solaris-pkg: all
|
---|
1006 | @STAGE=/tmp/samhain-pkg-staging; \
|
---|
1007 | mkdir $$STAGE; \
|
---|
1008 | if test x"$$?" != x0; then \
|
---|
1009 | echo "ERROR ... mkdir $$STAGE failed"; \
|
---|
1010 | exit 1; \
|
---|
1011 | fi; \
|
---|
1012 | $(MAKE) DESTDIR=$$STAGE install;
|
---|
1013 | $(MAKE) solaris-pkg-finish
|
---|
1014 |
|
---|
1015 | solaris-pkg-finish:
|
---|
1016 | @STAGE=/tmp/samhain-pkg-staging; \
|
---|
1017 | $(mkinstalldirs) $$STAGE/etc/init.d; \
|
---|
1018 | $(INSTALL_SHELL) init/samhain.startSolaris $$STAGE/etc/init.d/@install_name@; \
|
---|
1019 | (echo 'i pkginfo'; pkgproto $$STAGE=/ ) >prototype; \
|
---|
1020 | user=`id | sed s,uid=[0123456789]*\(,, | sed s,\).*,,`; \
|
---|
1021 | group=`id | sed s,.*gid=[0123456789]*\(,, | sed s,\).*,,`; \
|
---|
1022 | cat prototype | grep -v 'none / ' | \
|
---|
1023 | sed s,$$user\ $$group,root\ sys,g > prototype.1; \
|
---|
1024 | rm -f prototype.2; \
|
---|
1025 | while read line; do \
|
---|
1026 | echo "$${line}" | egrep '^d none' >/dev/null 2>&1; \
|
---|
1027 | if [ $$? = 0 ]; then \
|
---|
1028 | dir=`echo "$${line}" | awk '{ print $$3 }'`; \
|
---|
1029 | if [ -d "$$dir" ]; then \
|
---|
1030 | echo "d none $${dir} ? ? ?" >> prototype.2; \
|
---|
1031 | else \
|
---|
1032 | echo "$${line}" >> prototype.2; \
|
---|
1033 | fi; \
|
---|
1034 | else \
|
---|
1035 | echo "$${line}" >> prototype.2; \
|
---|
1036 | fi; \
|
---|
1037 | done < prototype.1; \
|
---|
1038 | rm -f prototype && rm prototype.1 && mv prototype.2 prototype; \
|
---|
1039 | echo "d none /etc/rc0.d ? ? ?" >> prototype; \
|
---|
1040 | echo "d none /etc/rc1.d ? ? ?" >> prototype; \
|
---|
1041 | echo "d none /etc/rc3.d ? ? ?" >> prototype; \
|
---|
1042 | echo "l none /etc/rc3.d/S99@install_name@=/etc/init.d/@install_name@" >> prototype; \
|
---|
1043 | echo "l none /etc/rc0.d/K10@install_name@=/etc/init.d/@install_name@" >> prototype; \
|
---|
1044 | echo "l none /etc/rc1.d/K10@install_name@=/etc/init.d/@install_name@" >> prototype; \
|
---|
1045 | ARCH=`uname -p`; \
|
---|
1046 | PSTAMP=`date '+%c%y%m%d%H%M%S'`; \
|
---|
1047 | echo "PKG=@install_name@" > pkginfo; \
|
---|
1048 | echo "NAME=file integrity check" >> pkginfo; \
|
---|
1049 | echo "VERSION=$(VERSION)" >> pkginfo; \
|
---|
1050 | echo "CATEGORY=system" >> pkginfo; \
|
---|
1051 | echo "CLASSES=none" >> pkginfo; \
|
---|
1052 | echo "VENDOR=http://la-samhna.de/samhain" >> pkginfo; \
|
---|
1053 | echo "EMAIL=support@la-samhna.de" >> pkginfo; \
|
---|
1054 | echo "ARCH=$$ARCH" >> pkginfo; \
|
---|
1055 | echo "PSTAMP=$$PSTAMP" >> pkginfo; \
|
---|
1056 | pkgmk -o; \
|
---|
1057 | pkgtrans -s /var/spool/pkg /tmp/samhain-pkg-staging/@install_name@.pkg @install_name@; \
|
---|
1058 | if test -f /tmp/samhain-pkg-staging/@install_name@.pkg; then \
|
---|
1059 | echo; \
|
---|
1060 | cp /tmp/samhain-pkg-staging/@install_name@.pkg $(PACKAGE)-$(VERSION).pkg; \
|
---|
1061 | echo "Package $(PACKAGE)-$(VERSION).pkg is ready for installation"; \
|
---|
1062 | echo "to install, use: pkgadd -n -d $(PACKAGE)-$(VERSION).pkg all"; \
|
---|
1063 | echo; \
|
---|
1064 | rm -rf /var/spool/pkg/@install_name@ /tmp/samhain-pkg-staging; \
|
---|
1065 | else \
|
---|
1066 | echo; \
|
---|
1067 | echo "**************************************************************"; \
|
---|
1068 | echo "Error ... cannot find /tmp/samhain-pkg-staging/@install_name@.pkg."; \
|
---|
1069 | echo "Keeping /var/spool/pkg/@install_name@ /tmp/samhain-pkg-staging"; \
|
---|
1070 | if test -d /var/spool/pkg; then \
|
---|
1071 | echo "**************************************************************"; \
|
---|
1072 | else \
|
---|
1073 | echo "************** /var/spool/pkg is missing *********************"; \
|
---|
1074 | fi; \
|
---|
1075 | echo; \
|
---|
1076 | exit 1; \
|
---|
1077 | fi
|
---|
1078 |
|
---|
1079 | depot-prep: all
|
---|
1080 | STAGE=/tmp/samhain-pkg-staging; \
|
---|
1081 | mkdir $$STAGE; \
|
---|
1082 | if test x"$$?" != x0; then \
|
---|
1083 | echo "ERROR ... mkdir $$STAGE failed"; \
|
---|
1084 | exit 1; \
|
---|
1085 | fi; \
|
---|
1086 | $(MAKE) DESTDIR=$$STAGE install; \
|
---|
1087 | $(MAKE) DESTDIR=$$STAGE install-boot; \
|
---|
1088 | cp hp_ux.psf $$STAGE; \
|
---|
1089 | mkdir $$STAGE/sc; \
|
---|
1090 | echo "#!/sbin/sh" > $$STAGE/sc/configure; \
|
---|
1091 | echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/configure; \
|
---|
1092 | echo "chmod 555 /sbin/init.d/samhain; chown bin:bin /sbin/init.d/@install_name@; (cd /sbin; ln -f -s /sbin/init.d/@install_name@ rc2.d/S900@install_name@; ln -f -s /sbin/init.d/@install_name@ rc1.d/K100@install_name@; )" >> $$STAGE/sc/configure; \
|
---|
1093 | chmod +x $$STAGE/sc/configure; \
|
---|
1094 | echo "#!/sbin/sh" > $$STAGE/sc/unconfigure; \
|
---|
1095 | echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/unconfigure; \
|
---|
1096 | echo "rm -f /sbin/rc2.d/S900@install_name@; rm -f /sbin/rc1.d/K100@install_name@" >> $$STAGE/sc/unconfigure; \
|
---|
1097 | chmod +x $$STAGE/sc/unconfigure; \
|
---|
1098 | echo "#!/sbin/sh" > $$STAGE/sc/preremove; \
|
---|
1099 | echo "PATH=\$$SW_PATH; export PATH" >> $$STAGE/sc/preremove; \
|
---|
1100 | echo "/sbin/init.d/@install_name@ stop" >> $$STAGE/sc/preremove; \
|
---|
1101 | echo "exit 0" >> $$STAGE/sc/preremove; \
|
---|
1102 | chmod +x $$STAGE/sc/preremove;
|
---|
1103 |
|
---|
1104 | depot: depot-prep
|
---|
1105 | (cd /tmp/samhain-pkg-staging && /usr/sbin/swpackage -v -s ./hp_ux.psf -x media_type=tape @ $(PACKAGE)-$(VERSION).depot)
|
---|
1106 | cp /tmp/samhain-pkg-staging/$(PACKAGE)-$(VERSION).depot .
|
---|
1107 | rm -rf /tmp/samhain-pkg-staging
|
---|
1108 |
|
---|
1109 | depot-light: depot
|
---|
1110 |
|
---|
1111 | #---------------------------------------------------------------
|
---|
1112 |
|
---|
1113 |
|
---|
1114 | trustfile: $(srcsrc)/trustfile.c config.h
|
---|
1115 | $(COMPILE) $(VFLAG) -DSH_IDENT=\"@myident@\" -DTRUST_MAIN -DSL_ALWAYS_TRUSTED=@mytrust@ -o trustfile $(srcsrc)/trustfile.c
|
---|
1116 |
|
---|
1117 | sh_MK.h: config.h
|
---|
1118 | @echo "creating sh_MK.h"; \
|
---|
1119 | echo "#ifndef SH_MK_H" > sh_MK.h; \
|
---|
1120 | echo "#define SH_MK_H" >> sh_MK.h; \
|
---|
1121 | $(top_srcdir)/c_bits.sh @my_key_1@ MKB >> sh_MK.h; \
|
---|
1122 | $(top_srcdir)/c_bits.sh @my_key_2@ MKA >> sh_MK.h; \
|
---|
1123 | $(top_srcdir)/c_bits.sh @my_key_3@ MKC >> sh_MK.h; \
|
---|
1124 | $(top_srcdir)/c_bits.sh @my_key_4@ MKD >> sh_MK.h; \
|
---|
1125 | echo "#endif" >> sh_MK.h
|
---|
1126 |
|
---|
1127 |
|
---|
1128 | sstrip: $(srcsrc)/sstrip.c Makefile
|
---|
1129 | $(BUILD_CC) -I. -o sstrip $(srcsrc)/sstrip.c
|
---|
1130 |
|
---|
1131 | encode: $(srcsrc)/encode.c Makefile
|
---|
1132 | $(BUILD_CC) -I. -o encode $(srcsrc)/encode.c
|
---|
1133 |
|
---|
1134 | config_xor.h: config.h encode
|
---|
1135 | @echo 'encode $(XOR_CODE) config.h'; \
|
---|
1136 | sleep 1; \
|
---|
1137 | ./encode $(XOR_CODE) config.h; \
|
---|
1138 | mv x_config.h config_xor.h
|
---|
1139 |
|
---|
1140 | #.c.o:
|
---|
1141 | # @echo "./encode $(XOR_CODE) $< --> x_`echo $< |sed 's%.*/%%'`"; \
|
---|
1142 | # ./encode $(XOR_CODE) $<; \
|
---|
1143 | # echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $< |sed 's%.*/%%'`"; \
|
---|
1144 | # $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $< |sed 's%.*/%%'`; \
|
---|
1145 | # rm x_`echo $< |sed 's%.*/%%'`
|
---|
1146 |
|
---|
1147 | $(OBJECTS): encode internal.h
|
---|
1148 | @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
|
---|
1149 | ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
|
---|
1150 | echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
|
---|
1151 | $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
|
---|
1152 | rm x_`echo $@ |sed 's%\.o$$%%'`.c
|
---|
1153 |
|
---|
1154 | sh_tiger_i.o: $(srcsrc)/$(TIGER_SRC) Makefile config_xor.h
|
---|
1155 | @echo "$(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC)";\
|
---|
1156 | $(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC);
|
---|
1157 |
|
---|
1158 | samhain_setpwd: encode config_xor.h $(srcsrc)/samhain_setpwd.c
|
---|
1159 | @echo '$(COMPILE) -o samhain_setpwd $(srcsrc)/samhain_setpwd.c'; \
|
---|
1160 | ./encode $(XOR_CODE) $(srcsrc)/samhain_setpwd.c; \
|
---|
1161 | $(COMPILE) -o samhain_setpwd x_samhain_setpwd.c; \
|
---|
1162 | rm x_samhain_setpwd.c
|
---|
1163 |
|
---|
1164 | samhain_stealth: encode config_xor.h $(srcsrc)/samhain_stealth.c
|
---|
1165 | @echo '$(COMPILE) -o samhain_stealth $(srcsrc)/samhain_stealth.c'; \
|
---|
1166 | ./encode $(XOR_CODE) $(srcsrc)/samhain_stealth.c; \
|
---|
1167 | $(COMPILE) -o samhain_stealth x_samhain_stealth.c; \
|
---|
1168 | rm x_samhain_stealth.c
|
---|
1169 |
|
---|
1170 | yulectl: encode config_xor.h $(srcsrc)/yulectl.c
|
---|
1171 | @echo '$(COMPILE) -o yulectl $(srcsrc)/yulectl.c $(LIBS_SOCK)'; \
|
---|
1172 | ./encode $(XOR_CODE) $(srcsrc)/yulectl.c; \
|
---|
1173 | $(COMPILE) -o yulectl x_yulectl.c $(LIBS_SOCK); \
|
---|
1174 | rm x_yulectl.c
|
---|
1175 |
|
---|
1176 | $(SAMHAIN): internal.h $(OBJECTS) sh_tiger_i.o
|
---|
1177 | @-rm -f $(SAMHAIN)
|
---|
1178 | @echo "$(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)"; \
|
---|
1179 | $(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)
|
---|
1180 |
|
---|
1181 |
|
---|
1182 | CUTEST_SOURCES = $(srcsrc)/cutest_sh_tools.c \
|
---|
1183 | $(srcsrc)/cutest_sh_utils.c \
|
---|
1184 | $(srcsrc)/cutest_sh_unix.c \
|
---|
1185 | $(srcsrc)/cutest_slib.c \
|
---|
1186 | $(srcsrc)/cutest_zAVLTree.c \
|
---|
1187 | $(srcsrc)/cutest_sh_hash.c \
|
---|
1188 | $(srcsrc)/cutest_sh_tiger0.c
|
---|
1189 |
|
---|
1190 | CUTEST_OBJECTS = cutest_sh_tools.o \
|
---|
1191 | cutest_sh_utils.o \
|
---|
1192 | cutest_sh_unix.o \
|
---|
1193 | cutest_slib.o \
|
---|
1194 | cutest_zAVLTree.o \
|
---|
1195 | cutest_sh_hash.o \
|
---|
1196 | cutest_sh_tiger0.o
|
---|
1197 |
|
---|
1198 | $(CUTEST_OBJECTS): $(CUTEST_SOURCES) config_xor.h internal.h
|
---|
1199 | @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
|
---|
1200 | ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
|
---|
1201 | echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
|
---|
1202 | $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
|
---|
1203 | rm x_`echo $@ |sed 's%\.o$$%%'`.c
|
---|
1204 |
|
---|
1205 |
|
---|
1206 | cutest: $(SOURCES) $(CUTEST_SOURCES)
|
---|
1207 | @$(MAKE) CUTEST='-DSH_CUTEST=1' intcutest
|
---|
1208 |
|
---|
1209 | $(srcsrc)/CuTestMain.c: $(SOURCES) $(CUTEST_SOURCES) $(srcsrc)/make-tests.sh
|
---|
1210 | cd $(srcsrc)/ && ./make-tests.sh >CuTestMain.c;
|
---|
1211 |
|
---|
1212 | intcutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/CuTestMain.c
|
---|
1213 | @$(COMPILE) -o CuTestMain.o -c $(srcsrc)/CuTestMain.c; \
|
---|
1214 | $(COMPILE) -o CuTest.o -c $(srcsrc)/CuTest.c; \
|
---|
1215 | rm -f samhain.o; \
|
---|
1216 | ./encode $(XOR_CODE) $(srcsrc)/samhain.c; \
|
---|
1217 | $(COMPILE) $(VFLAG) -o samhain.o -c x_samhain.c; \
|
---|
1218 | rm x_samhain.c; \
|
---|
1219 | $(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \
|
---|
1220 | test -f ./intcutest && mv ./intcutest ./cutest; \
|
---|
1221 | ./cutest
|
---|
1222 |
|
---|
1223 | runcutest:
|
---|
1224 | gdb ./cutest
|
---|
1225 |
|
---|
1226 | samhain_hide.o: $(srcsrc)/samhain_hide.c samhain_erase.o
|
---|
1227 | gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_hide.c
|
---|
1228 |
|
---|
1229 | samhain_erase.o: $(srcsrc)/samhain_erase.c
|
---|
1230 | gcc @lkm_inc@ -I. -Wall -O2 -c $(srcsrc)/samhain_erase.c
|
---|
1231 |
|
---|
1232 | # -- NEW --
|
---|
1233 | samhain_hide.ko: $(srcsrc)/samhain_hide.c
|
---|
1234 | @test -d m_comp || mkdir m_comp; \
|
---|
1235 | echo "KVERSION := \$$(shell uname -r)" > m_comp/Makefile;\
|
---|
1236 | echo "KSOURCE ?= /lib/modules/\$$(KVERSION)/build" >> m_comp/Makefile;\
|
---|
1237 | echo "obj-m := samhain_hide.o" >> m_comp/Makefile;\
|
---|
1238 | echo ".PHONY: modules install clean modules_add" >> m_comp/Makefile;\
|
---|
1239 | echo "install : modules_add" >> m_comp/Makefile;\
|
---|
1240 | echo "modules modules_install clean:" >> m_comp/Makefile;\
|
---|
1241 | echo "T\$$(MAKE) -C \$$(KSOURCE) \$$@ SUBDIRS=\$$(CURDIR) KBUILD_VERBOSE=2" | tr T '\t' >> m_comp/Makefile;\
|
---|
1242 | cp config.h m_comp/; \
|
---|
1243 | cp $(srcsrc)/samhain_hide.c m_comp/; \
|
---|
1244 | cd m_comp && $(MAKE) modules
|
---|
1245 | @if test -f m_comp/samhain_hide.ko; then \
|
---|
1246 | cp -p m_comp/samhain_hide.ko samhain_hide.ko; \
|
---|
1247 | rm -rf m_comp/; \
|
---|
1248 | else \
|
---|
1249 | echo "Kernel module samhain_hide.ko not build"; \
|
---|
1250 | exit 1; \
|
---|
1251 | fi
|
---|
1252 |
|
---|
1253 | # -- NEW --
|
---|
1254 | samhain_kmem.ko: $(srcsrc)/samhain_kmem.c
|
---|
1255 | @test -d m_comp || mkdir m_comp; \
|
---|
1256 | echo "KVERSION := \$$(shell uname -r)" > m_comp/Makefile;\
|
---|
1257 | echo "KSOURCE ?= /lib/modules/\$$(KVERSION)/build" >> m_comp/Makefile;\
|
---|
1258 | echo "obj-m := samhain_kmem.o" >> m_comp/Makefile;\
|
---|
1259 | echo ".PHONY: modules install clean modules_add" >> m_comp/Makefile;\
|
---|
1260 | echo "install : modules_add" >> m_comp/Makefile;\
|
---|
1261 | echo "modules modules_install clean:" >> m_comp/Makefile;\
|
---|
1262 | echo "T\$$(MAKE) -C \$$(KSOURCE) \$$@ SUBDIRS=\$$(CURDIR) KBUILD_VERBOSE=2" | tr T '\t' >> m_comp/Makefile;\
|
---|
1263 | cp config.h m_comp/; \
|
---|
1264 | cp $(srcsrc)/samhain_kmem.c m_comp/; \
|
---|
1265 | cd m_comp && $(MAKE) modules
|
---|
1266 | @if test -f m_comp/samhain_kmem.ko; then \
|
---|
1267 | cp -p m_comp/samhain_kmem.ko samhain_kmem.ko; \
|
---|
1268 | rm -rf m_comp/; \
|
---|
1269 | else \
|
---|
1270 | echo "Kernel module samhain_kmem.ko not build"; \
|
---|
1271 | exit 1; \
|
---|
1272 | fi
|
---|
1273 |
|
---|
1274 |
|
---|
1275 | # -- NEW --
|
---|
1276 | lkm: @sh_lkm@
|
---|
1277 |
|
---|
1278 |
|
---|
1279 |
|
---|
1280 | # For kernel syscall monitoring
|
---|
1281 | kern_head: Makefile $(top_srcdir)/include/kern_head.h $(srcsrc)/kern_head.c
|
---|
1282 | @echo "$(BUILD_CC) -I. -I./include -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)"; \
|
---|
1283 | $(BUILD_CC) -I. -I./include -DSYSTEMMAP=\"@systemmap@\" -o kern_head $(srcsrc)/kern_head.c $(LIBS_KVM)
|
---|
1284 |
|
---|
1285 | sh_ks.h: kern_head
|
---|
1286 | @sleep 1; \
|
---|
1287 | ./kern_head > sh_ks.h
|
---|
1288 |
|
---|
1289 | sh_ks_xor.h: encode sh_ks.h
|
---|
1290 | @echo 'encode $(XOR_CODE) sh_ks.h'; \
|
---|
1291 | sleep 1; \
|
---|
1292 | ./encode $(XOR_CODE) sh_ks.h; \
|
---|
1293 | mv x_sh_ks.h sh_ks_xor.h
|
---|
1294 |
|
---|
1295 | # For bignum
|
---|
1296 | internal.h: mkhdr
|
---|
1297 | @sleep 1; \
|
---|
1298 | ./mkhdr
|
---|
1299 |
|
---|
1300 | bignum.o: internal.h
|
---|
1301 |
|
---|
1302 |
|
---|
1303 | # If your compiler can't handle long identifiers (> 6 chars), move the `#' to
|
---|
1304 | # the other line.
|
---|
1305 |
|
---|
1306 | mkhdr: $(srcsrc)/mkhdr.c config.h
|
---|
1307 | @echo "$(BUILD_CC) -I. -o mkhdr $(srcsrc)/mkhdr.c"; \
|
---|
1308 | sleep 1; \
|
---|
1309 | $(BUILD_CC) -I. -o mkhdr $(srcsrc)/mkhdr.c
|
---|
1310 |
|
---|
1311 | # $(COMPILE) -DBIG_SHORT_NAMES -o mkhdr $(srcdir)/mkhdr.c
|
---|
1312 |
|
---|
1313 | #----------------------------------------------------------
|
---|
1314 | #
|
---|
1315 | # EXE PACKER rules
|
---|
1316 | #
|
---|
1317 | #----------------------------------------------------------
|
---|
1318 |
|
---|
1319 | minilzo.o: $(srcsrc)/minilzo.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h config.h
|
---|
1320 | @echo "$(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c"; \
|
---|
1321 | $(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c
|
---|
1322 |
|
---|
1323 | exepack_mkdata: $(srcsrc)/exepack_mkdata.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h minilzo.o
|
---|
1324 | @echo "$(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c"; \
|
---|
1325 | $(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c; \
|
---|
1326 | echo "$(LINK) exepack_mkdata.o minilzo.o"; \
|
---|
1327 | $(LINK) exepack_mkdata.o minilzo.o
|
---|
1328 |
|
---|
1329 | #
|
---|
1330 | # prepare the data to be packed
|
---|
1331 | #
|
---|
1332 | exepack.data: $(SAMHAIN) exepack_mkdata sstrip
|
---|
1333 | @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
|
---|
1334 | cp ./$(SAMHAIN) ./samhain.pk.data; \
|
---|
1335 | echo "strip ./samhain.pk.data"; \
|
---|
1336 | strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
|
---|
1337 | echo "./sstrip ./samhain.pk.data"; \
|
---|
1338 | ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
|
---|
1339 | echo "./exepack_mkdata ./samhain.pk.data ./exepack.data 0"; \
|
---|
1340 | ./exepack_mkdata ./samhain.pk.data ./exepack.data 0; \
|
---|
1341 | echo "rm -f ./samhain.pk.data"; \
|
---|
1342 | rm -f ./samhain.pk.data;
|
---|
1343 |
|
---|
1344 | exepack: $(srcsrc)/exepack.c minilzo.o exepack.data
|
---|
1345 | @echo "$(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c"; \
|
---|
1346 | $(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c; \
|
---|
1347 | echo "$(LINK) exepack.o minilzo.o"; \
|
---|
1348 | $(LINK) exepack.o minilzo.o;
|
---|
1349 |
|
---|
1350 | #
|
---|
1351 | # this program fills the data section with the binary
|
---|
1352 | #
|
---|
1353 | exepack_fill: $(srcsrc)/exepack_fill.c minilzo.o exepack
|
---|
1354 | @echo "$(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c"; \
|
---|
1355 | $(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c; \
|
---|
1356 | echo "$(LINK) exepack_fill.o minilzo.o"; \
|
---|
1357 | $(LINK) exepack_fill.o minilzo.o
|
---|
1358 |
|
---|
1359 | samhain.pk: $(SAMHAIN) exepack exepack_fill sstrip
|
---|
1360 | @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
|
---|
1361 | cp ./$(SAMHAIN) ./samhain.pk.data; \
|
---|
1362 | echo "strip ./samhain.pk.data"; \
|
---|
1363 | strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
|
---|
1364 | echo "./sstrip ./samhain.pk.data"; \
|
---|
1365 | ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
|
---|
1366 | test -f exepack.out && rm exepack.out; \
|
---|
1367 | echo "./exepack_fill exepack samhain.pk.data exepack.out"; \
|
---|
1368 | ./exepack_fill exepack samhain.pk.data exepack.out; \
|
---|
1369 | chmod +x exepack.out; \
|
---|
1370 | echo "strip exepack.out"; \
|
---|
1371 | strip exepack.out > /dev/null 2>&1 || echo "... is already stripped"; \
|
---|
1372 | ./sstrip exepack.out > /dev/null 2>&1 || echo "sstrip returned false"; \
|
---|
1373 | echo "mv exepack.out samhain.pk"; \
|
---|
1374 | rm -f samhain.pk; mv exepack.out samhain.pk
|
---|
1375 |
|
---|
1376 | samhain-packed: $(SAMHAIN) samhain_setpwd
|
---|
1377 | @echo "samhain_setpwd samhain new $(CLIENTPASSWD)"; \
|
---|
1378 | samhain_setpwd samhain new $(CLIENTPASSWD); \
|
---|
1379 | echo "rm -f samhain; mv samhain.new samhain"; \
|
---|
1380 | rm -f samhain; mv samhain.new samhain; \
|
---|
1381 | $(MAKE) samhain.pk; \
|
---|
1382 | echo "rm -f samhain; mv samhain.pk samhain"; \
|
---|
1383 | rm -f samhain; mv samhain.pk samhain
|
---|
1384 |
|
---|
1385 | #----------------------------------------------------------
|
---|
1386 | #
|
---|
1387 | # DEPLOY rules
|
---|
1388 | #
|
---|
1389 | #----------------------------------------------------------
|
---|
1390 |
|
---|
1391 | uninstall-deploy:
|
---|
1392 | rm -rf $(mydatadir)/profiles/source
|
---|
1393 | rm -rf $(mydatadir)/profiles/archpkg
|
---|
1394 | rm -rf $(mydatadir)/profiles/libexec
|
---|
1395 | rm -rf $(mydatadir)/profiles/tmp
|
---|
1396 | rm -rf $(mydatadir)/profiles/private
|
---|
1397 | @if test -f $(sbindir)/deploy.sh; then \
|
---|
1398 | old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
|
---|
1399 | if test x"$$old_deploy" = xold; then \
|
---|
1400 | echo "rm -f $(sbindir)/deploy2.sh"; \
|
---|
1401 | rm -f $(sbindir)/deploy2.sh; \
|
---|
1402 | else \
|
---|
1403 | echo "rm -f $(sbindir)/deploy.sh"; \
|
---|
1404 | rm -f $(sbindir)/deploy.sh; \
|
---|
1405 | fi; \
|
---|
1406 | fi
|
---|
1407 |
|
---|
1408 | EXECFILES= comCHECKSRC comDOWNLOAD comBUILD comCLEAN comINSTALL \
|
---|
1409 | funcDIALOG funcEXE funcPRINT funcSETUP funcBUILD funcINSTALL \
|
---|
1410 | funcDB comUNINSTALL \
|
---|
1411 | preinstall postinstall initscript
|
---|
1412 |
|
---|
1413 | # $(mydatadir)/profiles/
|
---|
1414 | # |
|
---|
1415 | # |
|
---|
1416 | # |-- source -------------> (tarballs)
|
---|
1417 | # |
|
---|
1418 | # |-- configs ------------> (default configs)
|
---|
1419 | # |
|
---|
1420 | # |-- archpkg
|
---|
1421 | # | |
|
---|
1422 | # | |-- architecture -> (package, setup script)
|
---|
1423 | # |
|
---|
1424 | # |-- hosts
|
---|
1425 | # | |
|
---|
1426 | # | |-- hostname -----> (config)
|
---|
1427 | # |
|
---|
1428 | # |-- libexec ------------> (scripts)
|
---|
1429 | # |
|
---|
1430 | # |-- private ------------> (gpg key)
|
---|
1431 | # |
|
---|
1432 | # |-- tmp
|
---|
1433 | #
|
---|
1434 | install-deploy: deploy.sh samhain_stealth
|
---|
1435 | @echo "Creating directory tree under $(mydatadir)/profiles/"; \
|
---|
1436 | $(mkinstalldirs) $(sbindir); \
|
---|
1437 | $(mkinstalldirs) $(mydatadir)/profiles/source; \
|
---|
1438 | $(mkinstalldirs) $(mydatadir)/profiles/configs; \
|
---|
1439 | $(mkinstalldirs) $(mydatadir)/profiles/archpkg/debian_i386; \
|
---|
1440 | $(mkinstalldirs) $(mydatadir)/profiles/archpkg/gentoo_i386; \
|
---|
1441 | $(mkinstalldirs) $(mydatadir)/profiles/archpkg/redhat_i386; \
|
---|
1442 | $(mkinstalldirs) $(mydatadir)/profiles/archpkg/linux_i386; \
|
---|
1443 | $(mkinstalldirs) $(mydatadir)/profiles/archpkg/freebsd_i386;\
|
---|
1444 | $(mkinstalldirs) $(mydatadir)/profiles/archpkg/solaris; \
|
---|
1445 | $(mkinstalldirs) $(mydatadir)/profiles/archpkg/aix; \
|
---|
1446 | $(mkinstalldirs) $(mydatadir)/profiles/hosts; \
|
---|
1447 | $(mkinstalldirs) $(mydatadir)/profiles/libexec; \
|
---|
1448 | $(mkinstalldirs) $(mydatadir)/profiles/private; \
|
---|
1449 | $(mkinstalldirs) $(mydatadir)/profiles/tmp; \
|
---|
1450 | if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc; then \
|
---|
1451 | if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz; then \
|
---|
1452 | echo "Installing source tarball"; \
|
---|
1453 | $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc \
|
---|
1454 | $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz.asc; \
|
---|
1455 | $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz \
|
---|
1456 | $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz; \
|
---|
1457 | fi; \
|
---|
1458 | fi; \
|
---|
1459 | echo "Installing default configs"; \
|
---|
1460 | test -f $(mydatadir)/profiles/configs/freebsd_i386.samhainrc || \
|
---|
1461 | $(INSTALL_DATA) $(srcdir)/samhainrc.freebsd \
|
---|
1462 | $(mydatadir)/profiles/configs/freebsd_i386.samhainrc; \
|
---|
1463 | test -f $(mydatadir)/profiles/configs/debian_i386.samhainrc || \
|
---|
1464 | $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
|
---|
1465 | $(mydatadir)/profiles/configs/debian_i386.samhainrc; \
|
---|
1466 | test -f $(mydatadir)/profiles/configs/gentoo_i386.samhainrc || \
|
---|
1467 | $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
|
---|
1468 | $(mydatadir)/profiles/configs/gentoo_i386.samhainrc; \
|
---|
1469 | test -f $(mydatadir)/profiles/configs/redhat_i386.samhainrc || \
|
---|
1470 | $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
|
---|
1471 | $(mydatadir)/profiles/configs/redhat_i386.samhainrc; \
|
---|
1472 | test -f $(mydatadir)/profiles/configs/linux_i386.samhainrc || \
|
---|
1473 | $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
|
---|
1474 | $(mydatadir)/profiles/configs/linux_i386.samhainrc; \
|
---|
1475 | test -f $(mydatadir)/profiles/configs/solaris.samhainrc || \
|
---|
1476 | $(INSTALL_DATA) $(srcdir)/samhainrc.solaris \
|
---|
1477 | $(mydatadir)/profiles/configs/solaris.samhainrc; \
|
---|
1478 | test -f $(mydatadir)/profiles/configs/aix.samhainrc || \
|
---|
1479 | $(INSTALL_DATA) $(srcdir)/samhainrc.aix5.2.0 \
|
---|
1480 | $(mydatadir)/profiles/configs/aix.samhainrc; \
|
---|
1481 | if test -f $(mydatadir)/profiles/configs/generic.configure; then \
|
---|
1482 | :; \
|
---|
1483 | else \
|
---|
1484 | SH_FQDN_SYSTEM=`uname -n`; \
|
---|
1485 | SH_FQDN_DOMAIN=`grep -i domain /etc/resolv.conf |grep -v "\#" |awk '{print $$2}' |head -1`; \
|
---|
1486 | if test -n "$${SH_FQDN_SYSTEM}" -a -n "$${SH_FQDN_DOMAIN}"; then \
|
---|
1487 | sh_thishost="$${SH_FQDN_SYSTEM}.$${SH_FQDN_DOMAIN}"; \
|
---|
1488 | else \
|
---|
1489 | sh_thishost="FQDN_MISSING"; \
|
---|
1490 | fi; \
|
---|
1491 | outfile=$(mydatadir)/profiles/configs/generic.configure; \
|
---|
1492 | echo "'--enable-network=client'" > $$outfile; \
|
---|
1493 | echo "'--with-logserver=$${sh_thishost}'" >> $$outfile; \
|
---|
1494 | echo "'--with-data-file=REQ_FROM_SERVER/var/lib/samhain/samhain_file'" >> $$outfile; \
|
---|
1495 | echo "'--with-config-file=REQ_FROM_SERVER/etc/samhainrc'" >> $$outfile; \
|
---|
1496 | echo "'--enable-base=@mykeybase@'" >> $$outfile; \
|
---|
1497 | fi; \
|
---|
1498 | $(INSTALL_SHELL) $(srcdir)/mkinstalldirs \
|
---|
1499 | $(mydatadir)/profiles/libexec; \
|
---|
1500 | $(INSTALL_SHELL) $(srcdir)/install-sh \
|
---|
1501 | $(mydatadir)/profiles/libexec; \
|
---|
1502 | for ff in $(EXECFILES); do \
|
---|
1503 | test -f $(srcdir)/dsys/$$ff && $(INSTALL_SHELL) $(srcdir)/dsys/$$ff \
|
---|
1504 | $(mydatadir)/profiles/libexec; \
|
---|
1505 | done; \
|
---|
1506 | $(INSTALL_SHELL) samhain_stealth $(mydatadir)/profiles/libexec; \
|
---|
1507 | test -f $(srcdir)/dsys/0F571F6C.asc && $(INSTALL_DATA) $(srcdir)/dsys/0F571F6C.asc \
|
---|
1508 | $(mydatadir)/profiles/private; \
|
---|
1509 | convert +compress $(srcdir)/stealth_template.jpg stealth_template.ps >/dev/null || \
|
---|
1510 | { echo "*"; echo "* 'convert' not found or not working, not installing"; echo "* $(mydatadir)/profiles/private/stealth_template.ps"; echo "* (only required for installing packages built with --enable-stealth)"; echo "*"; }; \
|
---|
1511 | if test -f stealth_template.ps; then \
|
---|
1512 | if test -f $(mydatadir)/profiles/private/stealth_template.ps; then \
|
---|
1513 | :; \
|
---|
1514 | else \
|
---|
1515 | $(INSTALL_DATA) stealth_template.ps $(mydatadir)/profiles/private; \
|
---|
1516 | fi; \
|
---|
1517 | fi; \
|
---|
1518 | if test -f $(sbindir)/deploy.sh; then \
|
---|
1519 | old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
|
---|
1520 | if test x"$$old_deploy" = xold; then \
|
---|
1521 | echo "*"; echo "* Version 1 of deploy.sh found"; echo "*"; \
|
---|
1522 | echo "* Installing $(sbindir)/deploy2.sh"; echo "*"; \
|
---|
1523 | $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy2.sh; \
|
---|
1524 | else \
|
---|
1525 | echo "Installing $(sbindir)/deploy.sh"; \
|
---|
1526 | $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
|
---|
1527 | fi; \
|
---|
1528 | else \
|
---|
1529 | echo "Installing $(sbindir)/deploy.sh"; \
|
---|
1530 | $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
|
---|
1531 | fi
|
---|
1532 |
|
---|
1533 |
|
---|
1534 | #----------------------------------------------------------
|
---|
1535 | #
|
---|
1536 | # DISTRIBUTION rules
|
---|
1537 | #
|
---|
1538 | #----------------------------------------------------------
|
---|
1539 |
|
---|
1540 | distdir = $(PACKAGE)-$(VERSION)
|
---|
1541 | top_distdir = $(distdir)
|
---|
1542 |
|
---|
1543 | # This target untars the dist file and tries a VPATH configuration. Then
|
---|
1544 | # it guarantees that the distribution is self-contained by making another
|
---|
1545 | # tarfile.
|
---|
1546 |
|
---|
1547 | #
|
---|
1548 | # 1) make distribution tarfile
|
---|
1549 | # 2) unpack the tarfile into distdir
|
---|
1550 | # 3) create build and install directories
|
---|
1551 | # 4) do the build in the build dir, with sources from distdir
|
---|
1552 | # 5) check (there are no subdirs, thus does nothing)
|
---|
1553 | # 6) install
|
---|
1554 | # 7) installcheck (equal to check, does nothing)
|
---|
1555 | #
|
---|
1556 | distcheck: dist
|
---|
1557 | -rm -rf $(distdir)
|
---|
1558 | GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
---|
1559 | mkdir $(distdir)/=build
|
---|
1560 | mkdir $(distdir)/=inst
|
---|
1561 | dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
---|
1562 | cd $(distdir)/=build \
|
---|
1563 | && ../configure --srcdir=.. --prefix=$$dc_install_base \
|
---|
1564 | && $(MAKE) \
|
---|
1565 | && $(MAKE) install
|
---|
1566 | -rm -rf $(distdir)
|
---|
1567 | -rm -f $(distdir).tar.gz.asc
|
---|
1568 | @gpg -a --detach-sign $(distdir).tar.gz; \
|
---|
1569 | $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc; \
|
---|
1570 | rm -f $(distdir).tar.gz; \
|
---|
1571 | rm -f $(distdir).tar.gz.asc; \
|
---|
1572 | gzip --best $(distdir).tar
|
---|
1573 | mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
|
---|
1574 | @echo "========================"; \
|
---|
1575 | echo "$(PACKAGE)_signed-$(VERSION).tar.gz is ready for distribution"; \
|
---|
1576 | echo "========================"
|
---|
1577 |
|
---|
1578 | #
|
---|
1579 | # create a tarfile for the distibution
|
---|
1580 | #
|
---|
1581 | distrpm: distdirrpm
|
---|
1582 | -chmod -R a+r $(distdir)
|
---|
1583 | -rm -rf $(distdir).tar.gz
|
---|
1584 | -rm -rf $(distdir).tar
|
---|
1585 | $(TAR) chof $(distdir).tar $(distdir)
|
---|
1586 | gzip -c --best $(distdir).tar > $(distdir).tar.gz
|
---|
1587 | -rm -rf $(distdir)
|
---|
1588 |
|
---|
1589 | dist: distdir
|
---|
1590 | -chmod -R a+r $(distdir)
|
---|
1591 | -rm -rf $(distdir).tar.gz
|
---|
1592 | -rm -rf $(distdir).tar
|
---|
1593 | $(TAR) chof $(distdir).tar $(distdir)
|
---|
1594 | gzip -c --best $(distdir).tar > $(distdir).tar.gz
|
---|
1595 | -rm -rf $(distdir)
|
---|
1596 |
|
---|
1597 | #
|
---|
1598 | # create a tarfile for the distibution
|
---|
1599 | #
|
---|
1600 | dist-sign: distdir
|
---|
1601 | -rm -f $(distdir)/scripts/samhain.ebuild
|
---|
1602 | -rm -f $(distdir)/scripts/samhain.ebuild-light
|
---|
1603 | -chmod -R a+r $(distdir)
|
---|
1604 | -rm -rf $(distdir).tar.gz
|
---|
1605 | -rm -rf $(distdir).tar
|
---|
1606 | $(TAR) chof $(distdir).tar $(distdir)
|
---|
1607 | gzip --best $(distdir).tar
|
---|
1608 | -rm -rf $(distdir)
|
---|
1609 | -rm -f $(distdir).tar.gz.asc
|
---|
1610 | gpg -a --detach-sign $(distdir).tar.gz
|
---|
1611 | $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc
|
---|
1612 | -rm -f $(distdir).tar.gz
|
---|
1613 | -rm -f $(distdir).tar.gz.asc
|
---|
1614 | gzip --best $(distdir).tar
|
---|
1615 | mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
|
---|
1616 |
|
---|
1617 |
|
---|
1618 | #
|
---|
1619 | # same as dist
|
---|
1620 | #
|
---|
1621 | dist-all: distdir
|
---|
1622 | -chmod -R a+r $(distdir)
|
---|
1623 | GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
---|
1624 | -rm -rf $(distdir)
|
---|
1625 |
|
---|
1626 | #
|
---|
1627 | # create distribution directory and copy files into it
|
---|
1628 | #
|
---|
1629 | INITFILES=samhain.startIRIX samhain.startFreeBSD samhain.startSolaris \
|
---|
1630 | samhain.startLSB samhain.startGentoo samhain.startLinux samhain.startHPUX \
|
---|
1631 | samhain.startIRIX samhain.startMACOSX
|
---|
1632 |
|
---|
1633 | SCRIPTFILES=redhat_i386.client.spec check_samhain.pl samhainadmin.pl
|
---|
1634 |
|
---|
1635 | distdir: distfilecheck
|
---|
1636 | -rm -f $(top_srcdir)/init/*~
|
---|
1637 | -rm -f $(top_srcdir)/dsys/*~
|
---|
1638 | -rm -f $(top_srcdir)/docs/*~
|
---|
1639 | -rm -f $(top_srcdir)/include/*~
|
---|
1640 | -rm -f $(top_srcdir)/src/*~
|
---|
1641 | -rm -f $(top_srcdir)/test/*~
|
---|
1642 | -rm -f $(top_srcdir)/scripts/*~
|
---|
1643 | (cd $(top_srcdir)/init && rm -f $(INITFILES))
|
---|
1644 | (cd $(top_srcdir)/scripts && rm -f $(SCRIPTFILES))
|
---|
1645 | -rm -rf $(distdir)
|
---|
1646 | mkdir $(distdir)
|
---|
1647 | -chmod 777 $(distdir)
|
---|
1648 | @for file in $(DISTFILES); do \
|
---|
1649 | d=$(top_srcdir); \
|
---|
1650 | if test -f $$d/$$file || test -d $$d/$$file; then \
|
---|
1651 | cp -pr $$d/$$file $(distdir)/$$file; \
|
---|
1652 | fi; \
|
---|
1653 | done; \
|
---|
1654 | cp scripts/samhain.spec $(distdir)/samhain.spec; \
|
---|
1655 | rm -f $(distdir)/scripts/*.spec
|
---|
1656 |
|
---|
1657 | #
|
---|
1658 | # as distdir, but don't copy spec file from scripts
|
---|
1659 | #
|
---|
1660 | distdirrpm: distfilecheck
|
---|
1661 | -rm -rf $(distdir)
|
---|
1662 | mkdir $(distdir)
|
---|
1663 | -chmod 777 $(distdir)
|
---|
1664 | @if test -f ./samhain.spec; then \
|
---|
1665 | :; \
|
---|
1666 | else \
|
---|
1667 | echo "Error: ./samhain.spec not found, please run configure"; \
|
---|
1668 | exit 1; \
|
---|
1669 | fi
|
---|
1670 | @cp -p samhain.spec $(distdir)/samhain.spec; \
|
---|
1671 | for file in $(DISTFILES); do \
|
---|
1672 | d=$(top_srcdir); \
|
---|
1673 | if test -f $$d/$$file || test -d $$d/$$file; then \
|
---|
1674 | if test x"$$file" = "xsamhain.spec"; then \
|
---|
1675 | :; \
|
---|
1676 | else \
|
---|
1677 | cp -pr $$d/$$file $(distdir)/$$file; \
|
---|
1678 | fi; \
|
---|
1679 | fi; \
|
---|
1680 | done; \
|
---|
1681 | rm -f $(distdir)/scripts/*.spec
|
---|
1682 |
|
---|
1683 |
|
---|
1684 | distfilecheck: $(top_srcdir)/config.h.in $(top_srcdir)/depend.sum
|
---|
1685 | @for file in $(DISTFILES); do \
|
---|
1686 | d=$(top_srcdir); \
|
---|
1687 | if test -f $$d/$$file || test -d $$d/$$file; then \
|
---|
1688 | : \
|
---|
1689 | else \
|
---|
1690 | echo "File not found: $$d/$$file"; \
|
---|
1691 | fi; \
|
---|
1692 | done
|
---|
1693 | @for file in $(SOURCES); do \
|
---|
1694 | if test -f $$file; then \
|
---|
1695 | : \
|
---|
1696 | else \
|
---|
1697 | echo "File not found: $$file"; \
|
---|
1698 | fi; \
|
---|
1699 | done
|
---|
1700 |
|
---|
1701 |
|
---|
1702 | # DO NOT DELETE THIS LINE
|
---|
1703 |
|
---|
1704 |
|
---|
1705 | samhain.o: $(srcsrc)/samhain.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_files.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_getopt.h $(srcinc)/sh_readconf.h $(srcinc)/sh_hash.h $(srcinc)/sh_restrict.h $(srcinc)/sh_nmail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_gpg.h $(srcinc)/sh_mem.h $(srcinc)/sh_forward.h $(srcinc)/sh_tools.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h $(srcinc)/sh_ignore.h $(srcinc)/sh_prelink.h sh_MK.h $(srcinc)/sh_schedule.h
|
---|
1706 | sh_unix.o: $(srcsrc)/sh_unix.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_hash.h $(srcinc)/sh_tools.h $(srcinc)/sh_restrict.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_tiger.h $(srcinc)/sh_prelink.h $(srcinc)/sh_pthread.h $(srcinc)/sh_static.h $(srcinc)/sh_prelude.h $(srcinc)/zAVLTree.h $(srcinc)/sh_ignore.h
|
---|
1707 | sh_utils.o: $(srcsrc)/sh_utils.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_entropy.h $(srcinc)/sh_pthread.h
|
---|
1708 | sh_error.o: $(srcsrc)/sh_error.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_database.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_nmail.h $(srcinc)/sh_forward.h $(srcinc)/sh_prelude.h $(srcinc)/sh_pthread.h $(srcinc)/sh_tools.h $(srcinc)/sh_extern.h
|
---|
1709 | sh_files.o: $(srcsrc)/sh_files.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_tiger.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/zAVLTree.h $(srcinc)/CuTest.h
|
---|
1710 | sh_getopt.o: $(srcsrc)/sh_getopt.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_getopt.h $(srcinc)/sh_files.h $(srcinc)/sh_utils.h $(srcinc)/sh_mail.h $(srcinc)/sh_forward.h $(srcinc)/sh_hash.h $(srcinc)/sh_extern.h
|
---|
1711 | sh_readconf.o: $(srcsrc)/sh_readconf.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_files.h $(srcinc)/sh_forward.h $(srcinc)/sh_gpg.h $(srcinc)/sh_hash.h $(srcinc)/sh_ignore.h $(srcinc)/sh_database.h $(srcinc)/sh_mail.h $(srcinc)/sh_modules.h $(srcinc)/sh_nmail.h $(srcinc)/sh_prelink.h $(srcinc)/sh_prelude.h $(srcinc)/sh_tiger.h $(srcinc)/sh_tools.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h
|
---|
1712 | sh_tiger0.o: $(srcsrc)/sh_tiger0.c Makefile config_xor.h $(srcinc)/sh_tiger.h $(srcinc)/sh_unix.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_pthread.h $(srcinc)/sh_string.h
|
---|
1713 | sh_tiger1.o: $(srcsrc)/sh_tiger1.c Makefile config_xor.h
|
---|
1714 | sh_tiger2.o: $(srcsrc)/sh_tiger2.c Makefile config_xor.h
|
---|
1715 | sh_tiger1_64.o: $(srcsrc)/sh_tiger1_64.c Makefile config_xor.h
|
---|
1716 | sh_tiger2_64.o: $(srcsrc)/sh_tiger2_64.c Makefile config_xor.h
|
---|
1717 | sh_hash.o: $(srcsrc)/sh_hash.c Makefile config_xor.h $(srcinc)/sh_hash.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_gpg.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_ignore.h $(srcinc)/sh_pthread.h $(srcinc)/sh_forward.h $(srcinc)/sh_hash.h
|
---|
1718 | sh_mail.o: $(srcsrc)/sh_mail.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mail.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_pthread.h $(srcinc)/sh_filter.h $(srcinc)/sh_mail_int.h $(srcinc)/sh_nmail.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_static.h $(srcinc)/sh_tools.h
|
---|
1719 | sh_mem.o: $(srcsrc)/sh_mem.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_pthread.h
|
---|
1720 | sh_entropy.o: $(srcsrc)/sh_entropy.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
|
---|
1721 | sh_forward.o: $(srcsrc)/sh_forward.c Makefile config_xor.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_forward.h $(srcinc)/sh_srp.h $(srcinc)/sh_fifo.h $(srcinc)/sh_tools.h $(srcinc)/sh_entropy.h $(srcinc)/sh_html.h $(srcinc)/sh_nmail.h $(srcinc)/sh_socket.h $(srcinc)/sh_static.h $(srcinc)/rijndael-api-fst.h $(srcinc)/sh_readconf.h $(srcinc)/zAVLTree.h $(srcinc)/sh_extern.h
|
---|
1722 | sh_modules.o: $(srcsrc)/sh_modules.c Makefile config_xor.h $(srcinc)/sh_modules.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utmp.h $(srcinc)/sh_mounts.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_kern.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_portcheck.h $(srcinc)/sh_logmon.h $(srcinc)/sh_registry.h
|
---|
1723 | sh_utmp.o: $(srcsrc)/sh_utmp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_utmp.h $(srcinc)/sh_pthread.h $(srcinc)/sh_inotify.h
|
---|
1724 | sh_kern.o: $(srcsrc)/sh_kern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_kern.h sh_ks_xor.h $(srcinc)/sh_unix.h $(srcinc)/sh_hash.h
|
---|
1725 | sh_suidchk.o: $(srcsrc)/sh_suidchk.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_suidchk.h $(srcinc)/sh_hash.h $(srcinc)/sh_unix.h $(srcinc)/sh_files.h $(srcinc)/sh_schedule.h $(srcinc)/sh_calls.h
|
---|
1726 | sh_srp.o: $(srcsrc)/sh_srp.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_mem.h $(srcinc)/sh_utils.h $(srcinc)/sh_srp.h $(srcinc)/bignum.h $(srcinc)/CuTest.h
|
---|
1727 | sh_fifo.o: $(srcsrc)/sh_fifo.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_fifo.h
|
---|
1728 | sh_tools.o: $(srcsrc)/sh_tools.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h $(srcinc)/sh_tools.h $(srcinc)/sh_utils.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/rijndael-api-fst.h $(srcinc)/rijndael-api-fst.h
|
---|
1729 | sh_html.o: $(srcsrc)/sh_html.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_forward.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_utils.h $(srcinc)/sh_html.h $(srcinc)/zAVLTree.h
|
---|
1730 | sh_gpg.o: $(srcsrc)/sh_gpg.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h
|
---|
1731 | sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h
|
---|
1732 | sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_calls.h $(srcinc)/sh_ipvx.h
|
---|
1733 | sh_extern.o: $(srcsrc)/sh_extern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_filter.h $(srcinc)/sh_static.h
|
---|
1734 | sh_database.o: $(srcsrc)/sh_database.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h
|
---|
1735 | sh_err_log.o: $(srcsrc)/sh_err_log.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h $(srcinc)/sh_tiger.h
|
---|
1736 | sh_err_console.o: $(srcsrc)/sh_err_console.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h
|
---|
1737 | sh_err_syslog.o: $(srcsrc)/sh_err_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h
|
---|
1738 | sh_schedule.o: $(srcsrc)/sh_schedule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_schedule.h
|
---|
1739 | bignum.o: $(srcsrc)/bignum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/bignum.h
|
---|
1740 | mkhdr.o: $(srcsrc)/mkhdr.c Makefile config.h
|
---|
1741 | samhain_setpwd.o: $(srcsrc)/samhain_setpwd.c Makefile config_xor.h
|
---|
1742 | samhain_stealth.o: $(srcsrc)/samhain_stealth.c Makefile config_xor.h
|
---|
1743 | encode.o: $(srcsrc)/encode.c Makefile
|
---|
1744 | sstrip.o: $(srcsrc)/sstrip.c Makefile config.h
|
---|
1745 | trustfile.o: $(srcsrc)/trustfile.c Makefile config_xor.h $(srcinc)/sh_calls.h $(srcinc)/slib.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h
|
---|
1746 | exepack.o: $(srcsrc)/exepack.c Makefile config.h $(srcinc)/minilzo.h $(srcinc)/exepack.data
|
---|
1747 | exepack_fill.o: $(srcsrc)/exepack_fill.c Makefile config.h config.h $(srcinc)/minilzo.h
|
---|
1748 | exepack_mkdata.o: $(srcsrc)/exepack_mkdata.c Makefile config.h $(srcinc)/minilzo.h
|
---|
1749 | minilzo.o: $(srcsrc)/minilzo.c Makefile $(srcinc)/minilzo.h
|
---|
1750 | slib.o: $(srcsrc)/slib.c Makefile config_xor.h $(srcinc)/slib.h $(srcinc)/sh_calls.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_string.h $(srcinc)/sh_mem.h
|
---|
1751 | rijndael-alg-fst.o: $(srcsrc)/rijndael-alg-fst.c Makefile config_xor.h $(srcinc)/rijndael-alg-fst.h $(srcinc)/rijndael-boxes-fst.h
|
---|
1752 | rijndael-api-fst.o: $(srcsrc)/rijndael-api-fst.c Makefile config_xor.h $(srcinc)/rijndael-api-fst.h
|
---|
1753 | zAVLTree.o: $(srcsrc)/zAVLTree.c Makefile $(srcinc)/zAVLTree.h
|
---|
1754 | sh_socket.o: $(srcsrc)/sh_socket.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_socket.h $(srcinc)/sh_error.h $(srcinc)/sh_unix.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/zAVLTree.h $(srcinc)/sh_html.h $(srcinc)/sh_tools.h
|
---|
1755 | sh_ignore.o: $(srcsrc)/sh_ignore.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h
|
---|
1756 | yulectl.o: $(srcsrc)/yulectl.c Makefile config_xor.h
|
---|
1757 | sh_mounts.o: $(srcsrc)/sh_mounts.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_modules.h $(srcinc)/sh_mounts.h
|
---|
1758 | sh_userfiles.o: $(srcsrc)/sh_userfiles.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_userfiles.h $(srcinc)/sh_utils.h $(srcinc)/sh_schedule.h $(srcinc)/sh_error.h $(srcinc)/sh_hash.h $(srcinc)/sh_files.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h
|
---|
1759 | sh_prelude.o: $(srcsrc)/sh_prelude.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error_min.h $(srcinc)/sh_prelude.h $(srcinc)/sh_static.h
|
---|
1760 | kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
|
---|
1761 | sh_prelink.o: $(srcsrc)/sh_prelink.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h
|
---|
1762 | sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h $(srcinc)/sh_pthread.h
|
---|
1763 | sh_async.o: $(srcsrc)/sh_async.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h
|
---|
1764 | sh_processcheck.o: $(srcsrc)/sh_processcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_modules.h $(srcinc)/sh_processcheck.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_pthread.h $(srcinc)/CuTest.h
|
---|
1765 | sh_portcheck.o: $(srcsrc)/sh_portcheck.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_mem.h $(srcinc)/sh_calls.h $(srcinc)/sh_utils.h $(srcinc)/sh_modules.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/CuTest.h
|
---|
1766 | sh_pthread.o: $(srcsrc)/sh_pthread.c Makefile config_xor.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_modules.h
|
---|
1767 | sh_string.o: $(srcsrc)/sh_string.c Makefile config_xor.h $(srcinc)/sh_string.h $(srcinc)/sh_mem.h $(srcinc)/CuTest.h
|
---|
1768 | dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h
|
---|
1769 | t-test1.o: $(srcsrc)/t-test1.c Makefile config.h $(srcinc)/malloc.h
|
---|
1770 | sh_port2proc.o: $(srcsrc)/sh_port2proc.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error_min.h $(srcinc)/sh_pthread.h $(srcinc)/sh_ipvx.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_ipvx.h
|
---|
1771 | sh_log_parse_syslog.o: $(srcsrc)/sh_log_parse_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
|
---|
1772 | sh_log_parse_pacct.o: $(srcsrc)/sh_log_parse_pacct.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
|
---|
1773 | sh_log_parse_apache.o: $(srcsrc)/sh_log_parse_apache.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h
|
---|
1774 | sh_log_evalrule.o: $(srcsrc)/sh_log_evalrule.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_log_correlate.h $(srcinc)/sh_log_mark.h $(srcinc)/sh_log_repeat.h $(srcinc)/zAVLTree.h
|
---|
1775 | sh_log_check.o: $(srcsrc)/sh_log_check.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/sh_log_correlate.h $(srcinc)/sh_log_mark.h $(srcinc)/sh_log_repeat.h $(srcinc)/sh_extern.h $(srcinc)/sh_modules.h
|
---|
1776 | sh_log_parse_samba.o: $(srcsrc)/sh_log_parse_samba.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_log_check.h $(srcinc)/sh_string.h
|
---|
1777 | sh_nmail.o: $(srcsrc)/sh_nmail.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_mem.h $(srcinc)/sh_mail.h $(srcinc)/sh_tiger.h $(srcinc)/sh_string.h $(srcinc)/sh_utils.h $(srcinc)/sh_fifo.h $(srcinc)/sh_filter.h $(srcinc)/sh_mail_int.h $(srcinc)/zAVLTree.h
|
---|
1778 | sh_filter.o: $(srcsrc)/sh_filter.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_mem.h $(srcinc)/sh_filter.h
|
---|
1779 | sh_inotify.o: $(srcsrc)/sh_inotify.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_inotify.h $(srcinc)/sh_mem.h $(srcinc)/slib.h $(srcinc)/sh_calls.h $(srcinc)/sh_inotify.h
|
---|
1780 | sh_log_correlate.o: $(srcsrc)/sh_log_correlate.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h
|
---|
1781 | sh_log_mark.o: $(srcsrc)/sh_log_mark.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_mem.h $(srcinc)/sh_string.h $(srcinc)/sh_error_min.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h $(srcinc)/zAVLTree.h
|
---|
1782 | sh_log_repeat.o: $(srcsrc)/sh_log_repeat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_string.h $(srcinc)/sh_log_check.h $(srcinc)/sh_log_evalrule.h
|
---|
1783 | sh_log_parse_generic.o: $(srcsrc)/sh_log_parse_generic.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_log_check.h $(srcinc)/sh_string.h
|
---|
1784 | sh_login_track.o: $(srcsrc)/sh_login_track.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_string.h $(srcinc)/sh_tools.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_error_min.h $(srcinc)/CuTest.h $(srcinc)/CuTest.h
|
---|
1785 | sh_audit.o: $(srcsrc)/sh_audit.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_extern.h $(srcinc)/sh_utils.h
|
---|
1786 | sh_registry.o: $(srcsrc)/sh_registry.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_modules.h $(srcinc)/sh_hash.h $(srcinc)/sh_tiger.h
|
---|
1787 | sh_ipvx.o: $(srcsrc)/sh_ipvx.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h $(srcinc)/sh_utils.h $(srcinc)/sh_ipvx.h
|
---|
1788 | sh_restrict.o: $(srcsrc)/sh_restrict.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error_min.h $(srcinc)/sh_string.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h $(srcinc)/CuTest.h
|
---|
1789 | sh_filetype.o: $(srcsrc)/sh_filetype.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error_min.h $(srcinc)/sh_utils.h
|
---|