Browse Source

updated 2 packages

postforward-1.1.1-1

postsrsd-1.6-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@12369 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 4 years ago
parent
commit
b45a59c618
2 changed files with 230 additions and 0 deletions
  1. 55 0
      p/postforward/postforward-vl.spec
  2. 175 0
      p/postsrsd/postsrsd-vl.spec

+ 55 - 0
p/postforward/postforward-vl.spec

@@ -0,0 +1,55 @@
+Summary:        Postfix SRS forwarding agent
+Summary(ja):    Postfix SRS 転送エージェント
+Name:           postforward
+Version:        1.1.1
+Release:        1%{?_dist_release}
+
+Vendor:         Project Vine
+Distribution:   Vine Linux
+
+License:        BSD
+URL:            https://github.com/zoni/postforward
+Source0:        https://github.com/zoni/postforward/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+
+Requires:       postsrsd
+BuildRequires:  golang
+BuildRoot:      %{_tmppath}/%{name}-%{version}-root
+
+
+%description
+ Postforward is a mail forwarding utility which aims to compliment the Postfix
+Sender Rewriting Scheme daemon (PostSRSd).
+
+%description -l ja
+ Postforwardは、Postfix Sender Rewriting Schemeデーモン(PostSRSd)を補完
+することを目的としたメール転送ユーティリティです。
+
+
+%prep
+%setup -q
+
+
+%build
+%{__make} %{?_smp_mflags}
+
+
+%install
+%{__rm} -rf %{buildroot}
+mkdir -p %{buildroot}%{_sbindir}
+install -m755 postforward %{buildroot}%{_sbindir}
+
+
+%clean
+%{__rm} -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root)
+%license LICENSE.txt
+%doc README.md CHANGES.md
+%{_sbindir}/*
+
+
+%changelog
+* Thu Apr 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.1-1
+- initial build for Vine Linux

+ 175 - 0
p/postsrsd/postsrsd-vl.spec

@@ -0,0 +1,175 @@
+%bcond_with systemd
+
+Name:           postsrsd
+Version:        1.6
+Release:        1%{?_dist_release}%{?with_systemd:.systemd}
+Summary:        Sender Rewriting Scheme (SRS) provider
+
+Vendor:         Project Vine
+Distribution:   Vine Linux
+
+License:        GPLv2+
+URL:            https://github.com/roehling/postsrsd
+Source0:        https://github.com/roehling/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
+
+BuildRequires:  gcc
+BuildRequires:  cmake
+BuildRequires:  help2man
+
+%if %{with systemd}
+%{?systemd_requires}
+%else
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
+Requires(postun): /sbin/service
+%endif
+
+%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
+%autosetup -n %{name}-%{version}
+mkdir build
+cd build && %cmake \
+%if %{with systemd}
+	-DINIT_FLAVOR=systemd \
+%else
+	-DINIT_FLAVOR=sysv-redhat \
+%endif
+	-DGENERATE_SRS_SECRET=OFF \
+	-DUSE_SELINUX=OFF \
+	..
+
+
+%build
+%make_build -C build
+
+
+%install
+rm -rf %{buildroot}
+%make_install -C build
+
+%if %{with systemd}
+mkdir -p %{buildroot}/%{_unitdir}
+mv -f %{buildroot}/%{_sysconfdir}/systemd/system/%{name}.service \
+	%{buildroot}%{_unitdir}/
+%else
+mkdir -p %{buildroot}/%{_initdir}
+mv -f %{buildroot}/%{_sysconfdir}/init.d/postsrsd %{buildroot}%{_initdir}/
+%endif
+
+# %%ghost file requires it is present in the build root
+touch %{buildroot}/%{_sysconfdir}/postsrsd.secret
+
+# chroot directory
+# (also move default config which is in the way)
+sed -i 's/^CHROOT=.*/CHROOT=\/run\/postsrsd/' %{buildroot}/%{_sysconfdir}/default/%{name}
+
+
+%files
+%license LICENSE
+%ghost %{_sysconfdir}/postsrsd.secret
+%config(noreplace) %{_sysconfdir}/default/%{name}
+%if %{with systemd}
+%{_unitdir}/postsrsd.service
+%else
+%{_initdir}/postsrsd
+%endif
+%{_sbindir}/postsrsd
+%{_docdir}/%{name}
+%{_mandir}/man8/postsrsd.8.gz
+
+
+%post
+[ -f %{_sysconfdir}/postsrsd.secret ] || dd if=/dev/urandom bs=18 count=1 2>/dev/null | base64 >%{_sysconfdir}/postsrsd.secret
+%if %{with systemd}
+%systemd_post %{name}.service
+%else
+/sbin/chkconfig --add postsrsd
+%endif
+
+%preun
+%if %{with systemd}
+%systemd_preun %{name}.service
+%else
+if [ $1 -eq 0 -o -x /bin/systemctl ]; then
+	/sbin/service %{name} stop
+	/sbin/chkconfig --del %{name}
+fi
+%endif
+
+%postun
+%if %{with systemd}
+%systemd_postun_with_restart %{name}.service
+%else
+if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then
+  /sbin/service %{name} condrestart 
+fi
+%endif
+
+
+%changelog
+* Thu Apr 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.6-1
+- new upstream release.
+- added systemd support (disabled as default).
+
+* Sat Jan 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.5-1
+- initial build for Vine Linux.
+- new upstream release.
+
+* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-11.20170118gita77bf99
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-10.20170118gita77bf99
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
+* Wed Oct 04 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-9.20170118gita77bf99
+- use the %%ghost feature to ensure the secret file is owned by the package
+- it is then not necessary to handle its removal in %%postun
+
+* Thu Sep 28 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-8.20170118gita77bf99
+- Thanks Matthias Runge Mauchin for the review
+- break description line too long
+- build dependency on gcc is not needed
+
+* Wed Sep 27 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-7.20170118gita77bf99
+- make the changelog more readable
+- stop recreating buildroot, it is made clean already
+
+* Wed Aug 23 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-6.20170118gita77bf99
+- remove unnecessary Requires on make
+- use _sysconfdir macro
+- use name macro when it makes sense
+- remove unnecessary %%doc as the buildsys already populates docdir
+
+* Tue Aug 22 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-5.20170118gita77bf99
+- remove %%clean section, not needed in Fedora
+
+* Tue Aug 22 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-4.20170118gita77bf99
+- don't remove secret file during upgrade
+- start service at the end of post scriptlet
+- improve SELinux rules handling (now requires a running SELinux)
+
+* Tue Aug 22 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-3.20170118gita77bf99
+- Thanks Robert-André Mauchin for the review
+- snapshot is packaged to get this necessary fix: https://github.com/roehling/postsrsd/pull/65
+- fixed version
+- fixed source URL
+- use macros for standard paths and build steps
+- add missing systemd scriptlets
+- specify doc and license files
+- remove unnecessary Requires on base64
+- remove Group information unsupported in Fedora
+
+* Fri Apr 14 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-2
+- create /etc/postsrsd.secret if missing
+- move systemd config into directory for packages
+- move chroot directory into /run
+- autocreate chroot directory
+
+* Thu Mar 30 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-1
+- initial packaging
+