## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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 %global _pkgdir /opt/%{name} %global _icondir %{_datadir}/icons/hicolor/512x512/apps # Debug information for Electron apps is not available because prebuilt Electron # binaries is used, whose debug info has been stripped already. %global debug_package %{nil} Name: sparkle Version: 1.26.7 Release: %autorelease Summary: Another Mihimo GUI License: GPL-3.0-only URL: https://github.com/xishang0128/sparkle Source0: %{url}/archive/refs/tags/%{version}.tar.gz Source1: %{name}.desktop BuildRequires: gcc-c++ BuildRequires: pnpm BuildRequires: libxcrypt-compat %if 0%{fedora} <= 43 BuildRequires: nodejs22-full-i18n %else BuildRequires: nodejs24-full-i18n %endif Requires(post): %{_bindir}/update-alternatives Requires(preun): %{_bindir}/update-alternatives %description %{summary}, forked from Mihomo Party by xishang0128. %prep %autosetup %build pnpm install # Upstream tarball ships a stale version in package.json; align it with the # packaged version so the app and artifacts report the correct version. sed -i 's/^\([[:space:]]*"version":[[:space:]]*"\)[^"]*\("[[:space:]]*,[[:space:]]*\)$/\1%{version}\2/' package.json pnpm build:linux -c.productName sparkle --dir %install # Modify file modes chmod 4755 dist/linux*-unpacked/chrome-sandbox chmod +sx dist/linux*-unpacked/resources/sidecar/mihomo chmod +sx dist/linux*-unpacked/resources/sidecar/mihomo-alpha chmod -R go-w dist/linux*-unpacked/resources/files/sub-store-frontend # Install everything to /opt/sparkle mkdir -p %{buildroot}%{_pkgdir} cp -rp dist/linux*-unpacked/* %{buildroot}%{_pkgdir} # Install icon mkdir -p %{buildroot}%{_icondir} install -Dp -m0644 build/icon.png %{buildroot}%{_icondir}/%{name}.png # Install desktop file mkdir -p %{buildroot}%{_datadir}/applications install -Dp -m0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop %post # Create symlink mkdir -p %{_bindir} update-alternatives --install %{_bindir}/sparkle sparkle %{_pkgdir}/sparkle 100 %preun if [ $1 -eq 0 ]; then update-alternatives --remove sparkle %{_pkgdir}/sparkle fi %files %license LICENSE %{_pkgdir} %ghost %{_bindir}/sparkle %{_datadir}/applications/%{name}.desktop %{_icondir}/%{name}.png %changelog ## START: Generated by rpmautospec * Thu Aug 06 2026 SkyR0ver - 1.26.7-3 - Use Node v22 on Fedora 43 * Thu Aug 06 2026 SkyR0ver - 1.26.7-2 - Fix segmentation fault in postinstall * Fri Jul 31 2026 github-actions[bot] - 1.26.7-1 - Update to 1.26.7 * Sun Jul 26 2026 SkyR0ver - 1.26.6-2 - Avoid segmentation fault caused by electron-builder * Wed Jul 01 2026 github-actions[bot] - 1.26.6-1 - Update to 1.26.6 * Sun May 31 2026 github-actions[bot] - 1.26.5-1 - Update to 1.26.5 * Mon Apr 27 2026 SkyR0ver - 1.26.4-2 - Clean koffi binaries built for other platforms * Mon Apr 27 2026 github-actions[bot] - 1.26.4-1 - Update to 1.26.4 * Mon Apr 27 2026 github-actions[bot] - 1.26.3-1 - Update to 1.26.3 * Mon Apr 27 2026 SkyR0ver - 1.26.2-2 - Update alternatives usage * Mon Apr 27 2026 github-actions[bot] - 1.26.2-1 - Update to 1.26.2 * Mon Apr 27 2026 SkyR0ver - 1.26.1-5 - Support aarch64 platform * Mon Apr 27 2026 SkyR0ver - 1.26.1-4 - Modify binary name with commandline argument * Mon Apr 27 2026 SkyR0ver - 1.26.1-1 - Initial version of the package ## END: Generated by rpmautospec