2011-10-02 18:26:42 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Chkrootkit < Formula
|
|
|
|
url 'ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz'
|
|
|
|
homepage 'http://www.chkrootkit.org/'
|
|
|
|
md5 '304d840d52840689e0ab0af56d6d3a18'
|
|
|
|
version '0.49'
|
|
|
|
|
|
|
|
def install
|
2011-10-03 01:06:53 +00:00
|
|
|
chmod 0644, 'Makefile' # Makefile is read-only
|
2011-10-02 18:26:42 +00:00
|
|
|
|
|
|
|
inreplace 'Makefile' do |s|
|
2011-10-03 01:06:53 +00:00
|
|
|
s.remove_make_var! 'STATIC'
|
2011-10-02 18:26:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
system "make CC=#{ENV.cc} sense"
|
|
|
|
|
|
|
|
sbin.install ['check_wtmpx', 'chkdirs', 'chklastlog', 'chkproc',
|
2011-10-03 01:06:53 +00:00
|
|
|
'chkrootkit', 'chkutmp', 'chkwtmp', 'ifpromisc',
|
|
|
|
'strings-static']
|
2011-10-02 18:26:42 +00:00
|
|
|
doc.install ['README', 'README.chklastlog', 'README.chkwtmp']
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
# pipe stdout to cat since chkrootkit -V exits with status 1
|
|
|
|
system "#{sbin}/chkrootkit -V | cat"
|
|
|
|
end
|
|
|
|
end
|