## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## 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.9.0 %bcond_without check # https://github.com/fortio/fortio %global goipath fortio.org/fortio %global forgeurl https://github.com/fortio/fortio Version: 1.60.2 %gometa -f %global goname fortio %global godevelname fortio-devel %global common_description %{expand: Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.} %global golicenses LICENSE %global godocs docs CONTRIBUTING.md README.md SECURITY.md Name: %{goname} Release: %autorelease Summary: Fortio load testing library, command line tool, advanced echo server and web UI License: Apache-2.0 URL: %{gourl} Source: %{gosource} BuildRequires: openssl BuildRequires: make %description %{common_description} %gopkg %prep %goprep %autopatch -p1 # remove deprecated rm -rf dflag log %generate_buildrequires %go_generate_buildrequires %build %gobuild -o %{gobuilddir}/bin/fortio %{goipath} for cmd in fcurl echosrv histogram; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dm 0644 -vp docs/fortio.1 -t %{buildroot}%{_mandir}/man1/ %if %{with check} %check make certs # requires network for test in "TestDNSPing" "TestDebugMode" "TestDefaultPort" "TestInvalidRequest" \ "TestPayloadForClient" "TestPayloadForFastClient" "TestInsecureRequest" \ "TestHTTPRunner" "TestDNSMethods" "TestUnixDomain" "TestSmallReadUntil" \ "TestSmallReadUntilTimeOut" "TestResolveDestinationMultipleIps" "TestProxy" \ "TestHTTPRunnerRESTApi" "TestGRPCRunner" "TestPingServer" "TestReresolveDNS" \ "TestNewHTTPRequest" "TestHTTPRunnerRESTApiBadHost" \ ; do awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) done %gocheck %endif %files %license LICENSE %doc docs CONTRIBUTING.md README.md SECURITY.md %{_bindir}/fortio %{_bindir}/fcurl %{_bindir}/echosrv %{_bindir}/histogram %{_mandir}/man1/fortio.1* %gopkgfiles %changelog * Tue Oct 03 2023 John Doe - 1.60.2-1 - Uncommitted changes