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