diff --git a/anda/langs/go/lazygit/anda.hcl b/anda/langs/go/lazygit/anda.hcl new file mode 100644 index 0000000000..431fcfe464 --- /dev/null +++ b/anda/langs/go/lazygit/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "golang-github-jesseduffield-lazygit.spec" + } +} diff --git a/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec b/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec new file mode 100644 index 0000000000..bd9db6e08b --- /dev/null +++ b/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec @@ -0,0 +1,54 @@ +# Generated by go2rpm 1.15.0 + +# https://github.com/jesseduffield/lazygit +%global goipath github.com/jesseduffield/lazygit +Version: 0.46.0 + +%gometa -f + +%global common_description %{expand: +Simple terminal UI for git commands.} + +%global golicenses LICENSE +%global godocs docs README.md VISION.md + +Name: golang-github-jesseduffield-lazygit +Release: 1%{?dist} +Summary: Simple terminal UI for git commands + +License: MIT +URL: %{gourl} +Source: %{gosource} +Packager: sadlerm + +BuildRequires: anda-srpm-macros + +Provides: lazygit = %{version}-%{release} + +%description %{common_description} + +%gopkg + +%prep +%goprep +%go_prep_online + +%build +go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ + -ldflags "-X main.version=%{version} \ + -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ + -compressdwarf=false -linkmode=external \ + -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ + -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ + -Wl,--build-id=sha1'" \ + -o %{gobuilddir}/bin/lazygit %{goipath} + +%install +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ + +%files +%license LICENSE +%doc docs README.md VISION.md +%{_bindir}/lazygit + diff --git a/anda/langs/go/lazygit/update.rhai b/anda/langs/go/lazygit/update.rhai new file mode 100644 index 0000000000..de72a07150 --- /dev/null +++ b/anda/langs/go/lazygit/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("jesseduffield/lazygit"));