Blob Blame History Raw
# Generated by go2rpm
%bcond_without check

# https://github.com/joho/godotenv
%global goipath         github.com/joho/godotenv
Version:                1.4.0

%gometa

%global common_description %{expand:
A Go port of Ruby's dotenv library (Loads environment variables from `.env`.).}

%global golicenses      LICENCE
%global godocs          README.md

# Remove in F33:
%global godevelheader %{expand:
Obsoletes:      golang-github-joho-godotenv-unit-test-devel < 1.3.0-2
}

Name:           godotenv
Release:        %autorelease
Summary:        A Go port of Ruby's dotenv library

License:        MIT
URL:            %{gourl}
Source0:        %{gosource}

%description
%{common_description}

%gopkg

%prep
%goprep

%build
for cmd in cmd/* ; 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 LICENCE
%doc README.md
%{_bindir}/godotenv

%gopkgfiles

%changelog
%autochangelog