From 3bfc21bc19541393d4295b2c500b11843e23a264 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Apr 23 2019 08:32:22 +0000 Subject: Update to new packaging Signed-off-by: Robert-André Mauchin --- diff --git a/golang-github-google-martian.spec b/golang-github-google-martian.spec index 958bd36..8608635 100644 --- a/golang-github-google-martian.spec +++ b/golang-github-google-martian.spec @@ -1,10 +1,12 @@ -# Run tests in check section +# Generated by go2rpm %bcond_without check # https://github.com/google/martian %global goipath github.com/google/martian Version: 2.1.0 +%gometa + %global common_description %{expand: Martian Proxy is a programmable HTTP proxy designed to be used for testing. @@ -12,65 +14,65 @@ Martian is a great tool to use if you want to: - Verify that all (or some subset) of requests are secure - Mock external services at the network layer - - Inject headers, modify cookies or perform other mutations of HTTP requests + - Inject headers, modify cookies or perform other mutations of HTTP requests and responses - Verify that pingbacks happen when you think they should - Unwrap encrypted traffic (requires install of CA certificate in browser) -By taking advantage of Go cross-compilation, Martian can be deployed anywhere +By taking advantage of Go cross-compilation, Martian can be deployed anywhere that Go can target.} -%gometa +%global golicenses LICENSE +%global godocs README.md Name: %{goname} -Release: 2%{?dist} -Summary: Library for building custom HTTP/S proxies +Release: 3%{?dist} +Summary: Library for building custom http/s proxies + +# Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} -BuildRequires: golang(golang.org/x/net/websocket) +BuildRequires: golang(golang.org/x/net/websocket) %description %{common_description} - -%package devel -Summary: %{summary} -BuildArch: noarch - -%description devel -%{common_description} - -This package contains library source intended for -building other packages which use import path with -%{goipath} prefix. - +%gopkg %prep -%forgeautosetup +%goprep +%build +for cmd in cmd/* ; do + %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd +done %install -%goinstall - +%gopkginstall +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check # https://github.com/google/martian/issues/271 -%gochecks -t marbl -t static -d body +%gocheck -t marbl -t static -d body %endif +%files +%license %{golicenses} +%doc %{godocs} +%{_bindir}/* -%files devel -f devel.file-list -%license LICENSE -%doc README.md - +%gopkgfiles %changelog +* Tue Apr 23 10:11:39 CEST 2019 Robert-André Mauchin - 2.1.0-3 +- Update to new packaging + * Fri Feb 01 2019 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Oct 05 2018 Robert-André Mauchin - 2.1.0-1 - First package for Fedora -