%global debug_package %{nil} %global commit 319871ca5d15c5b83e32175e53ac9a7dd699efa4 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20201018 Name: lazypodman Version: 0 Release: 2.%{date}git%{shortcommit}%{?dist} Summary: Simple terminal UI for both podman pods and podman-compose, written in Go License: MIT URL: https://github.com/BentoBox-Project/lazypodman Source0: %{url}/archive/%{commit}/%{name}-%{version}.%{date}git%{shortcommit}.tar.gz BuildRequires: btrfs-progs-devel BuildRequires: device-mapper-devel BuildRequires: git-core BuildRequires: golang >= 1.12 BuildRequires: gpgme-devel %if 0%{?fedora} || 0%{?el7} BuildRequires: go-md2man %endif Requires: podman%{?_isa} %description A simple terminal UI for both podman pods and podman-compose, written in Go. %prep %autosetup -n %{name}-%{commit} -p1 %build go get go build \ -ldflags "-X main.version=%{version}" \ -o _build/%{name} %if 0%{?fedora} || 0%{?el7} # Man page go-md2man -in README.md -out %{name}.1 %endif %install install -Dp -m0755 _build/%{name} %{buildroot}%{_bindir}/%{name} %if 0%{?fedora} || 0%{?el7} # Man page install -Dp -m0644 %{name}.1 %{buildroot}/%{_mandir}/man1/%{name}.1 %endif %files %doc README.md %{_bindir}/%{name} %if 0%{?fedora} || 0%{?el7} %{_mandir}/man1/*.1* %endif %changelog * Mon Oct 12 2020 Artem Polishchuk - 0-1.20201011git2177f94 - Initial package