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