# Generated by go2rpm 1.19.0 %bcond check 1 %define goipath github.com/Odilhao/git-manager Name: golang-github-odilhao-git-manager Version: 0.0.5 Release: 0.0.5%{?dist} Summary: None License: MIT URL: https://github.com/Odilhao/git-manager Source0: git-manager-0.0.5.tar.gz BuildRequires: golang BuildRequires: go-rpm-macros BuildRequires: git-core Requires: git-core %description # FIXME %prep %setup -q -n git-manager-0.0.5 %build mkdir -p _gopath/src/github.com/Odilhao _build/bin ln -s "$(pwd)" _gopath/src/github.com/Odilhao/git-manager export GOPATH=$(pwd)/_gopath export GO111MODULE=on for cmd in cmd/* ; do go build -o _build/bin/$(basename $cmd) %{goipath}/$cmd done %install install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp _build/bin/git-manager %{buildroot}%{_bindir}/ install -D -m 0644 templates/completions/bash/git-manager %{buildroot}%{_datadir}/bash-completion/completions/git-manager install -D -m 0644 templates/completions/zsh/_git-manager %{buildroot}%{_datadir}/zsh/site-functions/_git-manager install -D -m 0644 templates/completions/fish/git-manager.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/git-manager.fish %check %if %{with check} export GOPATH=$(pwd)/_gopath export GO111MODULE=on go test -v ./... %endif %files %license LICENSE %doc docs templates/README.md templates/completions/README.md %{_bindir}/git-manager %{_datadir}/bash-completion/completions/git-manager %{_datadir}/zsh/site-functions/_git-manager %{_datadir}/fish/vendor_completions.d/git-manager.fish %changelog %autochangelog