Blame golang-github-google-martian.spec

3bfc21b
# Generated by go2rpm
084ee8d
%bcond_without check
084ee8d
084ee8d
# https://github.com/google/martian
084ee8d
%global goipath         github.com/google/martian
d349c48
Version:                3.0.0
084ee8d
58310e6
%global goaltipaths     github.com/google/martian/v3
58310e6
3bfc21b
%gometa
3bfc21b
084ee8d
%global common_description %{expand:
084ee8d
Martian Proxy is a programmable HTTP proxy designed to be used for testing.
084ee8d
084ee8d
Martian is a great tool to use if you want to:
084ee8d
084ee8d
 - Verify that all (or some subset) of requests are secure
084ee8d
 - Mock external services at the network layer
3bfc21b
 - Inject headers, modify cookies or perform other mutations of HTTP requests
084ee8d
   and responses
084ee8d
 - Verify that pingbacks happen when you think they should
084ee8d
 - Unwrap encrypted traffic (requires install of CA certificate in browser)
084ee8d
3bfc21b
By taking advantage of Go cross-compilation, Martian can be deployed anywhere
084ee8d
that Go can target.}
084ee8d
3bfc21b
%global golicenses      LICENSE
3bfc21b
%global godocs          README.md
084ee8d
084ee8d
Name:           %{goname}
58310e6
Release:        4%{?dist}
854eac0
Summary:        Library for building custom HTTP/S proxies
3bfc21b
3bfc21b
# Upstream license specification: Apache-2.0
084ee8d
License:        ASL 2.0
084ee8d
URL:            %{gourl}
084ee8d
Source0:        %{gosource}
ab60a51
# https://github.com/google/martian/issues/309
ab60a51
Patch0:         0001-Bypass-flag.Parse-in-init.patch
084ee8d
3bfc21b
BuildRequires:  golang(golang.org/x/net/websocket)
084ee8d
084ee8d
%description
084ee8d
%{common_description}
084ee8d
3bfc21b
%gopkg
084ee8d
084ee8d
%prep
3bfc21b
%goprep
ab60a51
%patch0 -p1
084ee8d
3bfc21b
%build
3bfc21b
for cmd in cmd/* ; do
3bfc21b
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
3bfc21b
done
084ee8d
084ee8d
%install
3bfc21b
%gopkginstall
3bfc21b
install -m 0755 -vd                     %{buildroot}%{_bindir}
3bfc21b
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
084ee8d
084ee8d
%if %{with check}
084ee8d
%check
58ebffb
# https://github.com/google/martian/issues/271
4305930
# cmd/proxy: needs network
4305930
%gocheck -t marbl -t static -d body -d cmd/proxy
084ee8d
%endif
084ee8d
3bfc21b
%files
3bfc21b
%license %{golicenses}
3bfc21b
%doc %{godocs}
3bfc21b
%{_bindir}/*
084ee8d
3bfc21b
%gopkgfiles
084ee8d
084ee8d
%changelog
58310e6
* Wed Jul 22 17:58:38 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 3.0.0-4
58310e6
- Add alternate goipath
58310e6
ab60a51
* Fri Jan 31 16:35:28 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 3.0.0-3
ab60a51
- Fix FTBFS with Go 1.13+
ab60a51
38ec0de
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-2
38ec0de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
38ec0de
d349c48
* Wed Jul 24 22:59:12 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 3.0.0-1
d349c48
- Release 3.0.0
d349c48
3bfc21b
* Tue Apr 23 10:11:39 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 2.1.0-3
3bfc21b
- Update to new packaging
3bfc21b
06541f0
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
06541f0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
06541f0
084ee8d
* Fri Oct 05 2018 Robert-André Mauchin <zebob.m@gmail.com> - 2.1.0-1
084ee8d
- First package for Fedora