Name: lemonade-server Version: 10.2.0 Release: 1%{?dist} Summary: Local LLM serving with GPU and NPU acceleration # Apache-2.0: Main project license (LICENSE.md file) # GPL-2.0-only WITH Linux-syscall-note: src/cpp/include/lemon/amdxdna_accel.h (kernel UAPI header) # MIT: src/cpp/include/lemon/utils/aixlog.hpp (bundled C++ logging library) License: Apache-2.0 AND GPL-2.0-only WITH Linux-syscall-note AND MIT URL: https://github.com/lemonade-sdk/lemonade Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: lemonade-server.sysusers ExclusiveArch: x86_64 # aixlog is a header-only library not available as a package in Fedora Provides: bundled(aixlog) = 1.5.0 # Disabled by default, requires GPU hardware %bcond_with check BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: openssl-devel BuildRequires: git-core BuildRequires: systemd-rpm-macros BuildRequires: libdrm-devel BuildRequires: libzstd-devel BuildRequires: libcurl-devel BuildRequires: brotli-devel BuildRequires: nlohmann-json-devel BuildRequires: cli11-devel BuildRequires: cpp-httplib-devel BuildRequires: zlib-devel BuildRequires: libwebsockets-devel Requires: llama-cpp %if %{with check} BuildRequires: python3-pytest BuildRequires: python3-requests %endif %description Lemonade helps users discover and run local AI apps by serving optimized LLMs right from their own GPUs and NPUs. It supports GGUF, FLM, and ONNX models. %prep %autosetup -n lemonade-%{version} -p1 # Remove hidden upstream directories not needed for the build rm -rf .github .circleci .gitlab-ci # Force CMake to use system-provided httplib instead of attempting ## to download and vendor it via FetchContent during offline build. sed -i 's/FetchContent_MakeAvailable(httplib)/find_package(httplib REQUIRED)/g' CMakeLists.txt %pre %sysusers_create_compat %{SOURCE1} %build %cmake %cmake_build %install %cmake_install # Install sysusers.d config source for Lemonade system user install -Dpm 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf %if %{with check} %check cd test %pytest -v %endif # Lemonade systemd service file %post %systemd_post lemonade-server.service %preun %systemd_preun lemonade-server.service %postun %systemd_postun_with_restart lemonade-server.service %files %license LICENSE %doc README.md %{_bindir}/lemonade %{_bindir}/lemonade-server %{_bindir}/lemond %{_datadir}/lemonade-server/ %{_datadir}/lemonade/ %{_mandir}/man1/lemonade*.1* %{_mandir}/man1/lemond.1* %dir %{_sysconfdir}/lemonade %dir %{_sysconfdir}/lemonade/conf.d # Restrict secrets file to be readable only by root and the lemonade service group %attr(0640, root, lemonade) %config(noreplace) %{_sysconfdir}/lemonade/conf.d/zz-secrets.conf %{_unitdir}/lemonade-server.service %{_sysusersdir}/%{name}.conf %changelog %autochangelog