File inkscape-silhouette.spec of Package inkscape-silhouette
#
# spec file for package inkscape-silhouette
#
# Copyright (c) 2024 Lorenz Hüdepohl
#
# 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/
#
Name: inkscape-silhouette
Version: 1.29
Release: 0
Summary: An inkscape extension to drive Silhouette vinyl cutters
License: GPL-2.0
URL: https://github.com/fablabnbg/inkscape-silhouette
Source0: https://github.com/fablabnbg/inkscape-silhouette/archive/refs/tags/v%{version}.tar.gz
BuildArch: noarch
BuildRequires: make
Requires: %{python_module usb}
Requires: inkscape
%description
An extension to drive a Silhouette Cameo and similar plotter devices from
within inkscape. 100% pure python, ontop of the libusb backend.
%prep
%autosetup
%build
true
%install
%make_install UDEV=%buildroot%_prefix/lib/udev
cp silhouette-udev.rules %buildroot%_udevrulesdir/40-silhouette-udev.rules
sed -i -e 's/MODE="666",/MODE="660", TAG+="uaccess"/;' %buildroot%_udevrulesdir/40-silhouette-udev.rules
sed -i -e 's|#!/usr/bin/env python3|#!/usr/bin/python3|' %buildroot%_datadir/inkscape/extensions/{sendto_silhouette.py,silhouette/read_dump.py,silhouette_multi.py}
rm %buildroot%_prefix/lib/udev/silhouette*
rm -rf %buildroot%_datadir/inkscape/extensions/silhouette/pyusb-*/
%find_lang %{name} %{?no_lang_C}
%files -f %{name}.lang
%license LICENSE
%doc README.md
%_udevrulesdir/40-silhouette-udev.rules
%_datadir/inkscape
%changelog