Name: leonis Version: 0.7.1 Release: 1%{?dist} Summary: ISBN book metadata manager with web UI License: MIT URL: https://github.com/cab_projects/open_source/leonis Source0: %{name}-%{version}.tar.gz # The Packager: tag below is intentionally set — not vendored, not # placeholder. It matches Maintainer: in debian/control. RPM # convention for COPR / openSUSE Build Service / Fedora Koji # requires a contactable human so package maintainers can reach the # upstream author for package-level issues (rebuilds, dependency # conflicts, etc.) without conflating them with code bugs. Packager: Christopher Battles # Build only on these architectures (Leonis compiles to native code) ExclusiveArch: x86_64 BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: pkg-config BuildRequires: xxd # Conditional dependencies for Fedora and openSUSE %if 0%{?fedora} # Fedora 43, 44 BuildRequires: sqlite-devel BuildRequires: libcurl-devel BuildRequires: cjson-devel BuildRequires: libmicrohttpd-devel BuildRequires: libharu-devel BuildRequires: webkit2gtk4.1-devel BuildRequires: gtk3-devel %endif %if 0%{?suse_version} # openSUSE Leap 16.0, Tumbleweed BuildRequires: sqlite3-devel BuildRequires: libcurl-devel BuildRequires: cJSON-devel BuildRequires: libmicrohttpd-devel BuildRequires: libharu-devel BuildRequires: webkit2gtk3-devel BuildRequires: gtk3-devel %endif # Fallback for unknown distributions (defaults to Fedora-style names) %if ! 0%{?fedora} && ! 0%{?suse_version} BuildRequires: sqlite-devel BuildRequires: libcurl-devel BuildRequires: cjson-devel BuildRequires: libmicrohttpd-devel BuildRequires: libharu-devel BuildRequires: webkit2gtk4.1-devel BuildRequires: gtk3-devel %endif # Note: RPM automatically generates Requires from linked libraries # No explicit Requires: needed for standard library dependencies %description Leonis reads ISBNs via keyboard or USB scanner, looks up book metadata from the Open Library API, and stores results in SQLite. It features both a CLI interface and a built-in web interface for browsing and managing books. Features: - USB barcode scanner support (writes to stdin) - Open Library API integration - SQLite database storage - Embedded web server with modern UI - Optional native GTK webview window - PDF and CSV report generation %prep %setup -q %build # Clean any stale build artifacts to ensure fresh compile rm -rf redhat-linux-build # Pin LEONIS_BIND_ADDRESS=localhost so package builds default to localhost-only # (matches debian/rules:19). The CMake default is already localhost, but # setting it explicitly here keeps both packaging flows symmetric and # defends against a future change to the cache default in CMakeLists.txt. %cmake -DCMAKE_BUILD_TYPE=Release -DLEONIS_BIND_ADDRESS=localhost %cmake_build %install %cmake_install %files %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/leonis %{_datadir}/applications/leonis.desktop %{_datadir}/icons/hicolor/scalable/apps/leonis.svg %{_datadir}/leonis/ # No post-install needed - database and logs go to XDG user directories: # - Database: ~/.local/share/leonis/leonis.db # - Logs: ~/.local/share/leonis/log/ # The application auto-creates these on first run. %changelog * Mon Aug 31 2026 Christopher Battles - 0.7.1-1 - New upstream version 0.7.1 (jump from 0.5.8; 0.5.9/0.6.0/0.7.0 were not packaged for RPM) - Add web UI screenshots to assets/screenshots/ - Add tests/record-manual.sh interactive manual-test recorder - Fix --webview startup message (60-min auto-shutdown is --web only) - Document WSL2/WSLg support (tested, unsupported) and leonis-books.com link in README * Tue Jul 28 2026 Christopher Battles - 0.5.8-1 - CMakeLists.txt: Remove LEONIS_DB_PATH and LEONIS_LOG_DIR compile-time definitions Database and logs now use runtime XDG path resolution for all users - CMakeLists.txt: Move LEONIS_WEBUI_PATH and LEONIS_ASSETS_PATH after GNUInstallDirs Use CMAKE_INSTALL_FULL_DATAROOTDIR for correct absolute paths - leonis.spec: Add clean build step to prevent stale object files - Fix RPM builds to correctly install webui/assets to /usr/share/leonis/ - Fix bogus dates in changelog (Jul 27 2026 is Monday, not Sunday) * Mon Jul 27 2026 Christopher Battles - 0.5.7-1 - Fix XDG directory paths when running via sudo (SUDO_USER handling) - Database and logs now correctly use original user's home directory - Add ensure_xdg_data_dir() call to db_restore() for first-run setup - Create log subdirectory automatically during XDG initialization - Add helpers/copr_rebuild.sh script for building RPM/SRPM packages - Fix Makefile install target to avoid permission errors with sudo - Update documentation for correct sudo make clean install usage - Update paste failure toast to recommend Ctrl+V shortcut * Mon Jul 27 2026 Christopher Battles - 0.5.6-1 - Add helpers/copr_rebuild.sh script for building RPM/SRPM packages - Fix Makefile install target to avoid permission errors with sudo - Update documentation for correct sudo make clean install usage * Sun Jul 26 2026 Christopher Battles - 0.5.5-1 - Makefile auto-detects root user for sudo make install - Fixed logging subsystem fallback to open file (not directory) - Removed obsolete debian/postinst script - Removed obsolete /var/lib/leonis and /var/log/leonis paths - Database and logs use XDG user directories (~/.local/share/leonis/) * Sun Jul 26 2026 Christopher Battles - 0.5.4-1 - Added auto-generation of database on first run * Sat Jul 25 2026 Christopher Battles - 0.5.3-1 - Initial package - ISBN scanning via keyboard or USB scanner - Open Library API integration - SQLite database backend - Embedded web interface - Native GTK webview option - PDF and CSV report generation