%define _prefix /usr %define svn beta5 Summary: The Open Vulnerability Assessment (OpenVAS) Administrator Name: openvas-administrator Version: 1.3.2 Release: 5 #Source0: %{name}-%{version}-%{svn}.tar.gz Source0: %{name}-%{version}.tar.gz Source1: openvasad-init.sh Source2: openvas-administrator.sysconfig Source3: openvas-administrator.logrotate #Patch0: glib2-fix.patch Patch0: test.patch Patch1: disable-werror.patch Patch2: regex-disable.patch License: GNU GPLv2 URL: http://www.openvas.org Group: System Environment/Libraries Vendor: OpenVAS Development Team, http://www.openvas.org Packager: Scott R. Shinn BuildRoot: %{_builddir}/%{name}-root Prefix: %{_prefix} #AutoReqProv: no #AutoReq: 0 BuildRequires: cmake BuildRequires: openvas-libraries, openvas-libraries-devel BuildRequires: e2fsprogs-devel, sqlite-devel, doxygen BuildRequires: libxslt %if 0%{?fedora} >= 15 BuildRequires: libassuan libassuan-devel %endif %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 BuildRequires: libuuid libuuid-devel %else BuildRequires: e2fsprogs e2fsprogs-devel %endif %if 0%{!?el4} BuildRequires: e2fsprogs-libs %endif %if 0%{?el4} BuildRequires: evolution28-glib2-devel evolution28-glib2 Requires: evolution28-glib2 %endif %if 0%{?el5}%{?fc6}%{?fc7} BuildRequires: openvas-glib2-devel openvas-glib2 Requires: openvas-glib2 BuildRequires: e2fsprogs e2fsprogs-devel %else BuildRequires: glib2 >= 2.6.0, glib2-devel >= 2.6.0, %endif Requires: openvas-libraries Requires: graphviz %if 0%{?el4}0%{?el5} BuildRequires: %{_includedir}/pcap.h BuildRequires: compat-gnutls2, compat-gnutls2-devel Requires: compat-gnutls2 Requires: tetex-latex %else BuildRequires: libpcap-devel gnutls-devel Requires: texlive-latex %endif BuildRequires: libgcrypt-devel gpgme gpgme-devel %description This is the administrator module for the Open Vulnerability Assessment System (OpenVAS). It is intended to simplify the configuration and administration of an OpenVAS server both on a local installation as well as on a remote system. %prep #%setup -b 0 -n %{name}-%{version}-%{svn} %setup -b 0 -n %{name}-%{version} %if 0%{?el4}%{?el5} %patch0 -p1 %patch2 -p1 %endif #%patch1 -p1 %build %if 0%{?el5}%{?fc6}%{?fc7} export LDFLAGS="-L/usr/gnutls2/lib -L/lib -L/usr/openvas/lib/ -L/usr/openvas/lib64/" export CFLAGS="-I/usr/gnutls2/include -L/usr/gnutls2/lib -I/usr/openvas/include" export GNUTLS_LIBS=/usr/gnutls2/lib export PKG_CONFIG_PATH=/usr/gnutls2/lib/pkgconfig/:/usr/evolution28/lib/pkgconfig:/usr/lib/pkgconfig/ %ifarch x86_64 export GLIB_LIBS=/usr/openvas/lib64/libglib-2.0.so export PKG_CONFIG_PATH=/usr/openvas/lib64/pkgconfig:/usr/lib64/pkgconfig/:/usr/gnutls2/lib/pkgconfig/ %else export GLIB_LIBS=/usr/openvas/lib/libglib-2.0.so export PKG_CONFIG_PATH=/usr/openvas/lib/pkgconfig:/usr/lib/pkgconfig/ %endif %endif %if 0%{?el4}%{?el5} export PKG_CONFIG_PATH=/usr/evolution28/lib64/pkgconfig:/usr/lib64/pkgconfig/:/usr/gnutls2/lib/pkgconfig:/usr/lib/pkgconfig:/usr/openvas/lib/pkgconfig/:/usr/openvas/lib64/pkgconfig/ export LDFLAGS="-L/usr/gnutls2/lib -L/lib -L/usr/evolution28/lib/ -L/usr/evolution28/lib64/" export CFLAGS="-I/usr/gnutls2/include -L/usr/gnutls2/lib" %endif cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DSYSCONFDIR=%{_sysconfdir} \ -DLOCALSTATEDIR=%{_localstatedir} %if 0%{?el4}0%{?el5} perl -p -i -e "s[^include= ][include= -I/usr/gnutls2/include -L/usr/gnutls2/lib ]" openvas.tmpl %endif %{__make} %{?_smp_mflags} %{__make} doc %install make install DESTDIR=%{buildroot} # Install startup script. Dont use %{_initdir} here. This breaks el4 builds install -Dp -m 755 %{SOURCE1} %{buildroot}/etc/rc.d/init.d/openvas-administrator # Install sysconfig configration install -Dp -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig/openvas-administrator # install log rotation stuff install -m 644 -Dp %{SOURCE3} \ %{buildroot}/%{_sysconfdir}/logrotate.d/openvas-administrator %post if [ $1 = 1 ]; then /sbin/chkconfig --add openvas-administrator fi /sbin/chkconfig openvas-administrator on %preun if [ $1 = 0 ]; then /sbin/service openvas-administrator stop > /dev/null 2>&1 || : /sbin/chkconfig --del openvas-administrator fi %postun if [ $1 -ge 1 ]; then /sbin/service openvas-administrator condrestart >/dev/null 2>&1 fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %config /etc/openvas/openvasad_log.conf %config /etc/sysconfig/openvas-administrator /usr/share/man/man8/openvasad.8.gz /usr/share/openvas/openvasad/* /usr/sbin/openvasad /etc/rc.d/init.d/openvas-administrator /etc/logrotate.d/openvas-administrator /etc/openvas/pwpolicy.conf %changelog * Fri Nov 8 2013 Scott R. Shinn - 1.3.2-4 - Update to 1.3.2 * Fri Oct 25 2013 Scott R. Shinn - 1.3.1-3 - Update to 1.3.1 * Thu Apr 18 2013 Scott R. Shinn - 1.3.0-2 - Update to 1.3.0 * Mon Aug 20 2012 Scott R. Shinn - 1.2.1-2 - Update to 1.2.1 * Tue Apr 24 2012 Scott R. Shinn - 1.2.0-1 - Update to 1.2.0 * Fri Nov 4 2011 Scott R. Shinn - 1.1.2-1 - Update to 1.1.2 * Mon Mar 28 2011 Scott R. Shinn - 1.1.1-2 - Bugfix #XXX, updated init script to parse the sysconfig correctly * Thu Feb 22 2011 Scott R. Shinn - 1.1.1-1 - Update to 1.1.1 * Thu Feb 17 2011 Scott R. Shinn - 1.1.0-1 - Update to 1.1.0 * Wed Jan 19 2011 Scott R. Shinn - 1.0.1-1 - Update to 1.0.1 * Thu Dec 30 2010 Scott R. Shinn - 1.0.0-1 - Update to 1.0.0 * Thu Sep 9 2010 Scott R. Shinn - 0.9.0-2 - Remove duplicate texlive-latex requires on el5 * Mon Aug 13 2010 Scott R. Shinn - 0.9.0-1 - Update to 0.9.0 * Tue Apr 13 2010 Scott R. Shinn - 0.8.0 - initial build