# SPEC file for automatic Copr builds from Gitea mirror of Stoat Desktop %global giturl https://git.corentinchoisy.xyz/corentinchoisy/stoat-desktop-upstream.git %global commit %(git ls-remote %{giturl} HEAD | cut -f1) %global shortcommit %(echo %{commit} | cut -c1-7) %global gitdate %(date +%Y%m%d) %global version_from_git %(git ls-remote --tags %{giturl} | awk -F/ '{print $3}' | sort -V | tail -n1 | sed 's/^v//') Name: stoat Version: %{version_from_git} Release: 1%{?dist} Summary: Stoat — official desktop client for the Stoat chat platform License: AGPL-3.0 URL: %{giturl} Source0: %{giturl}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: nodejs >= 18 BuildRequires: npm BuildRequires: git BuildRequires: desktop-file-utils Requires: electron Requires: gtk3 Requires: libXScrnSaver Requires: libnotify %description Stoat is the official Electron-based desktop client for the Stoat chat platform. This package builds automatically from the mirrored Gitea repository: %{giturl} %prep %autosetup -n for-desktop-%{shortcommit} %build npm ci npm run build %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/applications # Install built binary (adjust path if different) install -Dm755 dist/linux-unpacked/stoat %{buildroot}%{_bindir}/stoat # Install desktop entry if available if [ -f "build/linux/stoat.desktop" ]; then install -Dm644 build/linux/stoat.desktop %{buildroot}%{_datadir}/applications/stoat.desktop fi %files %license LICENSE %doc README.md %{_bindir}/stoat %{_datadir}/applications/stoat.desktop %changelog * %{gitdate} Copr Auto Build - %{version}-1 - Automated build from latest upstream commit (%{shortcommit})