Name: lemonade Version: 11.0.0 Release: 2%{?dist} Summary: Lightweight, high-performance local LLM server License: Apache-2.0 URL: https://lemonade-server.ai/ # Upstream source is vendored via the lemonade/ git submodule (pinned at v%%{version}). # The tarball is generated by tito's SubmoduleAwareBuilder and submitted to COPR as an SRPM. Source0: %{name}-%{version}.tar.gz # Fedora/Flatpak specific: Move Tauri settings file from ~/.cache to ~/.config (XDG compliance) Patch0: patches/0001-fix-app-store-settings-under-user-config-dir.patch %global upstream lemonade %global debug_package %{nil} # C++ build toolchain (server + tray) BuildRequires: cmake BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: git # lemonade-server BuildRequires: systemd-rpm-macros BuildRequires: systemd-devel BuildRequires: libcurl-devel BuildRequires: libzstd-devel BuildRequires: libwebsockets-devel BuildRequires: libdrm-devel BuildRequires: nlohmann-json-devel >= 3.11.3 BuildRequires: cli11-devel >= 2.4.2 BuildRequires: cpp-httplib-devel >= 0.26.0 BuildRequires: mbedtls-devel # lemonade-tray BuildRequires: gtk3-devel BuildRequires: libappindicator-gtk3-devel BuildRequires: libnotify-devel # lemonade-desktop (Tauri) BuildRequires: nodejs BuildRequires: npm BuildRequires: rust BuildRequires: cargo BuildRequires: webkit2gtk4.1-devel BuildRequires: openssl-devel BuildRequires: libsoup3-devel BuildRequires: javascriptcoregtk4.1-devel # packaging validation BuildRequires: desktop-file-utils BuildRequires: libappstream-glib Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: %{name}-desktop%{?_isa} = %{version}-%{release} %description Lemonade is a lightweight, high-performance local LLM server with support for multiple backends including llama.cpp, FastFlowLM, and RyzenAI. This package is a meta-package that installs both the Lemonade server and the desktop application. %package server Summary: Server components for Lemonade Provides: lemond = %{version}-%{release} Requires: %{name}-cli%{?_isa} = %{version}-%{release} # The lemonade system user/group is created from the sysusers.d file # (%%sysusers_create_compat in %%pre). On F42+ this macro is a no-op and # the user is created automatically from %%{_sysusersdir}/lemonade.conf. %{?sysusers_requires_compat} %{?systemd_requires} # owns /usr/share/icons/hicolor/ tree where the app icon is installed Requires: hicolor-icon-theme Requires: unzip Requires: tar Requires: pciutils %description server The Lemonade server subpackage contains the core LLM server and web interface. %package cli Summary: Command-line interface for Lemonade Conflicts: %{name}-server%{?_isa} < 10.9.0-3 %description cli The Lemonade CLI subpackage contains the command-line client for interacting with the Lemonade LLM server. %package tray Summary: System tray application for Lemonade Requires: %{name}-server%{?_isa} = %{version}-%{release} %description tray Provides the lemonade-tray system tray application. Users can configure it to start at login via their desktop environment's autostart settings. %package desktop Summary: Desktop application for Lemonade Requires: %{name}-server%{?_isa} = %{version}-%{release} Obsoletes: %{name}-app < %{version}-%{release} %description desktop A modern desktop interface for managing and interacting with the Lemonade LLM server. %package web Summary: Web browser launcher for Lemonade Requires: %{name}-server%{?_isa} = %{version}-%{release} Requires: xdg-utils Requires: jq %description web Provides the lemonade-web launcher script and desktop entry for opening the Lemonade web interface in a browser. %prep %autosetup -N -n %{name}-%{version} pushd %{upstream} %patch -P 0 -p1 popd %build # Configure from within the upstream source subdirectory (%%{upstream}/) pushd %{upstream} %cmake -G Ninja \ -DBUILD_ELECTRON_APP=OFF \ -DBUILD_TAURI_APP=OFF \ -DUSE_SYSTEM_JSON=ON \ -DUSE_SYSTEM_CLI11=ON \ -DUSE_SYSTEM_HTTPLIB=ON \ -DUSE_SYSTEM_NODEJS_MODULES=OFF \ -DREQUIRE_LINUX_TRAY=ON %cmake_build popd # Build the Tauri app pushd %{upstream}/src/app npm config set audit false npm install npm run build:nobundle popd %install pushd %{upstream} %cmake_install popd # --- Icons --- # Install the application icon into the hicolor theme. # Use the reverse-DNS name the tray binary looks up at runtime via find_icon_path(). install -Dpm 0644 %{upstream}/src/app/assets/logo.svg \ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ai.lemonade_server.Lemonade.svg # --- Web app launcher --- # Shell script that opens the built-in web interface in the user's browser. install -Dpm 0755 %{upstream}/data/lemonade-web-app \ %{buildroot}%{_bindir}/lemonade-web # --- Desktop entries --- # lemonade.desktop: Tauri desktop app (desktop subpackage) desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ --set-icon=ai.lemonade_server.Lemonade \ --set-name="Lemonade Desktop" \ %{upstream}/data/lemonade-app.desktop mv %{buildroot}%{_datadir}/applications/lemonade-app.desktop \ %{buildroot}%{_datadir}/applications/lemonade.desktop # lemonade-web.desktop: web interface launcher (base package) desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ --set-key=Exec --set-value=lemonade-web \ --set-icon=ai.lemonade_server.Lemonade \ %{upstream}/data/lemonade-web-app.desktop mv %{buildroot}%{_datadir}/applications/lemonade-web-app.desktop \ %{buildroot}%{_datadir}/applications/lemonade-web.desktop # --- AppStream metadata --- install -Dpm 0644 /dev/stdin \ %{buildroot}%{_datadir}/metainfo/lemonade.appdata.xml << 'EOF' lemonade FSFAP Apache-2.0 Lemonade Lightweight, high-performance local LLM server

