%global srcname inkstitch %global forgeurl https://github.com/inkstitch/inkstitch Version: 3.1.0 %global tag v%{version} Name: inkstitch Release: 1%{?dist} Summary: An Inkscape extension for machine embroidery design License: GPL-3.0-or-later URL: %{forgeurl} Source: %{forgeurl}/archive/%{tag}/%{name}-%{version}.tar.gz BuildRequires: babel BuildRequires: cairo-devel BuildRequires: geos-devel BuildRequires: gettext-devel BuildRequires: glib-networking BuildRequires: gtk3-devel BuildRequires: inkscape BuildRequires: inkscape-libs BuildRequires: libnotify-devel BuildRequires: python3-appdirs BuildRequires: python3-babel BuildRequires: python3-cairo BuildRequires: python3-cairo-devel BuildRequires: python3-colormath BuildRequires: python3-devel BuildRequires: python3-diskcache BuildRequires: python3-flask BuildRequires: python3-flask+async BuildRequires: python3-flask-cors BuildRequires: python3-fonttools BuildRequires: python3-fonttools+lxml BuildRequires: python3-fonttools+ufo BuildRequires: python3-fonttools+unicode BuildRequires: python3-jaraco-functools BuildRequires: python3-gobject BuildRequires: python3-gobject-devel BuildRequires: python3-inkex BuildRequires: python3-installer BuildRequires: python3-jinja2 BuildRequires: python3-jinja2+i18n BuildRequires: python3-lxml BuildRequires: python3-networkx BuildRequires: python3-numpy BuildRequires: python3-pandas BuildRequires: python3-pyembroidery BuildRequires: python3-pytest BuildRequires: python3-requests BuildRequires: python3-shapely BuildRequires: python3-scipy BuildRequires: python3-tomli BuildRequires: python3-trimesh BuildRequires: python3-trimesh+easy BuildRequires: python3-trimesh+recommend BuildRequires: python3-wxpython4 BuildRequires: python3-wxpython4-media BuildRequires: python3-wxpython4-webview BuildRequires: SDL2-devel Requires: inkscape BuildArch: noarch %global _description %{expand: Want to design embroidery pattern files (PES, DST, and many more) using free, open source software? Ink/Stitch aims to be a full-fledged embroidery digitizing platform based entirely on free, open source software. Our goal is to be approachable for hobbyists while also providing the power needed by professional digitizers. We also aim to provide a welcoming open source environment where contributing is fun and easy.} %description %_description %prep %autosetup -n %{srcname}-%{version} %py3_shebang_fix bin/generate-inx-files %py3_shebang_fix bin/pyembroidery-convert %py3_shebang_fix bin/pyembroidery-gettext %py3_shebang_fix bin/inkstitch-fonts-gettext %py3_shebang_fix bin/inkstitch-tiles-gettext %build # Follows steps in Makefile bash bin/generate-version-file bash bin/generate-translation-files %python3 bin/generate-inx-files rm -f messages.po xgettext inx/*.inx --its=its/inx.its -o messages-inx.po ## There seems to be no proper way to set the charset to utf-8 sed -i 's/charset=CHARSET/charset=UTF-8/g' messages-inx.po bin/pyembroidery-gettext > pyembroidery-format-descriptions.py bin/inkstitch-fonts-gettext > inkstitch-fonts-metadata.py bin/inkstitch-tiles-gettext > inkstitch-tiles-metadata.py # After the inx files are finished building, we don't need the src/ # folder anymore. We don't want babel to grab possible translation # strings from that folder, so let's remove it rm -rf src/ pybabel extract -o messages-babel.po -F babel.conf --add-location=full \ --add-comments=l10n,L10n,L10N --sort-by-file --strip-comments \ -k N_ -k '$$gettext' . rm pyembroidery-format-descriptions.py inkstitch-fonts-metadata.py \ inkstitch-tiles-metadata.py msgcat -o messages.po messages-babel.po messages-inx.po %install mkdir -p %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch cp -p -r bin %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch cp -p -r dbus %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch #cp -p -r examples %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch cp -p -r fonts %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch cp -p -r inx %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch cp -p -r palettes %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch cp -p -r print %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch cp -p -r templates %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch cp -p -r tiles %{buildroot}/%{_datadir}/inkscape/extensions/inkstitch %check %pytest %files %doc README.md %doc README_de.md %doc CODE_OF_CONDUCT.md %doc LOCALIZATION.md %license LICENSE %{_datadir}/inkscape/extensions/inkstitch %changelog * Sun Oct 20 2024 Benson Muite - 3.1.0-1 - Initial packaging