A new user interface for you!

File rkhunter.spec of Package rkhunter

# We can't let RPM do the dependencies automatic because it'll then pick up
# a correct but undesirable perl dependency, which rkhunter does not require
# in order to function properly.
AutoReqProv: no

Summary:	Rootkit scans for rootkits, backdoors and local exploits.
Name:		rkhunter
Version:	1.2.9
Release:	1
Epoch:		0
License:	GPL
Group:          Applications/System
URL:		http://rkhunter.sourceforge.net/
Source0:	%{name}-%{version}.tar.gz
Vendor:         Michael Boelen
Packager:       Manuel Arostegui <marostegui@artica.es>
BuildArch:	noarch
Requires:	/bin/sh, /bin/ps, /bin/ls, /bin/cat, /bin/egrep
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Rootkit scanner is scanning tool to ensure you for about 99.9%% you're
clean of nasty tools. This tool scans for rootkits, backdoors and local
exploits by running tests like:
	- MD5 hash compare
	- Look for default files used by rootkits
	- Wrong file permissions for binaries
	- Look for suspected strings in LKM and KLD modules
	- Look for hidden files
	- Optional scan within plaintext and binary files
	- Software version checks
	- Application tests

Rootkit Hunter is released as a GPL licensed project and free for everyone to use.




%{__rm} -rf ${RPM_BUILD_ROOT}

%{__mkdir} -p ${RPM_BUILD_ROOT}%{_bindir}
%{__mkdir} -p ${RPM_BUILD_ROOT}%{_sysconfdir}
%{__mkdir} -p ${RPM_BUILD_ROOT}%{_libdir}
%{__mkdir} -p ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts
%{__mkdir} -p ${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}
%{__mkdir} -p ${RPM_BUILD_ROOT}%{_mandir}/man8
%{__mkdir} -p ${RPM_BUILD_ROOT}%{_var}/rkhunter/{db,tmp}
%{__chmod} ug+rwx,o-rwx ${RPM_BUILD_ROOT}%{_var}/rkhunter/tmp

%{__install} -m750 -p files/rkhunter		${RPM_BUILD_ROOT}%{_bindir}/

%{__install} -m640 -p files/backdoorports.dat	${RPM_BUILD_ROOT}%{_var}/rkhunter/db/
%{__install} -m640 -p files/defaulthashes.dat	${RPM_BUILD_ROOT}%{_var}/rkhunter/db/
%{__install} -m640 -p files/mirrors.dat		${RPM_BUILD_ROOT}%{_var}/rkhunter/db/
%{__install} -m640 -p files/os.dat		${RPM_BUILD_ROOT}%{_var}/rkhunter/db/
%{__install} -m640 -p files/md5blacklist.dat	${RPM_BUILD_ROOT}%{_var}/rkhunter/db/
%{__install} -m640 -p files/programs_bad.dat	${RPM_BUILD_ROOT}%{_var}/rkhunter/db/
%{__install} -m640 -p files/programs_good.dat	${RPM_BUILD_ROOT}%{_var}/rkhunter/db/

%{__install} -m644 -p files/CHANGELOG		${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}/
%{__install} -m644 -p files/LICENSE		${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}/
%{__install} -m644 -p files/README		${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}/
%{__install} -m644 -p files/WISHLIST		${RPM_BUILD_ROOT}%{_docdir}/rkhunter-%{version}/
%{__install} -m644 -p files/development/*.8	${RPM_BUILD_ROOT}%{_mandir}/man8/

%{__install} -m750 -p files/check_modules.pl	${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/
%{__install} -m750 -p files/check_port.pl	${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/
%{__install} -m750 -p files/filehashmd5.pl	${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/
%{__install} -m750 -p files/filehashsha1.pl	${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/
%{__install} -m750 -p files/showfiles.pl	${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/
%{__install} -m750 -p files/check_update.sh     ${RPM_BUILD_ROOT}%{_libdir}/rkhunter/scripts/

# (cjo) Put installation root in configuration file, then copy the rest
#       of the file from the original.
cat >> ${RPM_BUILD_ROOT}%{_sysconfdir}/rkhunter.conf << EOF
## Next three lines installed automatically by RPM. Do not change
## unless you know what you're doing...


cat files/rkhunter.conf >> ${RPM_BUILD_ROOT}%{_sysconfdir}/rkhunter.conf
%{__chmod} 640 ${RPM_BUILD_ROOT}%{_sysconfdir}/rkhunter.conf

# Only root should use rkhunter (at least for now)
%{__chmod} o-rwx -R ${RPM_BUILD_ROOT}%{_libdir}/rkhunter
%{__chmod} o-rwx -R ${RPM_BUILD_ROOT}%{_var}/rkhunter/db

%{__rm} -rf "$RPM_BUILD_ROOT"

%dir %{_libdir}/rkhunter
%doc %{_docdir}/rkhunter-%{version}
%dir %{_var}/rkhunter/tmp
%config(noreplace) %verify(not mtime) %{_sysconfdir}/rkhunter.conf