Lemonade is a lightweight, high-performance local LLM server with support for multiple backends including llama.cpp, FastFlowLM, and RyzenAI.

lemonade.desktop https://lemonade-server.ai/ lemond lemonade-app
EOF # --- Tauri app --- # The tauri build --no-bundle command produces a single binary in the target directory. install -Dpm 0755 %{upstream}/src/app/src-tauri/target/release/lemonade-app \ %{buildroot}%{_bindir}/lemonade-app # --- Tray desktop entry --- # No upstream .desktop file for lemonade-tray; write it inline. # Users can configure lemonade-tray to start at login via their DE's autostart UI. install -Dpm 0644 /dev/stdin \ %{buildroot}%{_datadir}/applications/lemonade-tray.desktop << 'EOF' [Desktop Entry] Type=Application Name=Lemonade Tray Comment=Lemonade Server system tray Icon=ai.lemonade_server.Lemonade Exec=lemonade-tray Terminal=false Categories=Utility; EOF # --- System user home directory --- # /var/lib/lemonade is the lemond service WorkingDirectory (StateDirectory). install -dm 0750 %{buildroot}%{_sharedstatedir}/lemonade # --- Default paths environment --- # System service defaults: use flat directories directly under state directory. install -Dpm 0644 /dev/stdin \ %{buildroot}%{_sysconfdir}/lemonade/conf.d/10-paths.conf << 'EOF' LEMONADE_CACHE_DIR=%{_sharedstatedir}/lemonade HF_HOME=%{_sharedstatedir}/lemonade/huggingface EOF %pre server # Create the lemonade system user/group from the sysusers.d config. # No-op on F42+ (rpm creates it from the packaged sysusers.d file instead). %sysusers_create_compat %{upstream}/data/lemonade.sysusers %post server %systemd_post lemond.service %systemd_user_post lemond.service # 1. Handle migration from upstream CPack home directory (/opt/var/lib/lemonade) if getent passwd lemonade >/dev/null; then CURRENT_HOME=$(getent passwd lemonade | cut -d: -f6) if [ "$CURRENT_HOME" = "/opt/var/lib/lemonade" ]; then # Change home directory path without moving files (avoids failure if target exists) usermod -d %{_sharedstatedir}/lemonade lemonade || true # Manually migrate files safely if [ -d "/opt/var/lib/lemonade" ]; then mkdir -p %{_sharedstatedir}/lemonade cp -a /opt/var/lib/lemonade/. %{_sharedstatedir}/lemonade/ 2>/dev/null || true rm -rf /opt/var/lib/lemonade || true fi fi fi # Ensure state directory exists and has correct ownership mkdir -p %{_sharedstatedir}/lemonade chown lemonade:lemonade %{_sharedstatedir}/lemonade chmod 0750 %{_sharedstatedir}/lemonade # 2. Migrate existing user cache structure if upgrading from previous versions if [ -d "%{_sharedstatedir}/lemonade/.cache/lemonade" ]; then find "%{_sharedstatedir}/lemonade/.cache/lemonade" -mindepth 1 -maxdepth 1 -exec mv -t "%{_sharedstatedir}/lemonade" {} + || true rmdir "%{_sharedstatedir}/lemonade/.cache/lemonade" || true fi if [ -d "%{_sharedstatedir}/lemonade/.cache/huggingface" ]; then if [ ! -d "%{_sharedstatedir}/lemonade/huggingface" ]; then mv "%{_sharedstatedir}/lemonade/.cache/huggingface" "%{_sharedstatedir}/lemonade/huggingface" || true fi rmdir "%{_sharedstatedir}/lemonade/.cache" 2>/dev/null || true fi # Ensure ownership and permissions are correct after file movements chown -R lemonade:lemonade %{_sharedstatedir}/lemonade chmod 0750 %{_sharedstatedir}/lemonade find %{_sharedstatedir}/lemonade -type d -exec chmod 0750 {} + 2>/dev/null || true find %{_sharedstatedir}/lemonade -type f -exec chmod 0640 {} + 2>/dev/null || true # 3. Add lemonade user to render and video groups for hardware acceleration if getent group render >/dev/null; then usermod -a -G render lemonade || true fi if getent group video >/dev/null; then usermod -a -G video lemonade || true fi %preun server %systemd_preun lemond.service %systemd_user_preun lemond.service %postun server %systemd_postun_with_restart lemond.service %systemd_user_postun_with_restart lemond.service %check appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/lemonade.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/lemonade.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/lemonade-tray.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/lemonade-web.desktop %files %files server %license %{upstream}/LICENSE %doc %{upstream}/README.md %{_bindir}/lemond %{_mandir}/man1/lemond.1* %{_datadir}/lemonade/ %{_datadir}/lemonade-server/ %{_datadir}/icons/hicolor/scalable/apps/ai.lemonade_server.Lemonade.svg %dir %{_sysconfdir}/lemonade %dir %{_sysconfdir}/lemonade/conf.d %config(noreplace) %{_sysconfdir}/lemonade/conf.d/10-paths.conf %config(noreplace) %{_sysconfdir}/lemonade/conf.d/zz-secrets.conf %{_unitdir}/lemond.service %{_userunitdir}/lemond.service %{_sysusersdir}/lemonade.conf %dir %{_sharedstatedir}/lemonade %files cli %license %{upstream}/LICENSE %{_bindir}/lemonade %{_mandir}/man1/lemonade.1* %files tray %{_bindir}/lemonade-tray %{_datadir}/applications/lemonade-tray.desktop %files desktop %{_bindir}/lemonade-app %{_datadir}/applications/lemonade.desktop %{_datadir}/metainfo/lemonade.appdata.xml %{_datadir}/pixmaps/lemonade-app.svg %files web %{_bindir}/lemonade-web %{_bindir}/lemonade-web-app %{_datadir}/applications/lemonade-web.desktop %changelog * Fri Jul 17 2026 Arun Babu Neelicattu 11.0.0-2 - spec: Add unzip, tar, and pciutils runtime dependencies to server subpackage (arun.neelicattu@gmail.com) - chore: add bump-lemonade-version skill to workspace (arun.neelicattu@gmail.com) * Thu Jul 16 2026 Arun Babu Neelicattu 11.0.0-1 - Bump version to 11.0.0 and update submodule (arun.neelicattu@gmail.com) - docs: document lemonade-cli subpackage in README (arun.neelicattu@gmail.com) * Wed Jul 08 2026 Arun Babu Neelicattu 10.10.0-1 - update to v10.10.0 (arun.neelicattu@gmail.com) * Fri Jul 03 2026 Arun Babu Neelicattu 10.9.0-3 - spec: split lemonade-cli into its own subpackage (arun.neelicattu@gmail.com) * Thu Jul 02 2026 Arun Babu Neelicattu 10.9.0-2 - spec: implement paths config, post-install migrations, and guidelines fixes (arun.neelicattu@gmail.com) * Wed Jul 01 2026 Arun Babu Neelicattu 10.9.0-1 - update to v10.9.0 (arun.neelicattu@gmail.com) * Fri Jun 26 2026 Arun Babu Neelicattu 10.8.1-1 - update to v10.8.1 (arun.neelicattu@gmail.com) * Wed Jun 17 2026 Arun Babu Neelicattu 10.8.0-1 - update to v10.8.0 (arun.neelicattu@gmail.com) * Thu Jun 11 2026 Arun Babu Neelicattu 10.7.0-1 - update to v10.7.0 (arun.neelicattu@gmail.com) * Fri May 22 2026 Arun Babu Neelicattu 10.6.0-1 - update to v10.6.0 (arun.neelicattu@gmail.com) - spec: Fedora packaging guideline compliance (COPR-targeted batch) (arun.neelicattu@gmail.com) * Tue May 19 2026 Arun Babu Neelicattu 10.5.1-1 - update to v10.5.1 (arun.neelicattu@gmail.com) - spec: drop lemonade-server.service migration from %%post (arun.neelicattu@gmail.com) * Sun May 17 2026 Arun Babu Neelicattu 10.5.0-1 - update to v10.5.0 (arun.neelicattu@gmail.com) - feat: add lemond user systemd service (arun.neelicattu@gmail.com) * Wed May 13 2026 Arun Babu Neelicattu 10.4.0-1 - update to v10.4.0 (arun.neelicattu@gmail.com) * Wed May 13 2026 Arun Babu Neelicattu 10.3.0-2 - spec: add upgrade migration for package rename and service rename (arun.neelicattu@gmail.com) - docs: update README for v10.3.0 packaging (arun.neelicattu@gmail.com) * Wed May 13 2026 Arun Babu Neelicattu - spec: add upgrade migration for package rename and service rename (arun.neelicattu@gmail.com) - docs: update README for v10.3.0 packaging (arun.neelicattu@gmail.com) * Tue May 12 2026 Arun Babu Neelicattu 10.3.0-1 - chore: add .gitignore for build artifacts (arun.neelicattu@gmail.com) - spec: packaging overhaul for v10.3.0 Tauri migration (arun.neelicattu@gmail.com) - update to v10.3.0, migrate desktop app from Electron to Tauri (arun.neelicattu@gmail.com) - fix: use %%{SOURCE1} for httplib patch in spec file (arun.neelicattu@gmail.com) - update to v10.1.0 (arun.neelicattu@gmail.com) * Mon May 04 2026 Arun Babu Neelicattu 10.3.0-1 - update to 10.3.0 (arun.neelicattu@gmail.com) - migrate from Electron to Tauri for the desktop app (arun.neelicattu@gmail.com) - drop Electron dependencies (arun.neelicattu@gmail.com) * Mon Mar 30 2026 Arun Babu Neelicattu 10.0.1-5 - fix: license and doc files are under upstream submodule directory (arun.neelicattu@gmail.com) * Mon Mar 30 2026 Arun Babu Neelicattu 10.0.1-4 - fix: cmake_install must run from within upstream source directory (arun.neelicattu@gmail.com) * Mon Mar 30 2026 Arun Babu Neelicattu 10.0.1-3 - fix: vendor upstream source via submodule for COPR compatibility (arun.neelicattu@gmail.com) * Mon Mar 30 2026 Arun Babu Neelicattu 10.0.1-2 - fix(tito): use correct builder (arun.neelicattu@gmail.com) - fix: lemonade-tray.service should use lemonade-tray binary (arun.neelicattu@gmail.com) - docs: document lemonade-tray as a standalone install option (arun.neelicattu@gmail.com) * Mon Mar 30 2026 Arun Babu Neelicattu 10.0.1-1 - spec: update to 10.0.1 (arun.neelicattu@gmail.com) - Automatic commit of package [lemonade] minor release [9.4.1-2]. (arun.neelicattu@gmail.com) * Sun Mar 01 2026 Arun Babu Neelicattu 9.4.1-2 - * Sun Mar 01 2026 Arun Babu Neelicattu 9.4.1-1 - update lemonade submodule to v9.4.1 (arun.neelicattu@gmail.com) * Fri Feb 27 2026 Arun Babu Neelicattu 9.3.4-6 - fix: tray systemd unit cannot depend on lemonade-server (arun.neelicattu@gmail.com) * Fri Feb 27 2026 Arun Babu Neelicattu 9.3.4-5 - spec: fix autosetup after rename (arun.neelicattu@gmail.com) * Fri Feb 27 2026 Arun Babu Neelicattu 9.3.4-4 - spec: fix incorrect source after rename (arun.neelicattu@gmail.com) * Fri Feb 27 2026 Arun Babu Neelicattu 9.3.4-3 - tito: update tagger (arun.neelicattu@gmail.com) * Fri Feb 27 2026 Arun Babu Neelicattu 9.3.4-2 - new package built with tito * Thu Feb 26 2026 Arun Neelicattu - 9.3.4-1 Initial package source