diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3fc847d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/op1svg-50a3b01ebb74fd07b33d91c08b1e59e11494801d.tar.gz diff --git a/python-op1svg.spec b/python-op1svg.spec new file mode 100644 index 0000000..386ad03 --- /dev/null +++ b/python-op1svg.spec @@ -0,0 +1,61 @@ +# Created by pyp2rpm-3.3.6 +%global pypi_name op1svg + +%global forgeurl https://github.com/op1hacks/op1svg +%global commit 50a3b01ebb74fd07b33d91c08b1e59e11494801d +%forgemeta + +%global common_description %{expand: +op1svg normalizes SVG files so that the OP-1 understands them: +- Remove unsupported tags and attributes +- Remove comments +- Convert styles to attributes, and drop unsupported styles +- Fix decimals; a maximum of 4 decimals is supported by the OP-1 +- Reformat the path data in paths} + +Name: python-%{pypi_name} +Version: 0.1.0 +Release: 1%{?dist} +Summary: Normalize SVG files so that the OP-1 understands them + +License: MIT +URL: %{forgeurl} +Source0: %{forgesource} +BuildArch: noarch + +BuildRequires: sed +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) + +%description +%{common_description} + +%package -n %{pypi_name} +Summary: %{summary} + +%description -n %{pypi_name} +%{common_description} + +%prep +%forgesetup +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info +# Remove unneeded shebang +sed -e "\|#!/usr/bin/env python3|d" -i %{pypi_name}/*.py + +%build +%py3_build + +%install +%py3_install + +%files -n %{pypi_name} +%license LICENSE +%doc README.md template +%{_bindir}/op1svg +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%changelog +* Sat Apr 24 2021 Davide Cavalca - 0.1.0-1.20210419git50a3b01 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..1e2dade --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (op1svg-50a3b01ebb74fd07b33d91c08b1e59e11494801d.tar.gz) = e69c31ac1780946198ea45574b303c22572fff778b190f31f1815659378564a7ff7adf65646d8cac3e2a2f1a7d7dacc855b4610049a06d94079555cd4b3c815a