[printrun] New upstream version
Miro Hrončok
churchyard at fedoraproject.org
Sat Oct 19 12:20:44 UTC 2013
commit da265a5a62933eb36df20390d3a127c48796726f
Author: Miro Hrončok <miro at hroncok.cz>
Date: Sat Oct 19 14:20:26 2013 +0200
New upstream version
.gitignore | 1 +
printrun-missing-plater-import.patch | 24 ----------
printrun-plater-not-installed.patch | 20 ---------
printrun.spec | 77 ++++++++++++---------------------
sources | 2 +-
5 files changed, 30 insertions(+), 94 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2cb49cd..cd51903 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/printrun-0.0-71e5da0.tar.gz
/printrun-0.0-80e313d.tar.gz
/printrun-0.0-b8f549b.tar.gz
+/printrun-20131019.tar.gz
diff --git a/printrun.spec b/printrun.spec
index da9b85b..8568802 100644
--- a/printrun.spec
+++ b/printrun.spec
@@ -1,30 +1,22 @@
-%global commit b8f549b6d851651fd116f752f244e25f01763017
-%global shortcommit %(c=%{commit}; echo ${c:0:7})
-%global datestamp 20130711
-%global snapshot %{datestamp}git%{shortcommit}
-# prontserve is not yet ready for production
-# it also has some unresolved dependencies in Fedora
-%global prontserve 0
Name: printrun
-Version: 0.0
-Release: 32.%{snapshot}%{?dist}
+Version: 2013.10.19
+%global tag %{name}-20131019
+Release: 1%{?dist}
Summary: RepRap printer interface and tools
License: GPLv3+
Group: Applications/Engineering
URL: https://github.com/kliment/Printrun
-Source0: https://github.com/kliment/Printrun/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+Source0: https://github.com/kliment/Printrun/archive/%{tag}.tar.gz
+
+# prontserve is not yet ready for production
+# it also has some unresolved dependencies in Fedora
+%global prontserve 0
# Desktop files
Source1: pronsole.desktop
Source2: pronterface.desktop
Source3: plater.desktop
-Patch0: %{name}-plater-not-installed.patch
-
-# https://github.com/kliment/Printrun/commit/617a86468771740d357dbb046038ff2fcb0ce997
-# https://bugzilla.redhat.com/show_bug.cgi?id=1004973
-Patch1: %{name}-missing-plater-import.patch
-
BuildRequires: Cython
BuildRequires: python2-devel
BuildRequires: desktop-file-utils
@@ -44,7 +36,6 @@ they form a pretty powerful softwarecombo. This package installs whole Printrun.
%package common
Summary: Common files for Printrun
-Requires: pyserial
%description common
Printrun is a set of G-code sending applications for RepRap.
@@ -55,6 +46,7 @@ This package contains common files.
%package -n pronsole
Summary: CLI interface for RepRap
Requires: %{name}-common = %{version}-%{release}
+Requires: pyserial
Requires: skeinforge
%description -n pronsole
@@ -82,6 +74,7 @@ It is a part of Printrun.
Summary: GUI interface for RepRap
Requires: wxPython
Requires: pronsole = %{version}-%{release}
+Requires: python-pyglet
%description -n pronterface
Pronterface is a featured G-code sender with graphical user interface.
@@ -94,9 +87,7 @@ It is a part of Printrun.
Summary: RepRap STL plater
Requires: wxPython
Requires: %{name}-common = %{version}-%{release}
-%if 0%{?fedora} > 17
Requires: python-pyglet
-%endif
%description -n plater
Plater is a GUI tool to prepare printing plate from STL files for ReRap.
@@ -106,13 +97,11 @@ It is a part of Printrun.
%prep
-%setup -qn Printrun-%{commit}
-%patch0 -p1
-%patch1 -p1
+%setup -qn Printrun-%{tag}
# use launchers for skeinforge
-sed -i 's|python skeinforge/skeinforge_application/skeinforge.py|skeinforge|' pronsole.py
-sed -i 's|python skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py|skeinforge-craft|' pronsole.py
+sed -i 's|python skeinforge/skeinforge_application/skeinforge.py|skeinforge|' %{name}/pronsole.py
+sed -i 's|python skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py|skeinforge-craft|' %{name}/pronsole.py
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
@@ -120,35 +109,28 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
# rebuild locales
cd locale
for FILE in *
- do msgfmt $FILE/LC_MESSAGES/plater.po -o $FILE/LC_MESSAGES/plater.mo || echo plater not there
- msgfmt $FILE/LC_MESSAGES/pronterface.po -o $FILE/LC_MESSAGES/pronterface.mo || echo pronterface not there
+ do msgfmt $FILE/LC_MESSAGES/plater.po -o $FILE/LC_MESSAGES/plater.mo || :
+ msgfmt $FILE/LC_MESSAGES/pronterface.po -o $FILE/LC_MESSAGES/pronterface.mo || :
done
cd ..
%install
%{__python} setup.py install --skip-build --prefix %{buildroot}%{_prefix}
-# Move the programs to python_sitelib because they are imported by other programs
-# Add symlinks to them into bindir
-mkdir -p %{buildroot}%{python_sitelib}
-for SCRIPT in printcore pronsole plater; do
- mv %{buildroot}%{_bindir}/${SCRIPT}.py %{buildroot}%{python_sitelib}
- ln -sf %{python_sitelib}/${SCRIPT}.py %{buildroot}%{_bindir}/${SCRIPT}
-done
-# Rename those programs
-for SCRIPT in prontserve pronterface; do
- mv %{buildroot}%{_bindir}/${SCRIPT}{.py,}
+cd %{buildroot}%{_bindir}
+for FILE in *.py; do
+ mv -f $FILE ${FILE%.py}
done
# Backward compatibility symlinks
%if 0%{?fedora} && 0%{?fedora} < 20
-cd %{buildroot}%{_bindir}
for FILE in *; do
-ln -sf $FILE $FILE.py
+ ln -sf $FILE $FILE.py
done
-cd -
%endif
+cd -
+
# desktop files
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2}
@@ -160,11 +142,6 @@ cp -ar %{buildroot}%{_datadir}/pronterface/locale/* %{buildroot}%{_datadir}/loca
rm -rf %{buildroot}%{_datadir}/pronterface/locale
ln -s -f %{_datadir}/locale/ %{buildroot}%{_datadir}/pronterface/ # the app expects the locale folder in here
-# exacutables
-cd %{buildroot}%{python_sitearch}/%{name}
-chmod +x gcview.py graph.py stlview.py SkeinforgeQuickEditDialog.py calibrateextruder.py
-cd -
-
%if ! 0%{?prontserve}
rm -f %{buildroot}%{_bindir}/prontserve*
%endif
@@ -177,14 +154,13 @@ rm -f %{buildroot}%{_bindir}/prontserve*
%files common
%{python_sitearch}/%{name}
-%{python_sitearch}/Printrun*
+%{python_sitearch}/Printrun-*.egg-info
%{_bindir}/printcore*
-%{python_sitelib}/printcore.py*
+%{_datadir}/pixmaps/plater.ico
%doc README* COPYING
%files -n pronsole
%{_bindir}/pronsole*
-%{python_sitelib}/pronsole.py*
%{_datadir}/pixmaps/pronsole.ico
%{_datadir}/applications/pronsole.desktop
%doc README* COPYING
@@ -204,12 +180,15 @@ rm -f %{buildroot}%{_bindir}/prontserve*
%files -n plater -f plater.lang
%{_bindir}/plater*
-%{python_sitelib}/plater.py*
-%{_datadir}/pixmaps/plater.ico
%{_datadir}/applications/plater.desktop
%doc README* COPYING
%changelog
+* Sat Oct 19 2013 Miro Hrončok <mhroncok at redhat.com> - 2013.10.19-1
+- New upstream release
+- Switch to new versioning, drop commit hashes from version/release
+- Upstream now has proper entrypoints, so entire %%install is redone
+
* Fri Sep 06 2013 Miro Hrončok <mhroncok at redhat.com> - 0.0-32.20130711gitb8f549b
- Fixed #1004973 (%%{name}-missing-plater-import.patch)
- In F <= 19 added backwards compatibility .py symlinks to bindir
diff --git a/sources b/sources
index 25e74e7..b134e17 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-df46125eefcb874800ef376acc1a6352 printrun-0.0-b8f549b.tar.gz
+ce93cddcc3e1a60d1584e15422e33897 printrun-20131019.tar.gz
More information about the scm-commits
mailing list