|
|
eb17c77 |
%global reponame popub
|
|
|
eb17c77 |
%global commit 6ffa11c634c1aa877d3f4b79ada19b8e6a92dae9
|
|
|
eb17c77 |
%global commitdate 20171007
|
|
|
eb17c77 |
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
eb17c77 |
%if 0%{!?_unitdir:1}
|
|
|
eb17c77 |
%global _unitdir /usr/lib/systemd/system
|
|
|
eb17c77 |
%endif
|
|
|
eb17c77 |
|
|
|
eb17c77 |
Name: %{reponame}
|
|
|
eb17c77 |
Version: 0
|
|
|
b24d486 |
Release: 0.8.%{commitdate}git%{shortcommit}%{?dist}
|
|
|
eb17c77 |
Summary: Publish a service from localhost onto your server
|
|
|
eb17c77 |
License: GPLv3+
|
|
|
eb17c77 |
URL: https://github.com/m13253/%{name}
|
|
|
eb17c77 |
Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
|
|
eb17c77 |
|
|
|
eb17c77 |
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 %{arm}}
|
|
|
eb17c77 |
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
|
|
eb17c77 |
%{?systemd_requires}
|
|
|
eb17c77 |
BuildRequires: systemd
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%if ! 0%{?gobuild:1}
|
|
|
eb17c77 |
%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
|
|
|
eb17c77 |
%endif
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%if ! 0%{?gotest:1}
|
|
|
eb17c77 |
%define gotest() go test -ldflags "${LDFLAGS:-}" %{?**}
|
|
|
eb17c77 |
%endif
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%description
|
|
|
eb17c77 |
%{summary}.
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%package local
|
|
|
eb17c77 |
Summary: Publish a service from localhost onto your server - client side
|
|
|
eb17c77 |
Provides: portpub-local%{?_isa} = %{version}-%{release}
|
|
|
eb17c77 |
Obsoletes: portpub-local <= 0-0.2
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%description local
|
|
|
eb17c77 |
%{summary}.
|
|
|
eb17c77 |
Local side package.
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%package relay
|
|
|
eb17c77 |
Summary: Publish a service from localhost onto your server - server side
|
|
|
eb17c77 |
Provides: portpub-relay%{?_isa} = %{version}-%{release}
|
|
|
eb17c77 |
Obsoletes: portpub-relay <= 0-0.2
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%description relay
|
|
|
eb17c77 |
%{summary}.
|
|
|
eb17c77 |
Server side package.
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%prep
|
|
|
eb17c77 |
%setup -q -n %{name}-%{commit}
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%build
|
|
|
eb17c77 |
cd %{reponame}-local
|
|
|
eb17c77 |
%gobuild -o %{reponame}-local
|
|
|
eb17c77 |
|
|
|
eb17c77 |
cd ../%{reponame}-relay
|
|
|
eb17c77 |
%gobuild -o %{reponame}-relay
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%install
|
|
|
eb17c77 |
sed -i '/daemon-reload/d' systemd/Makefile
|
|
|
eb17c77 |
%make_install PREFIX=%{_prefix}
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%post local
|
|
|
eb17c77 |
%systemd_post %{name}-local@.service
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%preun local
|
|
|
eb17c77 |
%systemd_preun %{name}-local@.service
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%postun local
|
|
|
eb17c77 |
%systemd_postun_with_restart %{name}-local@.service
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%post relay
|
|
|
eb17c77 |
%systemd_post %{name}-relay@.service
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%preun relay
|
|
|
eb17c77 |
%systemd_preun %{name}-relay@.service
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%postun relay
|
|
|
eb17c77 |
%systemd_postun_with_restart %{name}-relay@.service
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%files local
|
|
|
eb17c77 |
%doc README.md
|
|
|
eb17c77 |
%license COPYING
|
|
|
eb17c77 |
%{_bindir}/%{name}-local
|
|
|
eb17c77 |
%dir %{_sysconfdir}/%{name}
|
|
|
eb17c77 |
%config(noreplace) %{_sysconfdir}/%{name}/local
|
|
|
eb17c77 |
%{_unitdir}/%{name}-local@.service
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%files relay
|
|
|
eb17c77 |
%doc README.md
|
|
|
eb17c77 |
%license COPYING
|
|
|
eb17c77 |
%{_bindir}/%{name}-relay
|
|
|
eb17c77 |
%dir %{_sysconfdir}/%{name}
|
|
|
eb17c77 |
%config(noreplace) %{_sysconfdir}/%{name}/relay
|
|
|
eb17c77 |
%{_unitdir}/%{name}-relay@.service
|
|
|
eb17c77 |
|
|
|
eb17c77 |
%changelog
|
|
|
b24d486 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.8.20171007git6ffa11c
|
|
|
b24d486 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
b24d486 |
|
|
|
9c7d720 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.7.20171007git6ffa11c
|
|
|
9c7d720 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
9c7d720 |
|
|
|
625b55a |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.6.20171007git6ffa11c
|
|
|
625b55a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
625b55a |
|
|
|
68aff20 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.5.20171007git6ffa11c
|
|
|
68aff20 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
68aff20 |
|
|
|
387d6fc |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.4.20171007git6ffa11c
|
|
|
387d6fc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
387d6fc |
|
|
|
eb17c77 |
* Mon Oct 16 2017 Zamir SUN <zsun@fedoraproject.org> - 0-0.3.20171007git6ffa11c
|
|
|
eb17c77 |
- Update to newest upstream.
|
|
|
eb17c77 |
|
|
|
eb17c77 |
* Mon Oct 02 2017 Zamir SUN <zsun@fedoraproject.org> - 0-0.2.20170920git4698f9a
|
|
|
eb17c77 |
- Add support for EPEL
|
|
|
eb17c77 |
|
|
|
eb17c77 |
* Mon Sep 18 2017 mosquito <sensor.wen@gmail.com> - 0-0.1.20170406git25cf44e
|
|
|
eb17c77 |
- Rename to popub
|
|
|
eb17c77 |
- Improve makefile
|
|
|
eb17c77 |
|
|
|
eb17c77 |
* Sat Sep 09 2017 Zamir SUN <zsun@fedoraproject.org> - 0-0.1.20170406gitccd226a
|
|
|
eb17c77 |
- Initial with git version ccd226a.
|