# Generated by go2rpm 1.18.0 %bcond check 1 %global debug_package %{nil} %global shortcommit 6a62575 %global compiledate December\ 31,\ 2025 # https://github.com/zyedidia/micro %global goipath github.com/zyedidia/micro Version: 2.0.15 %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 BuildRequires: desktop-file-utils BuildRequires: libappstream-glib %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/ # desktop file + AppStream metainfo desktop-file-install --dir=%{buildroot}%{_datadir}/applications assets/packaging/%{name}.desktop install -Dpm 0644 data/io.github.zyedidia.%{name}.metainfo.xml \ -t %{buildroot}%{_metainfodir}/ %check %go_vendor_license_check -c %{S:2} desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop appstream-util validate-relax --nonet \ %{buildroot}%{_metainfodir}/io.github.zyedidia.%{name}.metainfo.xml %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* %{_datadir}/applications/%{name}.desktop %{_metainfodir}/io.github.zyedidia.%{name}.metainfo.xml %changelog %autochangelog