1 DESCRIPTION
= "snort - a free lightweight network intrusion detection system for UNIX and Windows."
2 HOMEPAGE
= "http://www.snort.org/"
4 DEPENDS
= "libpcap libpcre libprelude"
8 SRC_URI
= " ${GENTOO_MIRROR}/${P}.tar.gz;name=tarball \
9 file://snort.fix.configure.in.HACK;apply=yes \
15 SRC_URI
[tarball.md5sum
] = "ef02aaad54746603f2cb3236fe962128"
16 SRC_URI
[tarball.sha256sum
] = "a7d9eb16427514d00926e9892c4a92b6ff1fd0f79555d8f8dce91dfa14112e6a"
20 #snort does
not like parallel make
!
23 --enable-decoder-preprocessor-rules \
25 --enable-linux-smp-stats \
28 --enable-reload-error-restart \
29 --enable-targetbased \
32 inherit autotools pkgconfig
35 do_install_prepend
() {
36 sed
-i
-e 's
:-Wl
,-rpath
-link
,$
{STAGING_LIBDIR
}::g'
-e 's
:-isystem$
{STAGING_INCDIR
}::g' snort.pc
40 install
-d $
{D
}/$
{sysconfdir
}/snort
/rules
41 install
-d $
{D
}/$
{sysconfdir
}/snort
/preproc_rules
42 install
-d $
{D
}/$
{sysconfdir
}/default/volatiles
43 mkdir
-p $
{D
}/$
{sysconfdir
}/init.d
44 for i in map config conf dtd
; do
45 cp $
{S
}/etc
/*.$i $
{D
}/$
{sysconfdir
}/snort
/
47 cp $
{S
}/preproc_rules
/*.rules $
{D
}/$
{sysconfdir
}/snort
/preproc_rules
/
48 install
-m
0644 $
{WORKDIR
}/default $
{D
}/$
{sysconfdir
}/default/snort
49 install
-m
0644 $
{WORKDIR
}/volatiles $
{D
}/$
{sysconfdir
}/default/volatiles
/snort
50 install
-m
0755 $
{WORKDIR
}/snort.init $
{D
}/$
{sysconfdir
}/init.d
/snort
51 mkdir
-p $
{D
}/$
{localstatedir
}/log/snort
52 install
-d $
{D
}$
{sysconfdir
}/logrotate.d
53 install
-m
0644 $
{WORKDIR
}/logrotate $
{D
}$
{sysconfdir
}/logrotate.d
/snort
56 pkg_postinst_$
{PN
}() {
57 grep
-q ^snort
: /etc
/group || addgroup snort
58 grep
-q ^snort
: /etc
/passwd || \
59 adduser
--disabled
-password
--home
=/var
/log/snort
/ --system \
60 --ingroup snort
--no
-create
-home
-g
"snort" snort
61 $
{sysconfdir
}/init.d
/populate
-volatile.sh update
64 PACKAGES
=+ "${PN}-logrotate"
65 FILES_$
{PN
}-logrotate
= "${sysconfdir}/logrotate.d/snort"
67 ${libdir}/snort_dynamicengine/*.so.* \
68 ${libdir}/snort_dynamicpreprocessor/*.so.* \
69 ${libdir}/snort_dynamicrules/*.so.* \
71 FILES_$
{PN
}-dbg
+= " \
72 ${libdir}/snort_dynamicengine/.debug \
73 ${libdir}/snort_dynamicpreprocessor/.debug \
74 ${libdir}/snort_dynamicrules/.debug \
76 FILES_$
{PN
}-static
+= " \
77 ${libdir}/snort_dynamicengine/*.a \
78 ${libdir}/snort_dynamicpreprocessor/*.a \
79 ${libdir}/snort_dynamicrules/*.a \
81 FILES_$
{PN
}-dev
+= " \
82 ${libdir}/snort_dynamicengine/*.la \
83 ${libdir}/snort_dynamicpreprocessor/*.la \
84 ${libdir}/snort_dynamicrules/*.la \
85 ${libdir}/snort_dynamicengine/*.so \
86 ${libdir}/snort_dynamicpreprocessor/*.so \
87 ${libdir}/snort_dynamicrules/*.so \
88 ${prefix}/src/snort_dynamicsrc \
91 RRECOMMENDS_$
{PN
} += "${PN}-logrotate"
92 RRECOMMENDS_$
{PN
} += "barnyard"
93 RSUGGESTS_$
{PN
}-logrotate
+= "logrotate"