source: trunk/Makefile.in@ 533

Last change on this file since 533 was 532, checked in by katerina, 7 years ago

Fix for ticket #426 (SLES12 spec file). Also fixes yule RPM and RPMTOPDIR detection.

File size: 77.4 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 @if test -d $(DESTDIR)$(mydatadir); then \
581 :; \
582 else \
583 $(mkinstalldirs) $(DESTDIR)$(mydatadir); \
584 chmod 755 $(DESTDIR)$(mydatadir); \
585 fi
586 @if test -f samhainrc.$(selectconfig); then \
587 :; \
588 else \
589 if test -f $(srcdir)/samhainrc.$(selectconfig); then \
590 cp $(srcdir)/samhainrc.$(selectconfig) . ; \
591 fi; \
592 fi; \
593 if test -f yulerc; then \
594 :; \
595 else \
596 if test -f $(srcdir)/yulerc.template; then \
597 cp $(srcdir)/yulerc.template yulerc; \
598 fi; \
599 fi; \
600 if test -f stealth_template.jpg; then \
601 :; \
602 else \
603 if test -f $(srcdir)/stealth_template.jpg; then \
604 cp $(srcdir)/stealth_template.jpg . ; \
605 fi; \
606 fi
607 @if test -d /etc/logrotate.d; then \
608 if test ! -d $(DESTDIR)/etc/logrotate.d; then \
609 $(mkinstalldirs) $(DESTDIR)/etc/logrotate.d; \
610 fi; \
611 if test ! -f $(DESTDIR)/etc/logrotate.d/@install_name@; then \
612 if test -w $(DESTDIR)/etc/logrotate.d; then \
613 cp $(srcdir)/scripts/logrotate $(DESTDIR)/etc/logrotate.d/@install_name@; \
614 else \
615 echo "$(DESTDIR)/etc/logrotate.d not writable"; \
616 fi; \
617 else \
618 echo "$(DESTDIR)/etc/logrotate.d/@install_name@ exists, not overwriting"; \
619 fi; \
620 fi
621 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-data"; \
622 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose install-data || \
623 echo " ERROR: Failed to install the configuration file to $(DESTDIR)$(configfile). You need to install the configuration file manually."
624 @if test x"$(VFLAG)" = "x-DSH_WITH_SERVER"; then \
625 echo;\
626 echo " -----------------------------------------------------";\
627 echo " The server will run as user @myident@ if started with";\
628 echo " root privileges, otherwise as the user of the parent ";\
629 echo " process (use --enable-identity=USER to change).";\
630 echo;\
631 echo " You may want to use: make install-user";\
632 echo;\
633 echo " - to add the user @myident@ (if not existing already)";\
634 echo " - to chown the data directory $(mydatadir)";\
635 echo " - to chown the log file directory $(mylogdir)";\
636 echo " - to chown the configuration file $(configfile)";\
637 echo " -----------------------------------------------------";\
638 else \
639 if test "x@need_user_install@" = x1; then \
640 echo;\
641 echo " -----------------------------------------------------";\
642 echo " You may want to use: make install-user";\
643 echo;\
644 echo " - to add the user @myident@ (if not existing already)";\
645 echo " -----------------------------------------------------";\
646 fi; \
647 fi
648
649uninstall-data:
650 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-data"; \
651 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-data
652
653#
654# -- man files
655#
656
657install-man:
658 $(mkinstalldirs) $(DESTDIR)$(mandir)/man8
659 $(mkinstalldirs) $(DESTDIR)$(mandir)/man5
660 @if test -f $(top_srcdir)/man/samhain.8 ; then \
661 echo " $(INSTALL_MAN) $(top_srcdir)/man/samhain.8 $(DESTDIR)$(mandir)/man8/@install_name@.8"; \
662 $(INSTALL_MAN) $(top_srcdir)/man/samhain.8 $(DESTDIR)$(mandir)/man8/@install_name@.8; \
663 fi
664 @if test -f $(top_srcdir)/man/samhainrc.5 ; then \
665 echo " $(INSTALL_MAN) $(top_srcdir)/man/samhainrc.5 $(DESTDIR)$(mandir)/man5/@install_name@rc.5"; \
666 $(INSTALL_MAN) $(top_srcdir)/man/samhainrc.5 $(DESTDIR)$(mandir)/man5/@install_name@rc.5; \
667 fi
668
669uninstall-man:
670 @echo "./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-man";\
671 ./samhain-install.sh --destdir=$(DESTDIR) --express --verbose uninstall-man
672
673
674#----------------------------------------------------------
675#
676# BUILD rules
677#
678#----------------------------------------------------------
679
680run: run-light
681
682run-light: all
683 @echo "Building $(PACKAGE)-$(VERSION).run"; \
684 STAGE=$(PACKAGE)-$(VERSION); \
685 mkdir $$STAGE; \
686 if test x"$$?" != x0; then \
687 echo "ERROR ... mkdir $$STAGE failed"; \
688 exit 1; \
689 fi; \
690 $(MAKE) DESTDIR=$$STAGE install-light; \
691 rm -f $$STAGE/@sbindir@/@install_name@_stealth; \
692 echo "#! /bin/sh" > $$STAGE/setup.sh; \
693 if test x$(mytmpdir) != x; then \
694 echo "./mkinstalldirs @mytmpdir@ || exit 1" >> $$STAGE/setup.sh; \
695 fi; \
696 echo "./mkinstalldirs @sbindir@ || exit 1" >> $$STAGE/setup.sh; \
697 echo "./mkinstalldirs @sysconfdir@ || exit 1" >> $$STAGE/setup.sh; \
698 echo "./mkinstalldirs @mylockdir@ || exit 1" >> $$STAGE/setup.sh; \
699 echo "./mkinstalldirs @mylogdir@ || exit 1" >> $$STAGE/setup.sh; \
700 echo "./mkinstalldirs @mydataroot@ || exit 1" >> $$STAGE/setup.sh; \
701 echo "chmod 700 @mydataroot@ || exit 1" >> $$STAGE/setup.sh; \
702 temp=`echo $(sbindir) | sed s,^/,,`; \
703 echo "chown root $$temp/*" >> $$STAGE/setup.sh; \
704 echo "cp -p $$temp/* $(sbindir) || exit 1" >> $$STAGE/setup.sh; \
705 temp=`echo $(sysconfdir) | sed s,^/,,`; \
706 echo "chown root $$temp/*" >> $$STAGE/setup.sh; \
707 configfile=`echo @myconffile@ | sed 's%^REQ_FROM_SERVER%%'`; \
708 echo "test -f $$configfile || cp -p $$temp/* $$configfile" >> $$STAGE/setup.sh; \
709 echo "./samhain-install.sh --express --verbose install-boot || echo 'Cannot install init script'" >> $$STAGE/setup.sh; \
710 cp $(top_srcdir)/mkinstalldirs $$STAGE/; \
711 cp $(top_srcdir)/install-sh $$STAGE/; \
712 cp ./samhain-install.sh $$STAGE/; \
713 cp -r init/ $$STAGE/; \
714 chmod +x $$STAGE/setup.sh; \
715 chmod +x $$STAGE/samhain-install.sh; \
716 chmod +x $$STAGE/mkinstalldirs; \
717 chmod +x $$STAGE/install-sh; \
718 $(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 && \
719 rm -r $(PACKAGE)-$(VERSION)
720
721emerge-prepare: dist
722 @echo "Building $(PACKAGE)-$(VERSION)"; \
723 test -f /etc/make.globals && . /etc/make.globals; \
724 test -f /etc/make.conf && . /etc/make.conf; \
725 echo "$(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz"; \
726 $(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz; \
727 if test "x$${PORTDIR_OVERLAY}" = "x"; then \
728 COPY_TO="$${PORTDIR}"; \
729 else \
730 COPY_TO="$${PORTDIR_OVERLAY}"; \
731 fi; \
732 $(mkinstalldirs) $${COPY_TO}/app-admin/@install_name@; \
733 echo "$(INSTALL_MAN) scripts/samhain.ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild";\
734 $(INSTALL_MAN) scripts/samhain.ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild; \
735 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);\
736 ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild digest;
737
738emerge-prepare-light: dist
739 @echo "Building $(PACKAGE)-$(VERSION)"; \
740 test -f /etc/make.globals && . /etc/make.globals; \
741 test -f /etc/make.conf && . /etc/make.conf; \
742 echo "$(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz"; \
743 $(INSTALL_MAN) $(PACKAGE)-$(VERSION).tar.gz $${DISTDIR}/@install_name@-$(VERSION).tar.gz; \
744 if test "x$${PORTDIR_OVERLAY}" = "x"; then \
745 COPY_TO="$${PORTDIR}"; \
746 else \
747 COPY_TO="$${PORTDIR_OVERLAY}"; \
748 fi; \
749 $(mkinstalldirs) $${COPY_TO}/app-admin/@install_name@; \
750 echo "$(INSTALL_MAN) scripts/samhain.ebuild-light $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild";\
751 $(INSTALL_MAN) scripts/samhain.ebuild-light $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild; \
752 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);\
753 ebuild $${COPY_TO}/app-admin/@install_name@/@install_name@-$(VERSION).ebuild digest;
754
755
756tbz2: emerge-prepare
757 @emerge --buildpkgonly @install_name@; \
758 test -f /etc/make.globals && . /etc/make.globals; \
759 test -f /etc/make.conf && . /etc/make.conf; \
760 echo; \
761 echo "@install_name@-$(VERSION).tbz2 should be in $${PKGDIR}/All"; \
762 if test -f $${PKGDIR}/All/@install_name@-$(VERSION).tbz2; then \
763 echo "Package $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 built."; \
764 mv $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 $(PACKAGE)-$(VERSION).tbz2; \
765 rm -f $${PKGDIR}/app-admin/@install_name@-$(VERSION).tbz2; \
766 rm -rf $${PORTAGE_TMPDIR}/portage/@install_name@-$(VERSION); \
767 else \
768 echo "Error ... cannot find package."; \
769 exit 1; \
770 fi; \
771 echo
772
773tbz2-light: emerge-prepare-light
774 @emerge --buildpkgonly @install_name@; \
775 test -f /etc/make.globals && . /etc/make.globals; \
776 test -f /etc/make.conf && . /etc/make.conf; \
777 echo; \
778 if test -f $${PKGDIR}/All/@install_name@-$(VERSION).tbz2; then \
779 echo "Package $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 built."; \
780 mv $${PKGDIR}/All/@install_name@-$(VERSION).tbz2 $(PACKAGE)-$(VERSION).tbz2; \
781 rm -f $${PKGDIR}/app-admin/@install_name@-$(VERSION).tbz2; \
782 rm -rf $${PORTAGE_TMPDIR}/portage/@install_name@-$(VERSION); \
783 else \
784 echo "Error ... cannot find package."; \
785 exit 1; \
786 fi; \
787 echo
788
789emerge:
790 emerge $(PACKAGE);
791
792deb-light:
793 @echo "creating subdirectory debian"; \
794 mkdir -p debian; \
795 cp rules.deb-light debian/rules; \
796 chmod +x debian/rules; \
797 echo $(sbindir) | sed s,^/,, > debian/dirs; \
798 if test x$(mytmpdir) != x; then \
799 echo $(mytmpdir) | sed s,^/,, >> debian/dirs; \
800 fi; \
801 echo $(sysconfdir) | sed s,^/,, >> debian/dirs; \
802 echo etc/init.d >> debian/dirs; \
803 echo $(mydatadir) | sed s,^/,, >> debian/dirs; \
804 echo $(mylogdir) | sed s,^/,, >> debian/dirs; \
805 echo $(mylockdir) | sed s,^/,, >> debian/dirs; \
806 $(MAKE) deb-run
807
808deb:
809 @echo "creating subdirectory debian"; \
810 mkdir -p debian; \
811 cp rules.deb debian/rules; \
812 chmod +x debian/rules; \
813 echo $(sbindir) | sed s,^/,, > debian/dirs; \
814 if test x$(mytmpdir) != x; then \
815 echo $(mytmpdir) | sed s,^/,, >> debian/dirs; \
816 fi; \
817 echo $(sysconfdir) | sed s,^/,, >> debian/dirs; \
818 echo etc/init.d >> debian/dirs; \
819 echo $(mydatadir) | sed s,^/,, >> debian/dirs; \
820 echo $(mylogdir) | sed s,^/,, >> debian/dirs; \
821 echo $(mylockdir) | sed s,^/,, >> debian/dirs; \
822 echo $(mandir)/man5 | sed s,^/,, >> debian/dirs; \
823 echo $(mandir)/man8 | sed s,^/,, >> debian/dirs; \
824 echo usr/share/doc/$(PACKAGE) >> debian/dirs; \
825 echo $(top_srcdir)/README > debian/docs; \
826 echo $(top_srcdir)/test/testtiger.txt >> debian/docs; \
827 echo $(srcsrc)/simple-bignum.tar.bz2 >> debian/docs; \
828 echo $(top_srcdir)/scripts/head.html >> debian/docs; \
829 echo $(top_srcdir)/scripts/foot.html >> debian/docs; \
830 echo $(top_srcdir)/samhain.jpg >> debian/docs; \
831 echo $(top_srcdir)/docs/BUGS >> debian/docs; \
832 echo $(top_srcdir)/docs/HOWTO-client+server.html >> debian/docs; \
833 echo $(top_srcdir)/docs/HOWTO-samhain+GnuPG.html >> debian/docs; \
834 echo $(top_srcdir)/docs/MANUAL-2_4.html.tar >> debian/docs; \
835 echo $(top_srcdir)/docs/MANUAL-2_4.pdf >> debian/docs; \
836 echo $(top_srcdir)/docs/README.gcc_bug >> debian/docs; \
837 echo $(top_srcdir)/docs/README.LZO >> debian/docs; \
838 echo $(top_srcdir)/docs/README.sstrip >> debian/docs; \
839 echo $(top_srcdir)/docs/README.UPGRADE >> debian/docs; \
840 echo $(top_srcdir)/docs/README.win2K >> debian/docs; \
841 $(MAKE) deb-run
842
843deb-run:
844 @maintainer=`gpg --list-secret-keys | grep 'uid ' | cut -d" " -f 5- | sed 's/^ *//' | sed q1`;\
845 if test "x$$maintainer" = x; then \
846 maintainer="$(DEFAULT_MAINTAINER)"; \
847 fi; \
848 codename=`lsb_release -a 2>/dev/null | grep Codename | cut -f 2`; \
849 if test "x$$codename" = x; then \
850 codename="stable"; \
851 fi; \
852 echo "$(PACKAGE) ($(VERSION)-$(BUILD_NUM)) $$codename; urgency=low" > debian/changelog; \
853 echo >> debian/changelog; \
854 echo " * Initial release." >> debian/changelog; \
855 echo >> debian/changelog; \
856 echo " -- $$maintainer `date -R`" >> debian/changelog; \
857 echo >> debian/changelog; \
858 echo "Local variables:" >> debian/changelog; \
859 echo "mode: debian-changelog" >> debian/changelog; \
860 echo "End:" >> debian/changelog; \
861 cp $(top_srcdir)/COPYING debian/copyright; \
862 echo "9" > debian/compat; \
863 echo "Nothing to see here." > debian/README.debian; \
864 echo "Document: @install_name@-manual" > debian/@install_name@.doc-base; \
865 echo "Title: @install_name@ Manual" >> debian/@install_name@.doc-base; \
866 echo "Author: Rainer Wichmann" >> debian/@install_name@.doc-base; \
867 echo "Abstract: This manual describes what @install_name@ is" >> debian/@install_name@.doc-base; \
868 echo " and how it can be used to check the file integrity of your" >> debian/@install_name@.doc-base; \
869 echo " server." >> debian/@install_name@.doc-base; \
870 echo "Section: System/Security" >> debian/@install_name@.doc-base; \
871 echo >> debian/@install_name@.doc-base; \
872 echo >> debian/@install_name@.doc-base; \
873 echo "Format: Postscript" >> debian/@install_name@.doc-base; \
874 echo "Files: /usr/share/doc/@install_name@/manual.pdf.gz" >> debian/@install_name@.doc-base; \
875 echo >> debian/@install_name@.doc-base; \
876 echo "Format: HTML" >> debian/@install_name@.doc-base; \
877 echo "Index: /usr/share/doc/@install_name@/manual.html/index.html" >> debian/@install_name@.doc-base; \
878 echo "Files: /usr/share/doc/@install_name@/manual.html/*.html" >> debian/@install_name@.doc-base; \
879 if test -f /usr/lib/lsb/install_initd; then \
880 cp init/samhain.startLSB debian/@install_name@.init; \
881 else \
882 cp init/samhain.startLinux debian/@install_name@.init; \
883 fi; \
884 echo "Source: samhain" > debian/control; \
885 echo "Section: admin" >> debian/control; \
886 echo "Priority: optional" >> debian/control; \
887 echo "Maintainer: $$maintainer" >> debian/control; \
888 echo "Standards-Version: 3.2.1" >> debian/control; \
889 echo >> debian/control; \
890 echo "Package: @install_name@" >> debian/control; \
891 echo "Architecture: any" >> debian/control; \
892 echo "Depends: \$${shlibs:Depends}, \$${misc:Depends}" >> debian/control; \
893 echo "Description: File integrity checker" >> debian/control; \
894 echo " A file integrity checker" >> debian/control; \
895 echo "running debuild -us -uc"; \
896 debuild --preserve-envvar=PASSWORD -us -uc -b; \
897 DEBFILE=`find ../ -follow -maxdepth 1 -cnewer ./debian/control 2>/dev/null | grep '@install_name@_$(VERSION)' | grep '\.deb'`; \
898 if test x"$$DEBFILE" = x; then \
899 echo "Error ... cannot find package file"; \
900 exit 1; \
901 else \
902 echo "Package $$DEBFILE built."; \
903 cp $$DEBFILE ./$(PACKAGE)-$(VERSION)-$(BUILD_NUM).deb; \
904 ln --backup=numbered -fs ./$(PACKAGE)-$(VERSION)-$(BUILD_NUM).deb ./$(PACKAGE)-$(VERSION).deb; \
905 fi; \
906 echo
907
908#
909# Check samhain.spec
910#
911rpmspec-full:
912 @grep 'install-light' samhain.spec >/dev/null 2>&1; \
913 if test x"$$?" = "x0"; then \
914 echo "Your samhain.spec is from rpm-light. Please run"; \
915 echo " .config.status to re-create the original samhain.spec"; \
916 exit 1; \
917 fi
918
919# when editing the spec file, make an additional blank after 'make'
920# to avoid that it matches on a second processing
921#
922rpmspec-light: samhain.spec
923 @echo "Stripping docs from samhain.spec"; \
924 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; \
925 mv samhain.spec-light samhain.spec
926
927rpm-light: rpmspec-light distrpm
928 rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
929 @RPMTOP=`cat ~/.rpmmacros 2>/dev/null | grep '%_topdir' | awk '{ print $$2}'`; \
930 if test x"$$RPMTOP" = x; then \
931 try_RPMTOP=`echo $${HOME}/rpmbuild`; \
932 else \
933 if test ! -d "$${try_RPMTOP}"; then \
934 try_RPMTOP=`echo $${HOME}/rpmbuild`; \
935 fi; \
936 fi; \
937 if test -d "$${try_RPMTOP}"; then \
938 RPMTOP="$${try_RPMTOP}"; \
939 else \
940 RPMTOP=/usr/src; \
941 fi; \
942 echo "Searching the RPM package below $$RPMTOP ..."; \
943 RPMFILE=`find $$RPMTOP -follow -maxdepth 4 -cnewer ./samhain.spec 2>/dev/null | grep '@install_name@-$(VERSION)' | grep '\.rpm' | grep -v '\.src\.'`; \
944 echo; \
945 if test x"$$RPMFILE" = x; then \
946 echo "Error ... cannot find package file"; \
947 exit 1; \
948 else \
949 echo "Package $$RPMFILE built."; \
950 echo "Copying it to ./$(PACKAGE)-$(VERSION).rpm"; \
951 cp $$RPMFILE ./$(PACKAGE)-$(VERSION).rpm; \
952 fi; \
953 echo
954
955rpm: rpmspec-full distrpm
956 rpmbuild -ta ./$(PACKAGE)-$(VERSION).tar.gz;
957 @RPMTOP=`cat ~/.rpmmacros 2>/dev/null | grep '%_topdir' | awk '{ print $$2}'`; \
958 if test x"$$RPMTOP" = x; then \
959 try_RPMTOP=`echo $${HOME}/rpmbuild`; \
960 else \
961 if test ! -d "$${try_RPMTOP}"; then \
962 try_RPMTOP=`echo $${HOME}/rpmbuild`; \
963 fi; \
964 fi; \
965 if test -d "$${try_RPMTOP}"; then \
966 RPMTOP="$${try_RPMTOP}"; \
967 else \
968 RPMTOP=/usr/src; \
969 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
983srpm-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
992srpm: rpmspec-full distrpm
993 rpmbuild -ts ./$(PACKAGE)-$(VERSION).tar.gz
994
995solaris-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
1005solaris-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
1015solaris-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
1079depot-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
1104depot: 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
1109depot-light: depot
1110
1111#---------------------------------------------------------------
1112
1113
1114trustfile: $(srcsrc)/trustfile.c config.h
1115 $(COMPILE) $(VFLAG) -DSH_IDENT=\"@myident@\" -DTRUST_MAIN -DSL_ALWAYS_TRUSTED=@mytrust@ -o trustfile $(srcsrc)/trustfile.c
1116
1117sh_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
1128sstrip: $(srcsrc)/sstrip.c Makefile
1129 $(BUILD_CC) -I. -o sstrip $(srcsrc)/sstrip.c
1130
1131encode: $(srcsrc)/encode.c Makefile
1132 $(BUILD_CC) -I. -o encode $(srcsrc)/encode.c
1133
1134config_xor.h: config.h encode
1135 @echo 'encode $(XOR_CODE) config.h'; \
1136 ./encode $(XOR_CODE) config.h; \
1137 mv x_config.h config_xor.h
1138
1139
1140$(OBJECTS): encode internal.h config_xor.h
1141 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1142 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1143 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1144 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c && \
1145 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1146
1147sh_tiger_i.o: $(srcsrc)/$(TIGER_SRC) Makefile config_xor.h
1148 @echo "$(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC)";\
1149 $(COMPILE) $(VFLAG) -o sh_tiger_i.o -c $(srcsrc)/$(TIGER_SRC);
1150
1151samhain_setpwd: encode config_xor.h $(srcsrc)/samhain_setpwd.c
1152 @echo '$(COMPILE) -o samhain_setpwd $(srcsrc)/samhain_setpwd.c'; \
1153 ./encode $(XOR_CODE) $(srcsrc)/samhain_setpwd.c; \
1154 $(COMPILE) -o samhain_setpwd x_samhain_setpwd.c; \
1155 rm x_samhain_setpwd.c
1156
1157samhain_stealth: encode config_xor.h $(srcsrc)/samhain_stealth.c
1158 @echo '$(COMPILE) -o samhain_stealth $(srcsrc)/samhain_stealth.c'; \
1159 ./encode $(XOR_CODE) $(srcsrc)/samhain_stealth.c; \
1160 $(COMPILE) -o samhain_stealth x_samhain_stealth.c; \
1161 rm x_samhain_stealth.c
1162
1163yulectl: encode config_xor.h $(srcsrc)/yulectl.c
1164 @echo '$(COMPILE) -o yulectl $(srcsrc)/yulectl.c $(LIBS_SOCK)'; \
1165 ./encode $(XOR_CODE) $(srcsrc)/yulectl.c; \
1166 $(COMPILE) -o yulectl x_yulectl.c $(LIBS_SOCK); \
1167 rm x_yulectl.c
1168
1169$(SAMHAIN): internal.h $(OBJECTS) sh_tiger_i.o
1170 @-rm -f $(SAMHAIN)
1171 @echo "$(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)"; \
1172 $(LINK) sh_tiger_i.o $(OBJECTS) $(LIBS_TRY)
1173
1174
1175CUTEST_SOURCES = $(srcsrc)/cutest_sh_tools.c \
1176 $(srcsrc)/cutest_sh_utils.c \
1177 $(srcsrc)/cutest_sh_unix.c \
1178 $(srcsrc)/cutest_slib.c \
1179 $(srcsrc)/cutest_zAVLTree.c \
1180 $(srcsrc)/cutest_sh_hash.c \
1181 $(srcsrc)/cutest_sh_tiger0.c
1182
1183CUTEST_OBJECTS = cutest_sh_tools.o \
1184 cutest_sh_utils.o \
1185 cutest_sh_unix.o \
1186 cutest_slib.o \
1187 cutest_zAVLTree.o \
1188 cutest_sh_hash.o \
1189 cutest_sh_tiger0.o
1190
1191$(CUTEST_OBJECTS): $(CUTEST_SOURCES) config_xor.h internal.h
1192 @echo "./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c --> x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1193 ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
1194 echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
1195 $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
1196 rm x_`echo $@ |sed 's%\.o$$%%'`.c
1197
1198
1199cutest: $(SOURCES) $(CUTEST_SOURCES)
1200 @$(MAKE) CUTEST='-DSH_CUTEST=1' intcutest
1201
1202$(srcsrc)/CuTestMain.c: $(SOURCES) $(CUTEST_SOURCES) $(srcsrc)/make-tests.sh
1203 cd $(srcsrc)/ && ./make-tests.sh >CuTestMain.c;
1204
1205intcutest: internal.h $(OBJECTS) $(CUTEST_OBJECTS) sh_tiger_i.o $(srcsrc)/CuTestMain.c
1206 @$(COMPILE) -o CuTestMain.o -c $(srcsrc)/CuTestMain.c; \
1207 $(COMPILE) -o CuTest.o -c $(srcsrc)/CuTest.c; \
1208 rm -f samhain.o; \
1209 ./encode $(XOR_CODE) $(srcsrc)/samhain.c; \
1210 $(COMPILE) $(VFLAG) -o samhain.o -c x_samhain.c; \
1211 rm x_samhain.c; \
1212 $(LINK) sh_tiger_i.o $(CUTEST_OBJECTS) CuTestMain.o CuTest.o $(OBJECTS) $(LIBS_TRY); \
1213 test -f ./intcutest && mv ./intcutest ./cutest; \
1214 ./cutest
1215
1216runcutest:
1217 gdb ./cutest
1218
1219
1220# For bignum
1221internal.h: mkhdr
1222 @sleep 1; \
1223 ./mkhdr
1224
1225bignum.o: internal.h
1226
1227
1228# If your compiler can't handle long identifiers (> 6 chars), move the `#' to
1229# the other line.
1230
1231mkhdr: $(srcsrc)/mkhdr.c config.h
1232 @echo "$(BUILD_CC) -I. -o mkhdr $(srcsrc)/mkhdr.c"; \
1233 sleep 1; \
1234 $(BUILD_CC) -I. -o mkhdr $(srcsrc)/mkhdr.c
1235
1236# $(COMPILE) -DBIG_SHORT_NAMES -o mkhdr $(srcdir)/mkhdr.c
1237
1238#----------------------------------------------------------
1239#
1240# EXE PACKER rules
1241#
1242#----------------------------------------------------------
1243
1244minilzo.o: $(srcsrc)/minilzo.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h config.h
1245 @echo "$(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c"; \
1246 $(COMPILE) -DMINILZO_HAVE_CONFIG_H -o minilzo.o -c $(srcsrc)/minilzo.c
1247
1248exepack_mkdata: $(srcsrc)/exepack_mkdata.c $(srcinc)/lzoconf.h $(srcinc)/minilzo.h minilzo.o
1249 @echo "$(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c"; \
1250 $(COMPILE) -o exepack_mkdata.o -c $(srcsrc)/exepack_mkdata.c; \
1251 echo "$(LINK) exepack_mkdata.o minilzo.o"; \
1252 $(LINK) exepack_mkdata.o minilzo.o
1253
1254#
1255# prepare the data to be packed
1256#
1257exepack.data: $(SAMHAIN) exepack_mkdata 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 echo "./exepack_mkdata ./samhain.pk.data ./exepack.data 0"; \
1265 ./exepack_mkdata ./samhain.pk.data ./exepack.data 0; \
1266 echo "rm -f ./samhain.pk.data"; \
1267 rm -f ./samhain.pk.data;
1268
1269exepack: $(srcsrc)/exepack.c minilzo.o exepack.data
1270 @echo "$(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c"; \
1271 $(COMPILE) -o exepack.o -c $(srcsrc)/exepack.c; \
1272 echo "$(LINK) exepack.o minilzo.o"; \
1273 $(LINK) exepack.o minilzo.o;
1274
1275#
1276# this program fills the data section with the binary
1277#
1278exepack_fill: $(srcsrc)/exepack_fill.c minilzo.o exepack
1279 @echo "$(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c"; \
1280 $(COMPILE) -o exepack_fill.o -c $(srcsrc)/exepack_fill.c; \
1281 echo "$(LINK) exepack_fill.o minilzo.o"; \
1282 $(LINK) exepack_fill.o minilzo.o
1283
1284samhain.pk: $(SAMHAIN) exepack exepack_fill sstrip
1285 @echo "cp ./$(SAMHAIN) ./samhain.pk.data"; \
1286 cp ./$(SAMHAIN) ./samhain.pk.data; \
1287 echo "strip ./samhain.pk.data"; \
1288 strip ./samhain.pk.data > /dev/null 2>&1 || echo "... is already stripped"; \
1289 echo "./sstrip ./samhain.pk.data"; \
1290 ./sstrip ./samhain.pk.data > /dev/null 2>&1 || echo "sstrip returned false"; \
1291 test -f exepack.out && rm exepack.out; \
1292 echo "./exepack_fill exepack samhain.pk.data exepack.out"; \
1293 ./exepack_fill exepack samhain.pk.data exepack.out; \
1294 chmod +x exepack.out; \
1295 echo "strip exepack.out"; \
1296 strip exepack.out > /dev/null 2>&1 || echo "... is already stripped"; \
1297 ./sstrip exepack.out > /dev/null 2>&1 || echo "sstrip returned false"; \
1298 echo "mv exepack.out samhain.pk"; \
1299 rm -f samhain.pk; mv exepack.out samhain.pk
1300
1301samhain-packed: $(SAMHAIN) samhain_setpwd
1302 @echo "samhain_setpwd samhain new $(CLIENTPASSWD)"; \
1303 samhain_setpwd samhain new $(CLIENTPASSWD); \
1304 echo "rm -f samhain; mv samhain.new samhain"; \
1305 rm -f samhain; mv samhain.new samhain; \
1306 $(MAKE) samhain.pk; \
1307 echo "rm -f samhain; mv samhain.pk samhain"; \
1308 rm -f samhain; mv samhain.pk samhain
1309
1310#----------------------------------------------------------
1311#
1312# DEPLOY rules
1313#
1314#----------------------------------------------------------
1315
1316uninstall-deploy:
1317 rm -rf $(mydatadir)/profiles/source
1318 rm -rf $(mydatadir)/profiles/archpkg
1319 rm -rf $(mydatadir)/profiles/libexec
1320 rm -rf $(mydatadir)/profiles/tmp
1321 rm -rf $(mydatadir)/profiles/private
1322 @if test -f $(sbindir)/deploy.sh; then \
1323 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1324 if test x"$$old_deploy" = xold; then \
1325 echo "rm -f $(sbindir)/deploy2.sh"; \
1326 rm -f $(sbindir)/deploy2.sh; \
1327 else \
1328 echo "rm -f $(sbindir)/deploy.sh"; \
1329 rm -f $(sbindir)/deploy.sh; \
1330 fi; \
1331 fi
1332
1333EXECFILES= comCHECKSRC comDOWNLOAD comBUILD comCLEAN comINSTALL \
1334 funcDIALOG funcEXE funcPRINT funcSETUP funcBUILD funcINSTALL \
1335 funcDB comUNINSTALL \
1336 preinstall postinstall initscript
1337
1338# $(mydatadir)/profiles/
1339# |
1340# |
1341# |-- source -------------> (tarballs)
1342# |
1343# |-- configs ------------> (default configs)
1344# |
1345# |-- archpkg
1346# | |
1347# | |-- architecture -> (package, setup script)
1348# |
1349# |-- hosts
1350# | |
1351# | |-- hostname -----> (config)
1352# |
1353# |-- libexec ------------> (scripts)
1354# |
1355# |-- private ------------> (gpg key)
1356# |
1357# |-- tmp
1358#
1359install-deploy: deploy.sh samhain_stealth
1360 @echo "Creating directory tree under $(mydatadir)/profiles/"; \
1361 $(mkinstalldirs) $(sbindir); \
1362 $(mkinstalldirs) $(mydatadir)/profiles/source; \
1363 $(mkinstalldirs) $(mydatadir)/profiles/configs; \
1364 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/debian_i386; \
1365 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/gentoo_i386; \
1366 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/redhat_i386; \
1367 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/linux_i386; \
1368 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/freebsd_i386;\
1369 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/solaris; \
1370 $(mkinstalldirs) $(mydatadir)/profiles/archpkg/aix; \
1371 $(mkinstalldirs) $(mydatadir)/profiles/hosts; \
1372 $(mkinstalldirs) $(mydatadir)/profiles/libexec; \
1373 $(mkinstalldirs) $(mydatadir)/profiles/private; \
1374 $(mkinstalldirs) $(mydatadir)/profiles/tmp; \
1375 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc; then \
1376 if test -f $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz; then \
1377 echo "Installing source tarball"; \
1378 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz.asc \
1379 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz.asc; \
1380 $(INSTALL_DATA) $(srcdir)/../$(PACKAGE)-$(VERSION).tar.gz \
1381 $(mydatadir)/profiles/source/$(PACKAGE)-$(VERSION).tar.gz; \
1382 fi; \
1383 fi; \
1384 echo "Installing default configs"; \
1385 test -f $(mydatadir)/profiles/configs/freebsd_i386.samhainrc || \
1386 $(INSTALL_DATA) $(srcdir)/samhainrc.freebsd \
1387 $(mydatadir)/profiles/configs/freebsd_i386.samhainrc; \
1388 test -f $(mydatadir)/profiles/configs/debian_i386.samhainrc || \
1389 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1390 $(mydatadir)/profiles/configs/debian_i386.samhainrc; \
1391 test -f $(mydatadir)/profiles/configs/gentoo_i386.samhainrc || \
1392 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1393 $(mydatadir)/profiles/configs/gentoo_i386.samhainrc; \
1394 test -f $(mydatadir)/profiles/configs/redhat_i386.samhainrc || \
1395 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1396 $(mydatadir)/profiles/configs/redhat_i386.samhainrc; \
1397 test -f $(mydatadir)/profiles/configs/linux_i386.samhainrc || \
1398 $(INSTALL_DATA) $(srcdir)/samhainrc.linux \
1399 $(mydatadir)/profiles/configs/linux_i386.samhainrc; \
1400 test -f $(mydatadir)/profiles/configs/solaris.samhainrc || \
1401 $(INSTALL_DATA) $(srcdir)/samhainrc.solaris \
1402 $(mydatadir)/profiles/configs/solaris.samhainrc; \
1403 test -f $(mydatadir)/profiles/configs/aix.samhainrc || \
1404 $(INSTALL_DATA) $(srcdir)/samhainrc.aix5.2.0 \
1405 $(mydatadir)/profiles/configs/aix.samhainrc; \
1406 if test -f $(mydatadir)/profiles/configs/generic.configure; then \
1407 :; \
1408 else \
1409 SH_FQDN_SYSTEM=`uname -n`; \
1410 SH_FQDN_DOMAIN=`grep -i domain /etc/resolv.conf |grep -v "\#" |awk '{print $$2}' |head -1`; \
1411 if test -n "$${SH_FQDN_SYSTEM}" -a -n "$${SH_FQDN_DOMAIN}"; then \
1412 sh_thishost="$${SH_FQDN_SYSTEM}.$${SH_FQDN_DOMAIN}"; \
1413 else \
1414 sh_thishost="FQDN_MISSING"; \
1415 fi; \
1416 outfile=$(mydatadir)/profiles/configs/generic.configure; \
1417 echo "'--enable-network=client'" > $$outfile; \
1418 echo "'--with-logserver=$${sh_thishost}'" >> $$outfile; \
1419 echo "'--with-data-file=REQ_FROM_SERVER/var/lib/samhain/samhain_file'" >> $$outfile; \
1420 echo "'--with-config-file=REQ_FROM_SERVER/etc/samhainrc'" >> $$outfile; \
1421 echo "'--enable-base=@mykeybase@'" >> $$outfile; \
1422 fi; \
1423 $(INSTALL_SHELL) $(srcdir)/mkinstalldirs \
1424 $(mydatadir)/profiles/libexec; \
1425 $(INSTALL_SHELL) $(srcdir)/install-sh \
1426 $(mydatadir)/profiles/libexec; \
1427 for ff in $(EXECFILES); do \
1428 test -f $(srcdir)/dsys/$$ff && $(INSTALL_SHELL) $(srcdir)/dsys/$$ff \
1429 $(mydatadir)/profiles/libexec; \
1430 done; \
1431 $(INSTALL_SHELL) samhain_stealth $(mydatadir)/profiles/libexec; \
1432 test -f $(srcdir)/dsys/0F571F6C.asc && $(INSTALL_DATA) $(srcdir)/dsys/0F571F6C.asc \
1433 $(mydatadir)/profiles/private; \
1434 convert +compress $(srcdir)/stealth_template.jpg stealth_template.ps >/dev/null || \
1435 { 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 "*"; }; \
1436 if test -f stealth_template.ps; then \
1437 if test -f $(mydatadir)/profiles/private/stealth_template.ps; then \
1438 :; \
1439 else \
1440 $(INSTALL_DATA) stealth_template.ps $(mydatadir)/profiles/private; \
1441 fi; \
1442 fi; \
1443 if test -f $(sbindir)/deploy.sh; then \
1444 old_deploy=`grep 'VERSION2' $(sbindir)/deploy.sh >/dev/null 2>&1 || echo old`; \
1445 if test x"$$old_deploy" = xold; then \
1446 echo "*"; echo "* Version 1 of deploy.sh found"; echo "*"; \
1447 echo "* Installing $(sbindir)/deploy2.sh"; echo "*"; \
1448 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy2.sh; \
1449 else \
1450 echo "Installing $(sbindir)/deploy.sh"; \
1451 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1452 fi; \
1453 else \
1454 echo "Installing $(sbindir)/deploy.sh"; \
1455 $(INSTALL_SHELL) deploy.sh $(sbindir)/deploy.sh; \
1456 fi
1457
1458
1459#----------------------------------------------------------
1460#
1461# DISTRIBUTION rules
1462#
1463#----------------------------------------------------------
1464
1465distdir = $(PACKAGE)-$(VERSION)
1466top_distdir = $(distdir)
1467
1468# This target untars the dist file and tries a VPATH configuration. Then
1469# it guarantees that the distribution is self-contained by making another
1470# tarfile.
1471
1472#
1473# 1) make distribution tarfile
1474# 2) unpack the tarfile into distdir
1475# 3) create build and install directories
1476# 4) do the build in the build dir, with sources from distdir
1477# 5) check (there are no subdirs, thus does nothing)
1478# 6) install
1479# 7) installcheck (equal to check, does nothing)
1480#
1481distcheck: dist
1482 -rm -rf $(distdir)
1483 GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
1484 mkdir $(distdir)/=build
1485 mkdir $(distdir)/=inst
1486 dc_install_base=`cd $(distdir)/=inst && pwd`; \
1487 cd $(distdir)/=build \
1488 && ../configure --srcdir=.. --prefix=$$dc_install_base \
1489 && $(MAKE) \
1490 && $(MAKE) install
1491 -rm -rf $(distdir)
1492 -rm -f $(distdir).tar.gz.asc
1493 @gpg -a --detach-sign $(distdir).tar.gz; \
1494 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc; \
1495 rm -f $(distdir).tar.gz; \
1496 rm -f $(distdir).tar.gz.asc; \
1497 gzip --best $(distdir).tar
1498 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1499 @echo "========================"; \
1500 echo "$(PACKAGE)_signed-$(VERSION).tar.gz is ready for distribution"; \
1501 echo "========================"
1502
1503#
1504# create a tarfile for the distibution
1505#
1506distrpm: distdirrpm
1507 -chmod -R a+r $(distdir)
1508 -rm -rf $(distdir).tar.gz
1509 -rm -rf $(distdir).tar
1510 $(TAR) chof $(distdir).tar $(distdir)
1511 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1512 -rm -rf $(distdir)
1513
1514dist: distdir
1515 -chmod -R a+r $(distdir)
1516 -rm -rf $(distdir).tar.gz
1517 -rm -rf $(distdir).tar
1518 $(TAR) chof $(distdir).tar $(distdir)
1519 gzip -c --best $(distdir).tar > $(distdir).tar.gz
1520 -rm -rf $(distdir)
1521
1522#
1523# create a tarfile for the distibution
1524#
1525dist-sign: distdir
1526 -rm -f $(distdir)/scripts/samhain.ebuild
1527 -rm -f $(distdir)/scripts/samhain.ebuild-light
1528 -chmod -R a+r $(distdir)
1529 -rm -rf $(distdir).tar.gz
1530 -rm -rf $(distdir).tar
1531 $(TAR) chof $(distdir).tar $(distdir)
1532 gzip --best $(distdir).tar
1533 -rm -rf $(distdir)
1534 -rm -f $(distdir).tar.gz.asc
1535 gpg -a --detach-sign $(distdir).tar.gz
1536 $(TAR) chof $(distdir).tar $(distdir).tar.gz $(distdir).tar.gz.asc
1537 -rm -f $(distdir).tar.gz
1538 -rm -f $(distdir).tar.gz.asc
1539 gzip --best $(distdir).tar
1540 mv $(distdir).tar.gz $(PACKAGE)_signed-$(VERSION).tar.gz
1541
1542
1543#
1544# same as dist
1545#
1546dist-all: distdir
1547 -chmod -R a+r $(distdir)
1548 GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
1549 -rm -rf $(distdir)
1550
1551#
1552# create distribution directory and copy files into it
1553#
1554INITFILES=samhain.startIRIX samhain.startFreeBSD samhain.startSolaris \
1555samhain.startLSB samhain.startGentoo samhain.startLinux samhain.startHPUX \
1556samhain.startIRIX samhain.startMACOSX
1557
1558SCRIPTFILES=redhat_i386.client.spec check_samhain.pl samhainadmin.pl \
1559yuleadmin.pl samhain.ebuild samhain.ebuild-light samhain.spec
1560
1561distdir: distfilecheck
1562 -rm -f $(top_srcdir)/init/*~
1563 -rm -f $(top_srcdir)/sql_init/*~
1564 -rm -f $(top_srcdir)/dsys/*~
1565 -rm -f $(top_srcdir)/docs/*~
1566 -rm -f $(top_srcdir)/include/*~
1567 -rm -f $(top_srcdir)/src/*~
1568 -rm -f $(top_srcdir)/test/*~
1569 -rm -f $(top_srcdir)/scripts/*~
1570 (cd $(top_srcdir)/init && rm -f $(INITFILES))
1571 -rm -rf $(distdir)
1572 mkdir $(distdir)
1573 -chmod 777 $(distdir)
1574 cp scripts/samhain.spec $(distdir)/samhain.spec; \
1575 (cd $(top_srcdir)/scripts && rm -f $(SCRIPTFILES))
1576 @for file in $(DISTFILES); do \
1577 d=$(top_srcdir); \
1578 if test -f $$d/$$file || test -d $$d/$$file; then \
1579 cp -pr $$d/$$file $(distdir)/$$file; \
1580 fi; \
1581 done; \
1582 rm -f $(distdir)/scripts/*.spec
1583
1584#
1585# as distdir, but don't copy spec file from scripts
1586#
1587distdirrpm: distfilecheck
1588 -rm -rf $(distdir)
1589 mkdir $(distdir)
1590 -chmod 777 $(distdir)
1591 @if test -f ./samhain.spec; then \
1592 :; \
1593 else \
1594 echo "Error: ./samhain.spec not found, please run configure"; \
1595 exit 1; \
1596 fi
1597 @cp -p samhain.spec $(distdir)/samhain.spec; \
1598 for file in $(DISTFILES); do \
1599 d=$(top_srcdir); \
1600 if test -f $$d/$$file || test -d $$d/$$file; then \
1601 if test x"$$file" = "xsamhain.spec"; then \
1602 :; \
1603 else \
1604 cp -pr $$d/$$file $(distdir)/$$file; \
1605 fi; \
1606 fi; \
1607 done; \
1608 rm -f $(distdir)/scripts/*.spec
1609
1610
1611distfilecheck: $(top_srcdir)/config.h.in $(top_srcdir)/depend.sum
1612 @for file in $(DISTFILES); do \
1613 d=$(top_srcdir); \
1614 if test -f $$d/$$file || test -d $$d/$$file; then \
1615 : \
1616 else \
1617 echo "File not found: $$d/$$file"; \
1618 fi; \
1619 done
1620 @for file in $(SOURCES); do \
1621 if test -f $$file; then \
1622 : \
1623 else \
1624 echo "File not found: $$file"; \
1625 fi; \
1626 done
1627
1628
1629# DO NOT DELETE THIS LINE
1630
1631
1632samhain.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
1633sh_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
1634sh_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
1635sh_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
1636sh_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
1637sh_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
1638sh_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
1639sh_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
1640sh_tiger1.o: $(srcsrc)/sh_tiger1.c Makefile config_xor.h
1641sh_tiger2.o: $(srcsrc)/sh_tiger2.c Makefile config_xor.h
1642sh_tiger1_64.o: $(srcsrc)/sh_tiger1_64.c Makefile config_xor.h
1643sh_tiger2_64.o: $(srcsrc)/sh_tiger2_64.c Makefile config_xor.h
1644sh_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
1645sh_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
1646sh_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
1647sh_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
1648sh_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
1649sh_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
1650sh_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
1651sh_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
1652sh_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
1653sh_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
1654sh_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
1655sh_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
1656sh_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
1657sh_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
1658sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h
1659sh_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
1660sh_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
1661sh_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
1662sh_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
1663sh_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
1664sh_err_syslog.o: $(srcsrc)/sh_err_syslog.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h
1665sh_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
1666bignum.o: $(srcsrc)/bignum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/bignum.h
1667mkhdr.o: $(srcsrc)/mkhdr.c Makefile config.h
1668samhain_setpwd.o: $(srcsrc)/samhain_setpwd.c Makefile config_xor.h
1669samhain_stealth.o: $(srcsrc)/samhain_stealth.c Makefile config_xor.h
1670encode.o: $(srcsrc)/encode.c Makefile
1671sstrip.o: $(srcsrc)/sstrip.c Makefile config.h
1672trustfile.o: $(srcsrc)/trustfile.c Makefile config_xor.h $(srcinc)/sh_calls.h $(srcinc)/slib.h $(srcinc)/sh_static.h $(srcinc)/sh_pthread.h
1673exepack.o: $(srcsrc)/exepack.c Makefile config.h $(srcinc)/minilzo.h $(srcinc)/exepack.data
1674exepack_fill.o: $(srcsrc)/exepack_fill.c Makefile config.h config.h $(srcinc)/minilzo.h
1675exepack_mkdata.o: $(srcsrc)/exepack_mkdata.c Makefile config.h $(srcinc)/minilzo.h
1676minilzo.o: $(srcsrc)/minilzo.c Makefile $(srcinc)/minilzo.h
1677slib.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
1678rijndael-alg-fst.o: $(srcsrc)/rijndael-alg-fst.c Makefile config_xor.h $(srcinc)/rijndael-alg-fst.h
1679rijndael-api-fst.o: $(srcsrc)/rijndael-api-fst.c Makefile config_xor.h $(srcinc)/rijndael-api-fst.h
1680zAVLTree.o: $(srcsrc)/zAVLTree.c Makefile $(srcinc)/zAVLTree.h
1681sh_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
1682sh_ignore.o: $(srcsrc)/sh_ignore.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error.h $(srcinc)/CuTest.h
1683yulectl.o: $(srcsrc)/yulectl.c Makefile config_xor.h
1684sh_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
1685sh_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
1686sh_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
1687kern_head.o: $(srcsrc)/kern_head.c Makefile config.h $(srcinc)/kern_head.h $(srcinc)/kern_head.h
1688sh_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
1689sh_static.o: $(srcsrc)/sh_static.c Makefile config_xor.h $(srcinc)/sh_pthread.h
1690sh_async.o: $(srcsrc)/sh_async.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_calls.h $(srcinc)/sh_error.h
1691sh_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
1692sh_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
1693sh_pthread.o: $(srcsrc)/sh_pthread.c Makefile config_xor.h $(srcinc)/sh_pthread.h $(srcinc)/sh_calls.h $(srcinc)/sh_modules.h
1694sh_string.o: $(srcsrc)/sh_string.c Makefile config_xor.h $(srcinc)/sh_string.h $(srcinc)/sh_mem.h $(srcinc)/CuTest.h
1695dnmalloc.o: $(srcsrc)/dnmalloc.c Makefile config.h
1696t-test1.o: $(srcsrc)/t-test1.c Makefile config.h $(srcinc)/malloc.h
1697sh_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
1698sh_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
1699sh_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
1700sh_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
1701sh_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
1702sh_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
1703sh_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
1704sh_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
1705sh_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
1706sh_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
1707sh_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
1708sh_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
1709sh_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
1710sh_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
1711sh_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
1712sh_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
1713sh_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
1714sh_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
1715sh_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
1716sh_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
1717sh_sub.o: $(srcsrc)/sh_sub.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h
1718sh_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
1719sh_checksum.o: $(srcsrc)/sh_checksum.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_checksum.h $(srcinc)/sh_utils.h $(srcinc)/CuTest.h
1720sh_guid.o: $(srcsrc)/sh_guid.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/CuTest.h
1721sh_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
1722sh_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
1723sh_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
1724sh_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
1725sh_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
1726sh_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
1727sh_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
1728sh_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.