File clamsap.spec of Package clamsap.18690

#
# spec file for package clamsap
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%ifarch x86_64
  %define platnum   64
  %define platdir   lib64
  %define platstr   64 bit
  %define platform  linuxx86_64
%else
  %define platnum   32
  %define platdir   lib
  %define platstr   32 bit
  %define platform  linuxintel
%endif

%define packname    clamsap-%{version}
%define requiresp   clamav >= 0.96
%define inslibdir   /usr/%{platdir}

Summary:        Virus Scan Adapter (VSA) for ClamAV
Name:           clamsap
Version:        0.101.9
Release:        0
License:        MIT
Group:          Productivity/Security
Source:         %{name}-%{version}.tar.gz
Source1:        clamsap-on-sles4sap.pdf
URL:            http://sourceforge.net/projects/clamsap/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       %{packname}
Requires:       %{requiresp}
BuildRequires:  %{requiresp}
%if 0%{?suse_version} >= 1030
BuildRequires:  automake
BuildRequires:  check-devel
BuildRequires:  libbz2-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libtool
%endif
%if 0%{?suse_version} >= 1500
BuildRequires:  clamav-devel
%endif
# additional build dependencies for Fedora/RedHat/SLES10
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?suse_version} == 1010
BuildRequires:  gcc-c++
%endif

%description
This package provides two %{platstr} shared libraries which link SAP (NW-VSI) and ClamAV
The library clamsap links directly to clamav engine library, the library clamdsap uses the clamd
scan daemon to scan for viruses. Both libraries enable a SAP system to perform antivirus scans.

Authors:
--------
    Markus Strehle

%prep

%setup
chmod 644 AUTHORS ChangeLog COPYING COPYING.clamav COPYING.vsa INSTALL NEWS  README
cp %{S:1} ./

%build
autoreconf --force --install
%configure
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT/%_libdir/*.la
rm -rf $RPM_BUILD_ROOT/%_libdir/*.a

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc AUTHORS ChangeLog COPYING COPYING.clamav COPYING.vsa INSTALL NEWS  README clamsap-on-sles4sap.pdf
%defattr(-,root,root,-)
%_libdir/lib*

%changelog
openSUSE Build Service is sponsored by