# Lynis spec file %define _includedir /usr/share/lynis/include %define _bindir /usr/bin %define _includedir /usr/share/lynis/include %define _pluginsdir /usr/share/lynis/plugins %define _dbdir /usr/share/lynis/db %global bashcompdir %(pkg-config --variable=completionsdir bash-completion) Summary: Security and system auditing tool. Name: lynis Version: 2.2.0 Release: 30 License: GPLv3 Group: Applications/System Source: %{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build URL: http://www.rootkit.nl/ Packager: Scott R. Shinn BuildArch: noarch Requires: audit Requires: e2fsprogs Requires: module-init-tools BuildRequires: bash-completion %description Lynis is a security and system auditing tool. It scans a system on the most interesting parts usefull for audits, like: - Security enhancements - Logging and auditing options - Banner identification - Software availability Lynis is released as a GPL licensed project and free for everyone to use. See http://www.rootkit.nl for a full description and documentation. %prep [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" mkdir $RPM_BUILD_ROOT %setup %build %install # Install profile install -d ${RPM_BUILD_ROOT}/etc/lynis install default.prf ${RPM_BUILD_ROOT}/etc/lynis # Install binary install -d ${RPM_BUILD_ROOT}/%{_bindir} install lynis ${RPM_BUILD_ROOT}/%{_bindir} # Install man page install -d ${RPM_BUILD_ROOT}/%{_mandir}/man8 install lynis.8 ${RPM_BUILD_ROOT}/%{_mandir}/man8 # Install functions/includes install -d ${RPM_BUILD_ROOT}%{_includedir} install include/* ${RPM_BUILD_ROOT}%{_includedir} chmod 640 ${RPM_BUILD_ROOT}%{_includedir}/* # Install plugins install -d ${RPM_BUILD_ROOT}%{_pluginsdir} install plugins/* ${RPM_BUILD_ROOT}%{_pluginsdir} # Install database files install -d ${RPM_BUILD_ROOT}%{_dbdir} install db/* ${RPM_BUILD_ROOT}%{_dbdir} mkdir -p %{buildroot}%{_localstatedir}/log/ touch %{buildroot}%{_localstatedir}/log/lynis.log touch %{buildroot}%{_localstatedir}/log/lynis-report.dat mkdir -p %{buildroot}%{bashcompdir} install -pm644 extras/bash_completion.d/lynis %{buildroot}%{bashcompdir}/ # Patch default paths sed -i -e 's#INCLUDEDIR="include"#INCLUDEDIR="%{_includedir}"#g' ${RPM_BUILD_ROOT}/usr/bin/lynis sed -i -e 's#PROFILE="default.prf"#PROFILE="/etc/lynis/default.prf"#g' ${RPM_BUILD_ROOT}/usr/bin/lynis %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" %files %defattr(-,root,root) %{_bindir}/lynis %doc CHANGELOG FAQ LICENSE README CONTRIBUTORS %doc %{_mandir}/man8/lynis.8.gz %config(noreplace) /etc/lynis/default.prf %{_includedir}/* %{_dbdir}/* %{_includedir}/* %{_pluginsdir}/* %ghost %{_localstatedir}/log/lynis.log %ghost %{_localstatedir}/log/lynis-report.dat %{bashcompdir}/* %changelog * Fri Mar 18 2016 Scott R. Shinn - 2.2.0-30 - Update to 2.2.0 * Sun Oct 11 2015 Scott R. Shinn - 2.1.1-29 - Update to 2.1.1 * Thu Apr 23 2015 Scott R. Shinn - 2.1.0-28 - Update to 2.1.0 * Thu Mar 19 2015 Scott R. Shinn - 2.0.0-27 - Update to 2.0.0 * Thu Nov 20 2014 Scott R. Shinn - 1.6.4-26 - Update to 1.6.4 * Thu Oct 16 2014 Scott R. Shinn - 1.6.3-25 - Update to 1.6.3 * Tue Sep 23 2014 Scott R. Shinn - 1.6.2-24 - Update to 1.6.2 * Sat Aug 30 2014 Scott R. Shinn - 1.6.0-23 - Update to 1.6.0 * Fri Aug 8 2014 Scott R. Shinn - 1.5.9-22 - Update to 1.5.9 * Mon Jul 28 2014 Scott R. Shinn - 1.5.8-21 - Update to 1.5.8 * Fri Jul 11 2014 Scott R. Shinn - 1.5.7-20 - Update to 1.5.7 * Mon Jun 16 2014 Scott R. Shinn - 1.5.6-19 - Update to 1.5.6 * Mon Jun 9 2014 Scott R. Shinn - 1.5.5-18 - Update to 1.5.5 * Mon May 19 2014 Scott R. Shinn - 1.5.3-17 - Update to 1.5.3 * Mon May 12 2014 Scott R. Shinn - 1.5.2-16 - Update to 1.5.2 * Fri May 2 2014 Scott R. Shinn - 1.5.1-15 - Update to 1.5.1 * Tue Apr 15 2014 Scott R. Shinn - 1.5.0-14 - Update to 1.5.0 * Wed Apr 9 2014 Scott R. Shinn - 1.4.9-13 - Update to 1.4.9 * Mon Mar 10 2014 Scott R. Shinn - 1.4.5-12 - Update to 1.4.5 - bugfix on include file permissions * Mon Mar 3 2014 Scott R. Shinn - 1.4.4-11 - Update to 1.4.4 * Fri Feb 28 2014 Scott R. Shinn - 1.4.3-10 - Update to 1.4.3 * Mon Feb 17 2014 Scott R. Shinn - 1.4.1-9 - Update to 1.4.1 * Fri Jan 31 2014 Scott R. Shinn - 1.4.0-8 - Update to 1.4.0 * Mon Jan 13 2014 Scott R. Shinn - 1.3.9-7 - Update to 1.3.9 * Mon Dec 30 2013 Scott R. Shinn - 1.3.8-6 - Update to 1.3.8 * Fri Dec 20 2013 Scott R. Shinn - 1.3.7-5 - Update to 1.3.7 - Add builds for Fedora 20 * Tue Dec 3 2013 Scott R. Shinn - 1.3.6-5 - Update to 1.3.6 * Wed Nov 20 2013 Scott R. Shinn - 1.3.5-4 - Update to 1.3.5 * Fri Oct 25 2013 Scott R. Shinn - 1.3.3-3 - Update to 1.3.3 * Thu Oct 17 2013 Scott R. Shinn - 1.3.2-2 - Update to 1.3.2 * Fri Dec 30 2011 Scott R. Shinn - 1.3.0-1 - Update to 1.3.0 * Fri Dec 18 2009 Scott R. Shinn - 1.2.9-1 - Update to 1.2.9 * Mon Nov 9 2009 Scott R. Shinn - 1.2.7-1 - Update to 1.2.7 * Thu Apr 9 2009 Scott R. Shinn - 1.2.6-1 - Update to 1.2.6 * Tue Sep 09 2008 Scott R. Shinn - 1.2.0-1 - Update to 1.2.1 * Wed Sep 03 2008 Scott R. Shinn - 1.2.0-1 - Update to 1.2.0 * Sat Mar 08 2008 Michael Boelen - 1.0.8-1 - initial .spec file