# Generated by go2rpm 1.16.0 %bcond check 1 %global debug_package %{nil} %global shortcommit 04c5770 %global compiledate June\ 01,\ 2025 # https://github.com/zyedidia/micro %global goipath github.com/zyedidia/micro Version: 2.0.14 %gometa -L -f %global common_description %{expand: A modern and intuitive terminal-based text editor.} Name: micro Release: %autorelease -e 2 Summary: A modern and intuitive terminal-based text editor # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: https://github.com/RebornRider/copr-packages/releases/download/source-artefacts/%{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: make BuildRequires: go-vendor-tools %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build export LDFLAGS="$LDFLAGS -X 'github.com/zyedidia/micro/internal/util.Version=%{version}' \ -X 'github.com/zyedidia/micro/internal/util.CommitHash=%{shortcommit}' \ -X 'github.com/zyedidia/micro/internal/util.CompileDate=%{compiledate}' \ -X 'github.com/zyedidia/micro/internal/util.Debug=OFF'" go generate ./runtime for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/%{name} %{buildroot}%{_bindir}/ # man page install -Dpm 0644 assets/packaging/%{name}.1 -t %{buildroot}%{_mandir}/man1/ %check %go_vendor_license_check -c %{S:2} %if %{with check} go test ./internal/... go test ./cmd/... %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md runtime/README.md runtime/help/colors.md runtime/help/commands.md %doc runtime/help/copypaste.md runtime/help/defaultkeys.md runtime/help/help.md %doc runtime/help/keybindings.md runtime/help/options.md runtime/help/plugins.md %doc runtime/help/tutorial.md runtime/plugins/comment/help/comment.md %doc runtime/plugins/linter/help/linter.md runtime/plugins/literate/README.md %doc runtime/plugins/status/help/status.md runtime/syntax/README.md %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %changelog %autochangelog