b6f9de5
Name:           printrun
548dbec
%global year    2015
548dbec
%global month   03
548dbec
%global day     10
f582bff
Version:        %{year}.%{month}.%{day}
f582bff
%global tag     %{name}-%{year}%{month}%{day}
4cf20b3
Release:        7%{?dist}
b6f9de5
Summary:        RepRap printer interface and tools
157b2d8
# AppData is CC0
157b2d8
License:        GPLv3+ and CC0
b6f9de5
Group:          Applications/Engineering
b6f9de5
URL:            https://github.com/kliment/Printrun
da265a5
Source0:        https://github.com/kliment/Printrun/archive/%{tag}.tar.gz
da265a5
7d3fbc1
# https://bugzilla.redhat.com/show_bug.cgi?id=1231518
7d3fbc1
Patch0:         %{name}-gtk3.patch
659d539
fad4731
# https://github.com/kliment/Printrun/pull/790
fad4731
Patch1:         %{name}-x11.patch
fad4731
cbe14eb
BuildRequires:  Cython
b6f9de5
BuildRequires:  python2-devel
b6f9de5
BuildRequires:  desktop-file-utils
b6f9de5
BuildRequires:  gettext
91630d3
BuildRequires:  pyserial
b6f9de5
Requires:       pronterface = %{version}-%{release}
b6f9de5
Requires:       pronsole = %{version}-%{release}
b6f9de5
Requires:       plater = %{version}-%{release}
b6f9de5
b6f9de5
%description
b6f9de5
Printrun is a set of G-code sending applications for RepRap.
b6f9de5
It consists of printcore (dumb G-code sender), pronsole (featured command line
b6f9de5
G-code sender), pronterface (featured G-code sender with graphical user
2cf6372
interface), and a small collection of helpful scripts.
2cf6372
This package installs whole Printrun.
b6f9de5
b6f9de5
###############################################
b6f9de5
b6f9de5
%package        common
b6f9de5
Summary:        Common files for Printrun
b6f9de5
b6f9de5
%description    common
b6f9de5
Printrun is a set of G-code sending applications for RepRap.
b6f9de5
This package contains common files.
b6f9de5
b6f9de5
###############################################
b6f9de5
b6f9de5
%package     -n pronsole
b6f9de5
Summary:        CLI interface for RepRap
da265a5
Requires:       pyserial
f045d2a
Requires:       %{name}-common = %{version}-%{release}
faf0b19
# So that it just works
faf0b19
Requires:       3dprinter-udev-rules
faf0b19
21b3e82
BuildArch:      noarch
b6f9de5
b6f9de5
%description -n pronsole
b6f9de5
Pronsole is a featured command line G-code sender.
2cf6372
It controls the ReRap printer. It is a part of Printrun.
b6f9de5
e0152d4
################################################
e0152d4
b6f9de5
%package     -n pronterface
b6f9de5
Summary:        GUI interface for RepRap
b6f9de5
Requires:       wxPython
5b7f228
Requires:       numpy
f045d2a
Requires:       python-cairosvg
5b7f228
Requires:       python-psutil
da265a5
Requires:       python-pyglet
df0583b
Requires:       simarrange
f045d2a
Requires:       pronsole = %{version}-%{release}
faf0b19
# So that it just works
faf0b19
Requires:       3dprinter-udev-rules
faf0b19
21b3e82
BuildArch:      noarch
b6f9de5
b6f9de5
%description -n pronterface
b6f9de5
Pronterface is a featured G-code sender with graphical user interface.
2cf6372
It controls the ReRap printer. It is a part of Printrun.
b6f9de5
b6f9de5
###############################################
b6f9de5
b6f9de5
%package     -n plater
b6f9de5
Summary:        RepRap STL plater
b6f9de5
Requires:       wxPython
b6f9de5
Requires:       %{name}-common = %{version}-%{release}
5b7f228
Requires:       numpy
5b7f228
Requires:       python-psutil
f881a0d
Requires:       python-pyglet
df0583b
Requires:       simarrange
21b3e82
BuildArch:      noarch
b6f9de5
b6f9de5
%description -n plater
b6f9de5
Plater is a GUI tool to prepare printing plate from STL files for ReRap.
b6f9de5
It is a part of Printrun.
b6f9de5
b6f9de5
###############################################
b6f9de5
b6f9de5
b6f9de5
%prep
da265a5
%setup -qn Printrun-%{tag}
7d3fbc1
%patch0 -p0
fad4731
%patch1 -p1
659d539
2cf6372
# remove bundled skeinforge link
b97629a
sed -i 's|python skeinforge/skeinforge_application/skeinforge.py|set-your-slicer-in-settings|' %{name}/settings.py
b97629a
sed -i 's|python skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py|set-your-slicer-in-settings|' %{name}/settings.py
b6f9de5
a09eb22
# sed upstream's desktop files to remove .py extensions from Exec
a09eb22
sed -i 's/.py//' *.desktop
a09eb22
b6f9de5
%build
b6f9de5
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
b6f9de5
b6f9de5
# rebuild locales
b6f9de5
cd locale
b6f9de5
for FILE in *
da265a5
  do msgfmt $FILE/LC_MESSAGES/plater.po -o $FILE/LC_MESSAGES/plater.mo || :
da265a5
     msgfmt $FILE/LC_MESSAGES/pronterface.po -o $FILE/LC_MESSAGES/pronterface.mo || :
b6f9de5
done
b6f9de5
cd ..
b6f9de5
b6f9de5
%install
b6f9de5
%{__python} setup.py install --skip-build --prefix %{buildroot}%{_prefix}
b6f9de5
da265a5
cd %{buildroot}%{_bindir}
da265a5
for FILE in *.py; do
da265a5
  mv -f $FILE ${FILE%.py}
7d5ab75
done
7d5ab75
da265a5
cd -
da265a5
b6f9de5
# desktop files
f582bff
desktop-file-validate %{buildroot}%{_datadir}/applications/pronterface.desktop
f582bff
desktop-file-validate %{buildroot}%{_datadir}/applications/pronsole.desktop
f582bff
desktop-file-validate %{buildroot}%{_datadir}/applications/plater.desktop
7201013
b6f9de5
# locales
b6f9de5
mkdir -p %{buildroot}%{_datadir}/locale
b6f9de5
cp -ar %{buildroot}%{_datadir}/pronterface/locale/* %{buildroot}%{_datadir}/locale
b6f9de5
rm -rf %{buildroot}%{_datadir}/pronterface/locale
b6f9de5
ln -s -f %{_datadir}/locale/ %{buildroot}%{_datadir}/pronterface/ # the app expects the locale folder in here
b6f9de5
b6f9de5
%{find_lang} pronterface
b6f9de5
%{find_lang} plater
b6f9de5
b6f9de5
%files
b6f9de5
%doc README* COPYING
b6f9de5
b6f9de5
%files common
9bd0d18
%{python_sitearch}/%{name}
da265a5
%{python_sitearch}/Printrun-*.egg-info
cb92866
%{_bindir}/printcore*
659d539
%{_datadir}/pixmaps/plater.png
b6f9de5
%doc README* COPYING
b6f9de5
b6f9de5
%files -n pronsole
cb92866
%{_bindir}/pronsole*
659d539
%{_datadir}/pixmaps/pronsole.png
b6f9de5
%{_datadir}/applications/pronsole.desktop
7201013
%if 0%{?fedora} < 21
7201013
%dir %{_datadir}/appdata
7201013
%endif
7201013
%{_datadir}/appdata/pronsole.appdata.xml
b6f9de5
%doc README* COPYING
b6f9de5
b6f9de5
%files -n pronterface -f pronterface.lang
cb92866
%{_bindir}/pronterface*
b6f9de5
%{_datadir}/pronterface
659d539
%{_datadir}/pixmaps/pronterface.png
b6f9de5
%{_datadir}/applications/pronterface.desktop
7201013
%if 0%{?fedora} < 21
7201013
%dir %{_datadir}/appdata
7201013
%endif
7201013
%{_datadir}/appdata/pronterface.appdata.xml
b6f9de5
%doc README* COPYING
b6f9de5
b6f9de5
%files -n plater -f plater.lang
cb92866
%{_bindir}/plater*
b6f9de5
%{_datadir}/applications/plater.desktop
7201013
%if 0%{?fedora} < 21
7201013
%dir %{_datadir}/appdata
7201013
%endif
7201013
%{_datadir}/appdata/plater.appdata.xml
b6f9de5
%doc README* COPYING
b6f9de5
b6f9de5
%changelog
4cf20b3
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2015.03.10-7
4cf20b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4cf20b3
fad4731
* Sat Dec 10 2016 Miro Hrončok <mhroncok@redhat.com> - 2015.03.10-6
fad4731
- Add a patch to always run on X11
fad4731
029c8db
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2015.03.10-5
029c8db
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
029c8db
faf0b19
* Fri Mar 25 2016 Miro Hrončok <mhroncok@redhat.com> - 2015.03.10-4
faf0b19
- Require 3dprinter-udev-rules
faf0b19
11cc8d2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2015.03.10-3
11cc8d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
11cc8d2
7d3fbc1
* Sun Jul 05 2015 Miro Hrončok <mhroncok@redhat.com> - 2015.03.10-2
7d3fbc1
- Add patch to resolve GTK3 issues (by Scott Talbert) (#1231518)
7d3fbc1
548dbec
* Fri Jun 19 2015 Miro Hrončok <mhroncok@redhat.com> - 2015.03.10-1
548dbec
- Update to 2015.03.10
548dbec
- Removed no longer needed simarrange patch
548dbec
07d075c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2014.08.01-2
07d075c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
07d075c
eab7a00
* Mon Dec 29 2014 Miro Hrončok <mhroncok@redhat.com> - 2014.08.01-1
eab7a00
- Update to 2014.08.01 (minor upstream fix)
ea8c7bd
- Remove prontserve from the spec
ea8c7bd
- Remove Fedora <> 20 conditions
5b7f228
- pronterface and plater require python-psutil and numpy (#1171319)
b97629a
- the slicer command is now in different file
ea8c7bd
2cf6372
* Sat Oct 25 2014 Miro Hrončok <mhroncok@redhat.com> - 2014.07.30-3
2cf6372
- Do not longer depend on skeinforge, as it appears nobody uses it
2cf6372
9d57e4c
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2014.07.30-2
9d57e4c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9d57e4c
5d80665
* Wed Jul 30 2014 Miro Hrončok <mhroncok@redhat.com> - 2014.07.30-1
5d80665
- New version
5d80665
- Remove merged patches
5d80665
f89227e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2014.01.26-4
f89227e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f89227e
659d539
* Wed Mar 19 2014 Miro Hrončok <mhroncok@redhat.com> - 2014.01.26-3
659d539
- Use PNG icons, so AppData works
659d539
97023eb
* Mon Mar 17 2014 Miro Hrončok <mhroncok@redhat.com> - 2014.01.26-2
97023eb
- Fix 1077126
97023eb
f582bff
* Wed Mar 05 2014 Miro Hrončok <mhroncok@redhat.com> - 2014.01.26-1
f582bff
- New version
f582bff
- Do not ship our own desktop and appdata files, now it's in tarball
f582bff
- Add macros to simplify the version to gittag conversion
f582bff
- Remove merged patches and rebased simmarange patch
91630d3
- Build require pyserial
a09eb22
- sed upstream's desktop files to remove .py
f582bff
21b3e82
* Fri Dec 27 2013 Miro Hrončok <mhroncok@redhat.com> - 2013.10.19-8
21b3e82
- Make subpackages other than common noarch on F21+
21b3e82
7201013
* Fri Dec 27 2013 Miro Hrončok <mhroncok@redhat.com> - 2013.10.19-7
7201013
- Add AppData
7201013
df0583b
* Fri Nov 15 2013 Miro Hrončok <mhroncok@redhat.com> - 2013.10.19-6
df0583b
- Use system's simarrange in plater
df0583b
210f350
* Wed Nov 13 2013 Miro Hrončok <mhroncok@redhat.com> - 2013.10.19-5
210f350
- Finally, this seems like a proper fix for 438
210f350
d3875d9
* Sun Nov 10 2013 Miro Hrončok <mhroncok@redhat.com> - 2013.10.19-4
d3875d9
- Go back to our workaround
d3875d9
d3875d9
* Sun Nov 10 2013 Miro Hrončok <mhroncok@redhat.com> - 2013.10.19-3
d3875d9
- Bad upstream "proper" fix for 438
d3875d9
2106dd3
* Tue Oct 29 2013 Miro Hrončok <mhroncok@redhat.com> - 2013.10.19-2
2106dd3
- Added patch to workaround upstream issue 438
2106dd3
da265a5
* Sat Oct 19 2013 Miro Hrončok <mhroncok@redhat.com> - 2013.10.19-1
da265a5
- New upstream release
da265a5
- Switch to new versioning, drop commit hashes from version/release
da265a5
- Upstream now has proper entrypoints, so entire %%install is redone
da265a5
cb92866
* Fri Sep 06 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-32.20130711gitb8f549b
cb92866
- Fixed #1004973 (%%{name}-missing-plater-import.patch)
cb92866
- In F <= 19 added backwards compatibility .py symlinks to bindir
cb92866
- Added asterisk at the end of bindir content in %%files to also match those symlinkss
cb92866
9bf7b18
* Sun Aug 11 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-31.20130711gitb8f549b
9bf7b18
- No longer have .py named scripts in bindir
9bf7b18
65cb7a7
* Sat Aug 10 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-30.20130711gitb8f549b
65cb7a7
- Fix bad patch
65cb7a7
10f53c9
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0-29.20130711gitb8f549b
10f53c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
10f53c9
9bd0d18
* Wed Jul 24 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-28.20130711gitb8f549b
9bd0d18
- New upstream tag release
9bd0d18
- Corrected bogus date in %%changelog
9bd0d18
- Flush patch no longer needed
9bd0d18
- No longer NoArch
cbe14eb
- BR added Cython
9bd0d18
f8def5e
* Thu Jun 20 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-27.20130604git80e313d
f8def5e
- Added patch to solve upstream issue 402
f8def5e
e0152d4
* Tue Jun 18 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-26.20130604git80e313d
e0152d4
- Upstream released tag release 20130604
e0152d4
- Pyglet 1.2 issue fixed in upstream, removed patch
e0152d4
- Prepared spec for prontserve but do not produce the package yet (not all deps satisfied)
e0152d4
f881a0d
* Tue Jun 18 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-25.20130123git71e5da0
f881a0d
- When printrun is installed and plater not, don't crash when clicking Compose
f881a0d
- Require pyglet for plater for F18+
f881a0d
3e280c1
* Fri Jun 07 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-24.20130123git71e5da0
3e280c1
- Fixed Pyglet 1.2 issue (#868266)
3e280c1
2ab5b98
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0-23.20130123git71e5da0
2ab5b98
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2ab5b98
aeef08f
* Wed Jan 23 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-22.20130123git71e5da0
f636e81
- Pull request merged
f636e81
- Updated to new commit
f636e81
- Removed pacth (no longer needed)
f636e81
cf8a462
* Wed Jan 23 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-21.20130113git5897fbc
cf8a462
- Handle UTF-8 encode better in patch
cf8a462
18fa076
* Wed Jan 23 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-20.20130113git5897fbc
18fa076
- Removing UTF-8 removal from patch
18fa076
b6f9de5
* Sat Jan 19 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-19.20130113git5897fbc
b6f9de5
- Removed run-time deps, that are resolved automatically
b6f9de5
b6f9de5
* Sat Jan 19 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-18.20130113git5897fbc
b6f9de5
- Added patch from my pull request
b6f9de5
b6f9de5
* Sun Jan 13 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-17.20130113git5897fbc
b6f9de5
- New "version" (bugfix)
b6f9de5
b6f9de5
* Sun Jan 13 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-16.20130113git094dffa
b6f9de5
- New upstream "version", where everything is GPLv3+
b6f9de5
- pronsole.ico and gcoder.py now part of setup.py
b6f9de5
- Skeinforge path changing moved from %%install to %%prep
b6f9de5
- Commented macros in changelog
b6f9de5
- Use skeinforge launchers in default settings
b6f9de5
- Pronterface lang moved from common to pronterface, is not needed by pronsole any more
b6f9de5
b6f9de5
* Wed Jan 09 2013 Miro Hrončok <mhroncok@redhat.com> - 0.0-15.20121103git6fa4766
b6f9de5
- Updated to respect new GitHub rule
b6f9de5
b6f9de5
* Mon Dec 31 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-14.20121103git6fa47668f2
b6f9de5
- Changed location of skeinforge from %%{_datadir}/%%{name}/
b6f9de5
                                   to %%{python_sitelib}/%%{name}
b6f9de5
b6f9de5
* Sun Dec 30 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-13.20121103git6fa47668f2
b6f9de5
- Do not download the desktop files from my GitHub
b6f9de5
b6f9de5
* Fri Nov 23 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-12.20121103git6fa47668f2
b6f9de5
- Fixing a source mistake
b6f9de5
- Redone, using setup.py now
b6f9de5
b6f9de5
* Fri Nov 23 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-11.20121103git6fa47668f2
b6f9de5
- New upstream "version" (merge from experimetal)
b6f9de5
- Commented macros in comments
b6f9de5
- Playing a bit with attr
b6f9de5
b6f9de5
* Mon Oct 29 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-10-20120924gitb6935b93
b6f9de5
- Switched generic names and names in desktop files
b6f9de5
- Don't use rm, cp and ln -s macros
b6f9de5
b6f9de5
* Tue Oct 09 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-9-20120924gitb6935b93
b6f9de5
- updated bash lounchers
b6f9de5
b6f9de5
* Tue Oct 09 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-8-20120924gitb6935b93
b6f9de5
- ln -s skeinforge
b6f9de5
- printrun requires exact version and release
b6f9de5
b6f9de5
* Thu Oct 04 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-7-20120924gitb6935b93
b6f9de5
- New sources links
b6f9de5
9bd0d18
* Sat Sep 22 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-6-20120924gitb6935b93
b6f9de5
- New commits, inlude the license
b6f9de5
9bd0d18
* Sat Sep 22 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-5-20120921gitdceaf26f
b6f9de5
- launching scripts now pass the params
b6f9de5
b6f9de5
* Fri Sep 21 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-4-20120921gitdceaf26f
b6f9de5
- Build gettext
b6f9de5
b6f9de5
* Fri Sep 21 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-3-20120921gitdceaf26f
b6f9de5
- BuildRequires:  desktop-file-utils
b6f9de5
b6f9de5
* Fri Sep 21 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-2-20120921gitdceaf26f
b6f9de5
- Language files correctly added
b6f9de5
b6f9de5
* Fri Sep 21 2012 Miro Hrončok <miro@hroncok.cz> - 0.0-1-20120921gitdceaf26f
b6f9de5
- New package