2015-02-20 12:33:28 +01:00
|
|
|
#
|
|
|
|
# spec file for package postsrsd
|
|
|
|
#
|
2023-01-07 16:14:54 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2015-02-20 12:33:28 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-12-20 01:51:35 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-02-20 12:33:28 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: postsrsd
|
2023-01-07 16:14:54 +01:00
|
|
|
Version: 2.0.2
|
2015-02-20 12:33:28 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Sender Rewriting Support for postfix
|
2019-12-20 01:51:35 +01:00
|
|
|
License: GPL-2.0-only
|
2015-02-20 12:33:28 +01:00
|
|
|
Group: Productivity/Networking/Email/Servers
|
2019-12-20 01:51:35 +01:00
|
|
|
URL: https://github.com/roehling/postsrsd
|
2015-02-20 12:33:28 +01:00
|
|
|
|
2019-12-20 01:51:35 +01:00
|
|
|
Source: https://github.com/roehling/postsrsd/archive/%version.tar.gz
|
2023-01-07 16:14:54 +01:00
|
|
|
BuildRequires: cmake >= 3.14
|
2015-02-20 12:33:28 +01:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2023-01-07 16:14:54 +01:00
|
|
|
BuildRequires: pkgconfig(libconfuse)
|
|
|
|
BuildRequires: pkgconfig(sqlite3)
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
2015-02-20 12:33:28 +01:00
|
|
|
|
|
|
|
%description
|
2021-04-26 17:48:31 +02:00
|
|
|
PostSRSd provides the Sender Rewriting Scheme (SRS) via TCP-based
|
2015-02-20 12:33:28 +01:00
|
|
|
lookup tables for Postfix. SRS is needed if your mail server acts
|
|
|
|
as forwarder.
|
|
|
|
|
|
|
|
%prep
|
2019-12-20 01:51:35 +01:00
|
|
|
%autosetup -p1
|
2015-02-20 12:33:28 +01:00
|
|
|
|
|
|
|
%build
|
2023-01-07 16:14:54 +01:00
|
|
|
%cmake -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS \
|
|
|
|
-DGENERATE_SRS_SECRET=0 -DCHROOT_DIR=/var/lib/empty \
|
|
|
|
-DUSE_APPARMOR=1 -DINIT_FLAVOR=systemd \
|
|
|
|
-DWITH_SQLITE=BOOL:ON -DBUILD_TESTING:BOOL=OFF
|
2015-02-20 12:33:28 +01:00
|
|
|
%make_jobs
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
b="%buildroot"
|
2023-01-07 16:14:54 +01:00
|
|
|
mkdir -p "$b/%_defaultdocdir"
|
2015-02-20 12:33:28 +01:00
|
|
|
mv "$b/%_datadir/doc/%name" "$b/%_defaultdocdir/"
|
2023-01-07 16:14:54 +01:00
|
|
|
cp README.rst "$b/%_defaultdocdir/%name/"
|
2015-02-20 12:33:28 +01:00
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre postsrsd.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
s="%_sysconfdir/postsrsd.secret"
|
|
|
|
if [ ! -e "$s" ]; then
|
|
|
|
echo "No postsrsd secret found in $s, generating one."
|
|
|
|
dd if=/dev/urandom of="$s" bs=64 count=1
|
|
|
|
fi
|
|
|
|
%service_add_post postsrsd.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun postsrsd.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun postsrsd.service
|
|
|
|
|
|
|
|
%files
|
|
|
|
%_sbindir/postsrsd
|
2023-01-07 16:14:54 +01:00
|
|
|
%_unitdir/*
|
2015-02-20 12:33:28 +01:00
|
|
|
%_docdir/%name/
|
2023-01-07 16:14:54 +01:00
|
|
|
%license LICENSES/*
|
2015-02-20 12:33:28 +01:00
|
|
|
|
|
|
|
%changelog
|