## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.17.1 %bcond check 1 # https://github.com/decke/smtprelay %global goipath github.com/decke/smtprelay Version: 1.12.0 %gometa -L -f Name: smtprelay Release: %autorelease Summary: Simple Golang SMTP relay/proxy server # Generated by go-vendor-tools License: Apache-2.0 AND BSD-3-Clause AND ISC AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: smtprelay.service Source4: smtprelay.sysusers BuildRequires: go-vendor-tools BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} %description Simple Golang SMTP relay/proxy server. %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %global gomodulesmode GO111MODULE=on export GO_LDFLAGS="-X main.appVersion=%{version} \ -X main.buildTime=$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%dT%H:%M:%SZ)" %gobuild -o %{gobuilddir}/bin/smtprelay %{goipath} %install %go_vendor_license_install -c %{S:2} # Binary install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ # Config file install -m 0755 -vd %{buildroot}%{_sysconfdir} install -m 0750 -vd %{buildroot}%{_sysconfdir}/smtprelay install -m 0640 -vp smtprelay.ini %{buildroot}/%{_sysconfdir}/smtprelay # Systemd unit and sysusers install -D -p -m 0644 %{S:3} %{buildroot}%{_unitdir}/smtprelay.service install -D -p -m 0644 %{S:4} %{buildroot}%{_sysusersdir}/smtprelay.conf %check %go_vendor_license_check -c %{S:2} %if %{with check} %gotest ./... %endif %pre %sysusers_create_compat %{S:4} %post %systemd_post smtprelay.service %preun %systemd_preun smtprelay.service %postun %systemd_postun_with_restart smtprelay.service %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md SECURITY.md %{_bindir}/smtprelay %dir %attr(0750,root,smtprelay) %config(noreplace) %{_sysconfdir}/smtprelay %attr(0640,root,smtprelay) %config(noreplace) %{_sysconfdir}/smtprelay/smtprelay.ini %{_unitdir}/smtprelay.service %{_sysusersdir}/smtprelay.conf %changelog ## START: Generated by rpmautospec * Tue Sep 09 2025 Neel Chauhan - 1.12.0-1 - Initial import (fedora#2393738). ## END: Generated by rpmautospec