Summary: openvas-smb Name: openvas-smb Version: 1.0.1 Release: 1 Group: System Environment/Libraries License: GNU GPLv2 Source: %{name}-%{version}.tar.gz Patch0: heimdal-epel.patch Patch1: gcc447-build.patch Patch2: openvas-smb-1.0.1-nopragma.patch Patch3: openvas-smb-1.0.1-perl522.patch Patch4: openvas-smb-1.0.1-gnutls34.patch Vendor: OpenVAS Development Team, http://www.openvas.org Packager: Scott R. Shinn BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Prefix: %{_prefix} Obsoletes: wmi Provides: wmi BuildRequires: automake libtool BuildRequires: cmake >= 2.6.0 BuildRequires: popt-devel BuildRequires: heimdal-devel, heimdal-libs BuildRequires: mingw32-gcc # rhel6 needs to have com_err.h in /usr/include/ # 7 fixed this by duplicating the file across /usr/include/ and /usr/include/et/ BuildRequires: libcom_err-devel %if 0%{?rhel} == 6 BuildRequires: atomic-gnutls3-gnutls-devel BuildConflicts: gnutls gnutls-devel Requires: atomic-gnutls3-gnutls atomic-glib2-glib2 %else BuildRequires: gnutls-devel %endif %description This is the smb module for the Open Vulnerability Assessment System (OpenVAS). It includes libraries (openvas-wmiclient / openvas-wincmd) to interface with Microsoft Windows Systems through the Windows Management Instrumentation API and a winexe binary to execute processes remotely on that system. %prep %setup %patch0 -p0 %if 0%{?rhel} == 6 %patch1 -p1 %patch2 -p1 %endif %if 0%{fedora} >= 24 %patch3 -p1 %patch4 -p1 %endif %build %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 export CC="gcc -P" %endif %if 0%{?rhel} >= 6 export CC="gcc -Wl,-rpath,/opt/atomic/atomic-gnutls3/root/usr/lib,-rpath,/opt/atomic/atomic-gnutls3/root/usr/lib64,-rpath,/opt/atomic/atomic-glib2/root/usr/lib64/,-rpath,/opt/atomic/atomic-glib2/root/usr/lib/" export LDFLAGS="-L/opt/atomic/atomic-gnutls3/root/usr/lib -L/opt/atomic/atomic-gnutls3/root/usr/lib64 -L/lib -L/usr/openvas/lib/ -L/usr/openvas/lib64/" export CFLAGS="-I/opt/atomic/atomic-gnutls3/root/usr/include -I/usr/openvas/include -I/usr/include/et" export GNUTLS_LIBS=/opt/atomic/atomic-gnutls3/root/usr/lib:/opt/atomic/atomic-gnutls3/root/usr/lib64 export PKG_CONFIG_PATH=/opt/atomic/atomic-gnutls3/root/usr/lib/pkgconfig:/opt/atomic/atomic-gnutls3/root/usr/lib64/pkgconfig:/usr/lib/pkgconfig/ %endif cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DSYSCONFDIR=%{_sysconfdir} \ -DLOCALSTATEDIR=%{_localstatedir} %{__make} %install make "DESTDIR=${RPM_BUILD_ROOT}" install %post /sbin/ldconfig %postun /sbin/ldconfig %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %{_bindir}/winexe %{_bindir}/wmic %{_libdir}/pkgconfig/libopenvas*pc %{_libdir}/libopenvas_w* %{_includedir}/openvas/smb/*h %changelog * Mon Dec 21 2015 Scott R. Shinn - 1.0.1-1 - Add patch for Perl 5.22 support - Add patch for GNUTLS 3.4 support * Tue Apr 21 2015 Scott R. Shinn - 1.0.1 - Initial build