File beeref.spec of Package beeref
#
# spec file for package beeref
#
# Copyright (c) 2024-2025 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pythons python3
Name: beeref
Version: 0.3.3+30
Release: 0
Summary: Simple Reference Image Viewer
License: GPL-3.0
URL: https://beeref.org/
Source0: %{name}-%{version}.tar.xz
Source1: beeref.desktop
#PATCH-FIX-OPENSUSE beeref-python-version.patch malcolmlewis@opensuse.org -- Modify python requires as Tumbleweed has moved to version 3.13.n.
Patch0: beeref-python-version.patch
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: update-desktop-files
## MANUAL BEGIN
Requires: python3-lxml
Requires: python3-exif
Requires: python3-PyQt6
Requires: python3-rectangle-packer
BuildArch: noarch
%description
Lets you quickly arrange your reference images and view them while you create.
Its minimal interface is designed not to get in the way of your creative process.
%prep
%autosetup -p1
# Fix rpm runtime dependency rpmlint error replace the shebang in all the scripts with %%{_bindir}/python3
find . -name "*.py" -exec sed -i 's|#!%{_bindir}/env python3|#!%{_bindir}/python3|' {} ";"
%build
%pyproject_wheel
%install
%pyproject_install
pushd %{buildroot}%{python3_sitelib}
## Remove unneeded development stuff
rm -rf beeref-0.3.4.dev0.dist-info
popd
# Install desktop file and icon
install -d -m 0755 %{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -m 0644 %{S:1} %{buildroot}%{_datadir}/applications/beeref.desktop
install -m 0644 beeref/assets/logo.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/beeref.svg
%suse_update_desktop_file %{name}
#check for duplicates, remove them and make symlinks
%fdupes -s %{buildroot}
%files
%license LICENSE
%{_bindir}/beeref
%{_datadir}/applications/beeref.desktop
%{_datadir}/icons/hicolor/scalable/apps/beeref.svg
%{python3_sitelib}/beeref
%changelog