%global node_version 24.15.0 %global pnpm_version 10.34.1 Name: shiru Version: 6.8.0 Release: 1%{?dist} Summary: A personal anime library manager License: GPL-3.0-or-later URL: https://github.com/RockinChaos/Shiru Source0: %{name}-%{version}.tar.gz Packager: Yashwanth Rathakrishnan Vendor: Yashwanth Rathakrishnan Requires: gtk3, libnotify, nss, libXScrnSaver, libXtst, xdg-utils, at-spi2-core, libuuid Suggests: libappindicator-gtk3 BuildArch: x86_64 # Electron ships its own debug symbols; do not emit a debuginfo package. %global debug_package %{nil} %description A personal anime library manager for watching and tracking your collection in real time. Lightweight, powerful, and paws-itively fast. No waiting required! This is a modified fork. The in-application updater has been removed, so updates are delivered by the system package manager instead. See the NOTICE file for the full list of changes. %prep %autosetup -n %{name}-%{version} %build # Neither Node.js nor pnpm ship in Fedora, so both are staged from upstream # release archives for the build. mkdir -p .tools curl -fsSL "https://nodejs.org/dist/v%{node_version}/node-v%{node_version}-linux-x64.tar.xz" -o .tools/node.tar.xz tar -xJf .tools/node.tar.xz -C .tools export PATH="$PWD/.tools/node-v%{node_version}-linux-x64/bin:${PATH}" npm install -g pnpm@%{pnpm_version} --no-audit --no-fund # Native modules in this dependency tree resolve node-pre-gyp from PATH. npm install -g node-pre-gyp cd electron pnpm install --frozen-lockfile pnpm run web:build ./node_modules/.bin/electron-builder --linux dir --x64 %install # %build runs in its own shell, so these paths are relative to the source root. mkdir -p %{buildroot}/opt/%{name} cp -a electron/dist/linux-unpacked/. %{buildroot}/opt/%{name}/ mkdir -p %{buildroot}%{_datadir}/applications install -p -m 0644 shiru.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop mkdir -p %{buildroot}%{_datadir}/icons/hicolor/512x512/apps install -p -m 0644 electron/buildResources/icon.png \ %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/%{name}.png mkdir -p %{buildroot}%{_datadir}/metainfo install -p -m 0644 shiru.appdata.xml %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml %post #!/bin/bash if type update-alternatives 2>/dev/null >&1; then # Remove previous link if it doesn't use update-alternatives if [ -L '/usr/bin/shiru' -a -e '/usr/bin/shiru' -a "`readlink '/usr/bin/shiru'`" != '/etc/alternatives/shiru' ]; then rm -f '/usr/bin/shiru' fi update-alternatives --install '/usr/bin/shiru' 'shiru' '/opt/%{name}/shiru' 100 || ln -sf '/opt/%{name}/shiru' '/usr/bin/shiru' else ln -sf '/opt/%{name}/shiru' '/usr/bin/shiru' fi # Check if user namespaces are supported by the kernel and working with a quick test: if ! { [[ -L /proc/self/ns/user ]] && unshare --user true; }; then # Use SUID chrome-sandbox only on systems without user namespaces: chmod 4755 '/opt/%{name}/chrome-sandbox' || true else chmod 0755 '/opt/%{name}/chrome-sandbox' || true fi if hash update-mime-database 2>/dev/null; then update-mime-database /usr/share/mime || true fi if hash update-desktop-database 2>/dev/null; then update-desktop-database /usr/share/applications || true fi %postun #!/bin/bash # Delete the link to the binary if command -v update-alternatives >/dev/null 2>&1; then update-alternatives --remove shiru %{_bindir}/shiru || true else rm -f %{_bindir}/shiru fi %files /opt/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/512x512/apps/%{name}.png %{_datadir}/metainfo/%{name}.appdata.xml %license LICENSE %doc README.md NOTICE %changelog * Wed Oct 07 2026 Yashwanth Rathakrishnan - 6.8.0-1 - Rebased onto upstream v6.8.0-RELEASE - Removed in-application updater; updates now come from the package manager - Added AppStream metadata and full GPL-3.0 attribution (see NOTICE)