Last active
July 1, 2018 00:37
-
-
Save Natolumin/9f18aee5c911f763b9ac to your computer and use it in GitHub Desktop.
PostSRSd Specfile (https://github.com/roehling/postsrsd)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: postsrsd | |
Version: 1.4 | |
Release: 3%{?dist} | |
Summary: A sender-envelope rewriter to comply with SPF forwarding for postfix | |
License: GPLv2+ | |
URL: https://github.com/roehling/postsrsd | |
Source0: https://github.com/roehling/%{name}/archive/%{version}.tar.gz | |
BuildRequires: cmake | |
BuildRequires: help2man | |
Requires(post): systemd | |
Requires(preun): systemd | |
Requires(postun): systemd | |
BuildRequires: systemd | |
Requires: coreutils postfix | |
%description | |
PostSRSd provides the Sender Rewriting Scheme (SRS) via TCP-based | |
lookup tables for Postfix. SRS is needed if your mail server acts | |
as forwarder. | |
%prep | |
%setup -q | |
%check | |
ctest -V %{?_smp_mflags} | |
%build | |
mkdir -p build | |
cd build | |
%cmake -DINIT_FLAVOR=systemd -DCONFIG_DIR=%{_sysconfdir}/sysconfig -DSYSD_UNIT_DIR=%{_unitdir} -DGENERATE_SRS_SECRET=OFF -DCHROOT_DIR=%{_sharedstatedir}/%{name} .. | |
make %{?_smp_mflags} | |
%install | |
%make_install | |
#mkdir -p %{buildroot}%{_sharedstatedir}/%{name} | |
%pre | |
if [ ! -f "%{_sysconfdir}/postsrsd.secret" ]; then | |
umask 077 | |
dd if=/dev/urandom bs=18 count=1 status=noxfer 2> /dev/null | base64 > %{_sysconfdir}/postsrsd.secret | |
fi | |
%preun | |
%systemd_preun postsrsd.service | |
%post | |
%systemd_post postsrsd.service | |
%postun | |
%systemd_postun_with_restart postsrsd.service | |
%files | |
%config(noreplace) %{_sysconfdir}/sysconfig/postsrsd | |
%{_unitdir}/postsrsd.service | |
%{_sbindir}/postsrsd | |
%doc %{_defaultdocdir}/postsrsd | |
%doc %{_mandir}/man8/postsrsd.8.gz | |
%attr(700, nobody, nobody) %dir %{_var}/lib/%{name} | |
%changelog | |
* Mon Feb 22 2016 Anatole Denis <natolumin@rezel.net> | |
- Stop using systemd_requires macro (not recommended by guidelines) | |
* Tue Feb 16 2016 Anatole Denis <natolumin@rezel.net> | |
- Version 1.4 | |
- Change the source URL to use github releases instead of tags | |
* Mon Dec 14 2015 Anatole Denis <natolumin@rezel.net> | |
- Version Bump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment