53a326f
%global date 20180606
53a326f
%global commit0 46454c293a9b390c931b52eb6217ca47e13b0231
8450ab1
%global shortcommit0 %(c=%{commit0}; echo ${c:0:12})
53a326f
53a326f
%global date_year  %(c=%{date}; printf %d ${c:0:4})
53a326f
%global date_month %(c=%{date}; printf %d ${c:4:2})
53a326f
%global date_day   %(c=%{date}; printf %d ${c:6:2})
53a326f
8450ab1
%global the_owner jpcgt
8450ab1
8450ab1
Name:           flatcam
8450ab1
Version:        8.5
9fa34d6
Release:        20.%{date}git%{shortcommit0}%{?dist}
8450ab1
Summary:        2D Computer-Aided PCB Manufacturing
8450ab1
License:        MIT
8450ab1
Url:            http://flatcam.org/
8450ab1
Source0:        https://bitbucket.org/%{the_owner}/%{name}/get/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
8450ab1
# Reported upstream as: https://bitbucket.org/jpcgt/flatcam/pull-requests/74
8450ab1
Patch0:         https://bitbucket.org/dwrobel/%{name}/commits/bf0c59ba2b9c78815270607f6d814e93af410cf8/raw#/%{name}.appdata.xml
53a326f
# Reported upstream as: https://bitbucket.org/jpcgt/flatcam/pull-requests/125
53a326f
Patch1:         https://bitbucket.org/dwrobel/flatcam/commits/0d2cb7e53e629a1c8d5ba790752e4a4d605065bc/raw#/%{name}-setup-update.patch
53a326f
# Disable checks for the latest version of the program
53a326f
Patch2:         https://bitbucket.org/dwrobel/flatcam/commits/002a69f71632a3bb2d71302b24aae6b4d449557d/raw#/%{name}-disable-checks-for-the-latest-version-of-the-program.patch
8450ab1
BuildArch:      noarch
8450ab1
8450ab1
BuildRequires:  /usr/bin/git
53a326f
BuildRequires:  python3-devel
4624996
BuildRequires:  python3-setuptools
8450ab1
BuildRequires:  desktop-file-utils
8450ab1
BuildRequires:  libappstream-glib
8450ab1
53a326f
Requires:       %{py3_dist simplejson}
327ea57
Requires:       python3-PyQt4
53a326f
Requires:       %{py3_dist numpy}
53a326f
Requires:       %{py3_dist scipy}
53a326f
Requires:       python3-svg-path
53a326f
Requires:       %{py3_dist matplotlib}
53a326f
Requires:       python3-matplotlib-qt4
53a326f
Requires:       %{py3_dist rtree}
53a326f
Requires:       %{py3_dist shapely}
8450ab1
Requires:       hicolor-icon-theme
8450ab1
8450ab1
8450ab1
%description
8450ab1
A program for preparing CNC jobs for making PCBs on a CNC router.
8450ab1
Among other things, it can take a Gerber file generated by your favorite PCB
8450ab1
CAD program, and create G-Code for Isolation routing.
8450ab1
8450ab1
8450ab1
%prep
8450ab1
%autosetup -S git -n %{the_owner}-%{name}-%{shortcommit0}
8450ab1
rm -f setup_ubuntu.sh setup_ubuntu.sh upgrade_geos.sh
8450ab1
53a326f
# Update version string in About menu
53a326f
sed -i -e "s/\(\"number\":\).*/\1 \"git-%{shortcommit0}\",/g" \
53a326f
       -e "s/\(\"date\":\).*/\1 \(%{date_year}, %{date_month}, %{date_day}\),/g" \
53a326f
    FlatCAMVersion.py
53a326f
8450ab1
8450ab1
%build
53a326f
%py3_build
8450ab1
8450ab1
8450ab1
%install
53a326f
%py3_install
8450ab1
8450ab1
# install icon file
8450ab1
install -d %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
8450ab1
ln -sfr %{buildroot}%{_datadir}/%{name}/%{name}_icon128_inv.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
8450ab1
8450ab1
# install desktop file
8450ab1
install -p -D %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
8450ab1
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
8450ab1
8450ab1
# install and validate appdata
8450ab1
install -p -m 0644 -D %{name}.appdata.xml %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml
8450ab1
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
8450ab1
8450ab1
%files
8450ab1
%license LICENSE
8450ab1
%doc README.md
8450ab1
%{_bindir}/%{name}
53a326f
%{python3_sitelib}/*
8450ab1
%dir %{_datadir}/%{name}/
8450ab1
%{_datadir}/%{name}/*
8450ab1
%{_datadir}/applications/%{name}.desktop
8450ab1
%{_datadir}/icons/hicolor/*
8450ab1
%{_datadir}/appdata/*.appdata.xml
8450ab1
8450ab1
8450ab1
%changelog
9fa34d6
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.5-20.20180606git46454c293a9b
9fa34d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
9fa34d6
4624996
* Tue Jun 23 2020 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.5-19.20180606git46454c293a9b
4624996
- Add BR python3-setuptools
4624996
7231d02
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 8.5-18.20180606git46454c293a9b
7231d02
- Rebuilt for Python 3.9
7231d02
51b9fea
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.5-17.20180606git46454c293a9b
51b9fea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
51b9fea
497d3e5
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 8.5-16.20180606git46454c293a9b
497d3e5
- Rebuilt for Python 3.8.0rc1 (#1748018)
497d3e5
338e98f
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 8.5-15.20180606git46454c293a9b
338e98f
- Rebuilt for Python 3.8
338e98f
04180b8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.5-14.20180606git46454c293a9b
04180b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
04180b8
1d004a9
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.5-13.20180606git46454c293a9b
1d004a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1d004a9
327ea57
* Sun Dec 09 2018 Miro Hrončok <mhroncok@redhat.com> - 8.5-12.20180606git46454c293a9b
327ea57
- Require python3-PyQt4 instead of (python2-)PyQt4
327ea57
53a326f
* Sat Sep 08 2018 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.5-11.20180606git46454c293a9b
53a326f
- Update to the latest version
53a326f
- Switch to python3
53a326f
d5c7444
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.5-10.20170701gita9a4ec75db12
d5c7444
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d5c7444
0aa4dde
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.5-9.20170701gita9a4ec75db12
0aa4dde
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0aa4dde
ee1bd1b
* Thu Jan 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 8.5-8.20170701gita9a4ec75db12
ee1bd1b
- Remove obsolete scriptlets
ee1bd1b
8235dcf
* Sat Aug 26 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.5-7.20170701gita9a4ec75db12
8235dcf
- Use non-versioning Requires: for python-svg-path.
8235dcf
8450ab1
* Thu Aug 24 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.5-6.20170701gita9a4ec75db12
8450ab1
- Add direct Requires instead of %%{py2_dist svg-path} macro.
8450ab1
8450ab1
* Thu Aug 24 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.5-5.20170701gita9a4ec75db12
8450ab1
- Switch to use python2dist macros,
8450ab1
- Add upstream link to AppData patch.
8450ab1
8450ab1
* Tue Aug 22 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.5-4.20170701gita9a4ec75db12
8450ab1
- Drop patches upstream merged,
8450ab1
- Add AppData metadata.
8450ab1
8450ab1
* Wed May 31 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.5-3.20170519git58f66ca8664b
8450ab1
- Install .desktop and icons files.
8450ab1
8450ab1
* Sat May 27 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.5-2.20170519git58f66ca8664b
8450ab1
- Fix startup script.
8450ab1
8450ab1
* Tue May 23 2017 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 8.4.20151026-1
8450ab1
- Initial RPM release.