source: trunk/Makefile.in@ 484

Last change on this file since 484 was 481, checked in by katerina, 9 years ago

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

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