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