File clamsap.spec of Package clamsap

#
# spec file for package clamsap
#
# Copyright (c) 2025 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/
#

%define packname    clamsap-%{version}
%define requiresp   clamav >= 0.96
Summary:        Virus Scan Adapter (VSA) for ClamAV
Name:           clamsap
Version:        0.104.3
Release:        0
License:        MIT
Group:          Productivity/Security
Source:         https://sourceforge.net/projects/clamsap/files/source/clamsap-%{version}.tar.gz
Source1:        LICENSE
URL:            https://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
ExclusiveArch:  aarch64 ppc64le x86_64

%description
This package provides two 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
cp %{SOURCE1} ./

%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
%license LICENSE
%defattr(-,root,root,-)
%_libdir/lib*

%changelog
openSUSE Build Service is sponsored by