## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: hokai Version: 0.0.1 Release: %autorelease Summary: Manage a Mihomo proxy through D-Bus # The binary includes statically linked Rust dependencies. # Generated with %%cargo_license_summary from the locked dependency graph. License: GPL-3.0-or-later AND Apache-2.0 AND BSD-3-Clause AND CDLA-Permissive-2.0 AND ISC AND MIT AND Unicode-3.0 AND Zlib URL: https://gitlab.com/jlzhjp/hokai Source0: %{url}/-/archive/v%{version}/hokai-v%{version}.tar.gz Source1: %{name}-%{version}-vendor.tar.gz Source2: hokai.service Source3: hokai-daemon.service Source4: hokai-config.toml Source5: dev.jlzhjp.HokaiDaemon.conf BuildRequires: cargo-rpm-macros BuildRequires: clang BuildRequires: cmake BuildRequires: perl BuildRequires: systemd-rpm-macros Requires: clash-meta ExclusiveArch: %{rust_arches} %description Hokai manages a Mihomo proxy configuration. It includes a system service that runs Mihomo, a D-Bus daemon that controls the service, and a command-line client for sending requests to the daemon. %prep %autosetup -n %{name}-v%{version} -a1 %cargo_prep -v vendor %build export HOKAI_SYSCONFDIR=%{_sysconfdir} export HOKAI_DATADIR=%{_datadir} export HOKAI_LOCALSTATEDIR=%{_localstatedir}/lib %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %cargo_vendor_manifest %install install -Dpm 0755 target/rpm/hokai \ %{buildroot}%{_bindir}/hokai install -Dpm 0755 target/rpm/hokai_service \ %{buildroot}%{_libexecdir}/hokai-service install -Dpm 0755 target/rpm/hokai_daemon \ %{buildroot}%{_libexecdir}/hokai-daemon install -Dpm 0644 %{SOURCE2} \ %{buildroot}%{_unitdir}/hokai.service install -Dpm 0644 %{SOURCE3} \ %{buildroot}%{_unitdir}/hokai-daemon.service install -Dpm 0600 %{SOURCE4} \ %{buildroot}%{_sysconfdir}/hokai/config.toml install -Dpm 0644 %{SOURCE5} \ %{buildroot}%{_datadir}/dbus-1/system.d/dev.jlzhjp.HokaiDaemon.conf %check %cargo_test %post %systemd_post hokai.service hokai-daemon.service %preun %systemd_preun hokai.service hokai-daemon.service %postun %systemd_postun_with_restart hokai.service hokai-daemon.service %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %{_bindir}/hokai %{_libexecdir}/hokai-service %{_libexecdir}/hokai-daemon %{_unitdir}/hokai.service %{_unitdir}/hokai-daemon.service %{_datadir}/dbus-1/system.d/dev.jlzhjp.HokaiDaemon.conf %dir %{_sysconfdir}/hokai %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/hokai/config.toml %changelog ## START: Generated by rpmautospec * Sun Aug 30 2026 akari - 0.0.1-1 - Initial packaging ## END: Generated by rpmautospec