diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d79c04 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/htmltest-0.10.3.tar.gz diff --git a/htmltest.spec b/htmltest.spec new file mode 100644 index 0000000..e5a8628 --- /dev/null +++ b/htmltest.spec @@ -0,0 +1,73 @@ +# Generated by go2rpm +%bcond_without check +%bcond_with network + +# https://github.com/wjdp/htmltest +%global goipath github.com/wjdp/htmltest +Version: 0.10.3 + +%gometa + +%global common_description %{expand: +htmltest runs your HTML output through a series of checks to ensure all your +links, images, scripts references work, your alt tags are filled in, et +cetera.} + +%global golicenses LICENCE +%global godocs README.md + +Name: htmltest +Release: 1%{?dist} +Summary: Test generated HTML for problems + +License: MIT +URL: %{gourl} +Source0: %{gosource} + +BuildRequires: golang(github.com/docopt/docopt-go) +BuildRequires: golang(github.com/fatih/color) >= 1.7.0 +BuildRequires: golang(github.com/imdario/mergo) >= 0.3.6 +BuildRequires: golang(golang.org/x/net/html) +BuildRequires: golang(gopkg.in/seborama/govcr.v2) >= 2.2.1 +BuildRequires: golang(gopkg.in/yaml.v2) >= 2.2.1 + +%if %{with check} +# Tests +BuildRequires: golang(github.com/daviddengcn/go-assert) +%endif + +%description +%{common_description} + +%gopkg + +%prep +%goprep + +%build +%gobuild -o %{gobuilddir}/bin/htmltest %{goipath} + +%install +%gopkginstall +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ + +%if %{with check} +%check +%if !%{with network} +# Skips TestAnchorExternalBrokenNoVCR and TestCacheIntegration +%global gotestflags %{gotestflags} -run ([^Rn]|[^o]n|[^i]on|[^t]ion|[^a]tion|[^r]ation)$ +%endif +%gocheck +%endif + +%files +%doc README.md +%license LICENCE +%{_bindir}/* + +%gopkgfiles + +%changelog +* Mon Jun 10 21:46:45 EDT 2019 Elliott Sales de Andrade - 0.10.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..4b3ac47 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (htmltest-0.10.3.tar.gz) = 3f90d5ab5a4df392421d781566c3bee45fa6baacb09f75f695953ab254eb979319bb48d39557b00bcc38955d731eb87d68ed8d987fc1f412ee06c4fec0046903