b8cb12f
%{?python_enable_dependency_generator}
a3b8b03
%global date 20190103
ff3caad
%global vdate %(x=%{date}; echo "${x:0:4}-${x:4:2}-${x:6:2}")
ff3caad
%global py_setup st-setup.py
ff3caad
ff3caad
ff3caad
Name:           dxf2gcode
ff3caad
Version:        %{date}
19e17fe
Release:        3%{?dist}
ff3caad
Summary:        2D drawings to CNC machine compatible G-Code converter
ff3caad
License:        GPLv3+ and MIT
ff3caad
Url:            https://sourceforge.net/p/dxf2gcode/wiki/Home/
83d2f4a
Source0:        https://sourceforge.net/projects/%{name}/files/%{name}-%{version}.zip
ff3caad
ff3caad
BuildArch:      noarch
ff3caad
ff3caad
BuildRequires:  /usr/bin/git
ff3caad
BuildRequires:  desktop-file-utils
ff3caad
BuildRequires:  libappstream-glib
ff3caad
BuildRequires:  python3-devel
b8cb12f
BuildRequires:  python3-setuptools
ff3caad
BuildRequires:  qt5-linguist
a938d4b
BuildRequires:  /usr/bin/pyuic5
a938d4b
BuildRequires:  /usr/bin/pyrcc5
b8cb12f
BuildRequires:  python3dist(pyopengl)
b8cb12f
BuildRequires:  python3dist(pyqt5)
b8cb12f
BuildRequires:  python3dist(configobj)
ff3caad
83d2f4a
Requires:       /usr/bin/pdftops
ff3caad
Requires:       /usr/bin/pstoedit
ff3caad
Requires:       hicolor-icon-theme
ff3caad
ff3caad
ff3caad
%description
ff3caad
%{name} is a tool for converting 2D (DXF, PDF, PS) drawings to CNC machine
ff3caad
compatible GCode. It has the following features:
ff3caad
    - Integration in EMC2,
ff3caad
    - Fully adjustable Postprocessor,
ff3caad
    - G0 moves reduction by route optimization,
ff3caad
    - Import of DXF and PDF,
ff3caad
    - Improved accuracy for splines import by Line and Arc's,
ff3caad
    - Mill parameter specification by layers,
ff3caad
    - Drag knife and lathe support,
ff3caad
    - Breaks a.k.a Tabs support,
ff3caad
    - AutoCAD Blocks and Inserts,
ff3caad
    - Multiple tools,
ff3caad
    - Multiple language support: English, German, French, Russian,
ff3caad
    - 3D viewer.
ff3caad
ff3caad
ff3caad
%prep
83d2f4a
%autosetup -S git
ff3caad
ff3caad
ff3caad
%build
ff3caad
# regenerate *images5_rc.py and *ui5.py files
ff3caad
python3 ./make_py_uic.py 5
ff3caad
# regenerate translation files
ff3caad
lrelease-qt5 i18n/*.ts
ff3caad
%py3_build
ff3caad
ff3caad
ff3caad
%install
ff3caad
%py3_install
ff3caad
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
a3b8b03
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml
ff3caad
%find_lang %{name} --with-qt --without-mo
ff3caad
ff3caad
%files -f %{name}.lang
83d2f4a
%license COPYING
83d2f4a
%doc README.txt
ff3caad
%{_bindir}/%{name}
ff3caad
%{python3_sitelib}/*
ff3caad
%dir %{_datadir}/%{name}
ff3caad
%dir %{_datadir}/%{name}/i18n
ff3caad
%{_datadir}/applications/%{name}.desktop
ff3caad
%{_datadir}/icons/hicolor/*
a3b8b03
%{_datadir}/metainfo/*.appdata.xml
ff3caad
ff3caad
ff3caad
%changelog
19e17fe
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 20190103-3
19e17fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
19e17fe
b8cb12f
* Fri Jan 04 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 20190103-2
b8cb12f
- Enable python dependency generator
b8cb12f
a3b8b03
* Thu Jan 03 2019 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 20190103-1
a3b8b03
- Update to the latest available version
a3b8b03
09d6b20
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20170925-5
09d6b20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
09d6b20
6d61a4c
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 20170925-4
6d61a4c
- Rebuilt for Python 3.7
6d61a4c
ff0ccc3
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20170925-3
ff0ccc3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ff0ccc3
4f403c7
* Thu Jan 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 20170925-2
4f403c7
- Remove obsolete scriptlets
4f403c7
83d2f4a
* Mon Sep 25 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 20170925-1
83d2f4a
- Update to the lastest available version.
83d2f4a
83d2f4a
* Thu Sep 14 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 20170915-1
83d2f4a
- Drop upstream patches,
83d2f4a
- Use tarball generated by python3 st-setup.py sdist
83d2f4a
83d2f4a
* Tue Sep 12 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 20170503-2
83d2f4a
- Add upstream fixes.
83d2f4a
ff3caad
* Wed Sep 06 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 20170503-1
ff3caad
- Initial RPM release.