File vbsfilter.spec of Package vbsfilter

#
# spec file for package vbsfilter
#
# Copyright (c) 2025 Barry Nelson
#
# 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.
#

Name:           vbsfilter
Summary:        VBSFilter Milter for a Mail Server
License:        Apache-2.0
Group:          Productivity/Networking/Email/Servers
Version:        1.15
Release:        lp156.0.0
Source0:        %{name}-%{version}.tar.gz
Source1:        vbsfilter.service
Source2:        vbs.pre
Source3:        vbsfilter.8
#BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#PreReq:         bash /bin/echo /bin/mv
BuildRequires:  sendmail-devel
BuildRequires:  libnsl-devel
Requires:       libnsl2
#BuildRequires:  gcc <= 13
#BuildRequires:  libspf2-devel
#Requires:       libspf2-2
#Requires:       pam

%description
This package contains the VBS filter milter

%prep
%setup

%build
#export CFLAGS="$RPM_OPT_FLAGS -DSSL_get_peer_certificate=SSL_get1_peer_certificate -DOPENSSL_NO_DEPRECATED -DDISABLE_POP_PROXY=1 -fPIC -fno-strict-aliasing -fstack-protector"
make

%install
mkdir -p /usr/sbin
install -d -m 755 %{buildroot}%{_prefix}/sbin
install -c -m 555 vbsfilter %{buildroot}%{_prefix}/sbin
mkdir -p %{buildroot}/usr/lib/systemd/system || true
install -c -m 555 %{SOURCE1} %{buildroot}/usr/lib/systemd/system
mkdir -p %{buildroot}/etc/mail/system || true
install -c -m 555 %{SOURCE2} %{buildroot}/etc/mail/system
mkdir -p %{buildroot}/usr/share/man/man8 || true
install -c -m 644 %{SOURCE3} %{buildroot}/usr/share/man/man8
gzip -9 %{buildroot}/usr/share/man/man8/vbsfilter.8

%post

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-,root,root)
%dir /etc/mail
%dir /etc/mail/system
%{_prefix}/sbin/vbsfilter
/usr/lib/systemd/system/vbsfilter.service
/etc/mail/system/vbs.pre
/usr/share/man/man8/vbsfilter.8.gz

%changelog
openSUSE Build Service is sponsored by