# Generated by go2rpm 1.15.0 %bcond check 1 %bcond bootstrap 0 %if %{with bootstrap} %global debug_package %{nil} %endif %if %{with bootstrap} %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ %endif # https://github.com/metacubex/mihomo %global goipath github.com/metacubex/mihomo Version: 1.19.1 %global tag v%{version} # REMOVE BEFORE SUBMITTING THIS FOR REVIEW # --- # New Fedora packages should use %%gometa -f, which makes the package # ExclusiveArch to %%golang_arches_future and thus excludes the package from # %%ix86. If the new package is needed as a dependency for another package, # please consider removing that package from %%ix86 in the same way, instead of # building more go packages for i686. If your package is not a leaf package, # you'll need to coordinate the removal of the package's dependents first. # --- # REMOVE BEFORE SUBMITTING THIS FOR REVIEW %gometa -L -f %global common_description %{expand: A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.} %global golicenses LICENSE transport/hysteria/conns/faketcp/LICENSE %global godocs docs README.md transport/shadowsocks/README.md Name: golang-github-metacubex-mihomo Release: 5%{?dist} Summary: A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API License: MIT URL: %{gourl} Source: %{gosource} Source: mihomo.service Source: go_hack BuildRequires: git %description %{common_description} %gopkg %prep %goprep -A %if %{without bootstrap} %generate_buildrequires %endif %if %{without bootstrap} %build install -Dm 0755 %{_sourcedir}/go_hack %{_topdir}/go_hack/go export PATH="%{_topdir}/go_hack:$PATH" hash -r %gobuild -o %{gobuilddir}/bin/mihomo %{goipath} %endif %install %gopkginstall %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0644 -vD %{_sourcedir}/mihomo.service %{buildroot}%{_prefix}/lib/systemd/system/mihomo.service %endif %if %{without bootstrap} %files %license transport/hysteria/conns/faketcp/LICENSE %doc docs transport/shadowsocks/README.md %{_bindir}/mihomo %{_prefix}/lib/systemd/system/mihomo.service %endif %gopkgfiles %post useradd -r mihomo || : mkdir -p %{_sharedstatedir}/mihomo || : %preun chown -vhR root:root %{_sharedstatedir}/mihomo || : userdel mihomo || : %changelog %autochangelog