[unoconv] fix unoconv on rhel
David Tardon
dtardon at fedoraproject.org
Wed May 29 12:36:17 UTC 2013
commit b4d2c6e6ba092825649f2c9588dbe9f50915151c
Author: David Tardon <dtardon at redhat.com>
Date: Wed May 29 14:34:29 2013 +0200
fix unoconv on rhel
0001-python3-added-compatibility.patch | 2 +-
unoconv.spec | 18 +++++++++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/0001-python3-added-compatibility.patch b/0001-python3-added-compatibility.patch
index c788e2d..bbf638d 100644
--- a/0001-python3-added-compatibility.patch
+++ b/0001-python3-added-compatibility.patch
@@ -2428,7 +2428,7 @@ index 0000000..09d88c2
--- /dev/null
+++ b/unoconv3.py
@@ -0,0 +1,1195 @@
-+#!/usr/bin/env python
++#!/usr/bin/env python3
+
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
diff --git a/unoconv.spec b/unoconv.spec
index 5991fcb..02c098a 100644
--- a/unoconv.spec
+++ b/unoconv.spec
@@ -1,7 +1,7 @@
Summary: Tool to convert between any document format supported by LibreOffice
Name: unoconv
Version: 0.6
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2
Group: System Environment/Base
URL: http://dag.wieers.com/home-made/unoconv/
@@ -33,18 +33,26 @@ RTF, Docbook (.xml), and more.
%install
make install DESTDIR="%{buildroot}"
-sed -i -e 1s/python/python3/ %{buildroot}/%{_bindir}/%{name}
-# we are forcing use of python3 anyway
-rm %{buildroot}/%{_bindir}/%{name}2.py
+pushd %{buildroot}/%{_bindir}
+%if 0%{?fedora} >= 19
+ mv %{name}3.py %{name}
+ rm %{name}2.py
+%else
+ mv %{name}2.py %{name}
+ rm %{name}3.py
+%endif
+popd
%files
%doc AUTHORS ChangeLog COPYING README.asciidoc WISHLIST doc/*.txt tests/
%{_mandir}/man1/%{name}.1*
%{_bindir}/%{name}
-%{_bindir}/%{name}3.py
%changelog
+* Wed May 29 2013 David Tardon <dtardon at redhat.com> - 0.6-4
+- rhbz#957776 cannot open office documents
+
* Mon Apr 08 2013 David Tardon <dtardon at redhat.com> - 0.6-3
- Resolves: rhbz#947096 unoconv doesn't work with Libreoffice 4.0
More information about the scm-commits
mailing list