# Generated by go2rpm %bcond_without check # https://github.com/neurosnap/sentences %global goipath gopkg.in/neurosnap/sentences.v1 %global forgeurl https://github.com/neurosnap/sentences Version: 1.0.6 %gometa %global common_description %{expand: This command line utility will convert a blob of text into a list of sentences.} %global golicenses LICENSE.md %global godocs CHANGES.md README.md Name: %{goname} Release: %autorelease Summary: Multilingual command line sentence tokenizer in Golang License: MIT URL: %{gourl} Source0: %{gosource} # Remove in F43 Provides: golang-gopkg-neurosnap-sentences-1 = %{version}-%{release} Obsoletes: golang-gopkg-neurosnap-sentences-1 < 1.0.6-19 %global godevelheader %{expand: Provides: golang-gopkg-neurosnap-sentences-1-devel = %{version}-%{release} Obsoletes: golang-gopkg-neurosnap-sentences-1-devel < 1.0.6-19} %if %{with check} # Tests BuildRequires: golang(github.com/spf13/cobra) %endif %description %{common_description} %gopkg %prep %goprep find . -name "*.go" -exec sed -i "s|github.com/neurosnap/sentences|gopkg.in/neurosnap/sentences.v1|" "{}" +; %build for cmd in _cmd/sentences; 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}/ %if %{with check} %check %gocheck %endif %files %license LICENSE.md %doc CHANGES.md README.md %{_bindir}/* %gopkgfiles %changelog %autochangelog