File rootcheck.spec of Package rootcheck

%define realname rootcheck
%define realver  2.4
%define srcext   tar.gz

# turn off the generation of debuginfo rpm  (RH9) ??
%global debug_package %{nil}

# Common info
Name:          %{realname}
Version:       %{realver}
Release:       wiz%{?extraver:0.}1
License:       GPL
Group:         Productivity/Security
URL:           http://www.ossec.net/main/rootcheck
Summary:       Open source rootkit detection and system auditing software

# Build-time parameters
BuildRoot:     %{_tmppath}/%{name}-root
Source:        http://www.ossec.net/rootcheck/files/%{realname}-%{realver}%{?extraver}.%{srcext}

%description
Rootcheck is an open source rootkit detection and system auditing software.
It scans the whole system looking for known rootkits and for the presence of
unknown (private or custom) rootkits and kernel level ones using anomaly
detection. In addition to that, it checks your configuration looking for
insecure options.

# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}

%build
%__make all
%__chmod 644 LICENSE
%__sed -ri 's|\./db/|%{_datadir}/ossec/db/|' rootcheck.conf
%__sed -ri 's|\./shared/|%{_datadir}/ossec/db/|' rootcheck.conf

%install
%__install -d -m755 %{buildroot}%{_sysconfdir}
%__install -d -m755 %{buildroot}%{_sbindir}
%__install -d -m755 %{buildroot}%{_datadir}/ossec/db
%__install -m644 rootcheck.conf %{buildroot}%{_sysconfdir}/
%__install -m755 ossec-rootcheck %{buildroot}%{_sbindir}/
%__ln_s ossec-rootcheck %{buildroot}%{_sbindir}/rootcheck
%__install -m644 db/* %{buildroot}%{_datadir}/ossec/db/

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc LICENSE README
%{_sysconfdir}/rootcheck.conf
%{_sbindir}/*
%dir %{_datadir}/ossec
%{_datadir}/ossec/*

%changelog
openSUSE Build Service is sponsored by