[tryton] fix installing language files

Dan Horák sharkcz at fedoraproject.org
Mon Jun 4 14:40:50 UTC 2012


commit 51cbd48829c7a32f80c6270e214c8a942c7ccf62
Author: Dan Horák <dan at danny.cz>
Date:   Mon Jun 4 16:40:33 2012 +0200

    fix installing language files

 tryton-2.4.0-setup-lang.patch |   12 ++++++++++++
 tryton.spec                   |   10 +++-------
 2 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/tryton-2.4.0-setup-lang.patch b/tryton-2.4.0-setup-lang.patch
new file mode 100644
index 0000000..df1259e
--- /dev/null
+++ b/tryton-2.4.0-setup-lang.patch
@@ -0,0 +1,12 @@
+diff -up tryton-2.4.0/setup.py.orig tryton-2.4.0/setup.py
+--- tryton-2.4.0/setup.py.orig	2012-04-21 23:57:10.000000000 +0200
++++ tryton-2.4.0/setup.py	2012-06-04 16:31:57.000000000 +0200
+@@ -62,7 +62,7 @@ data_files = [
+ for lang in languages:
+     data_files += [
+         ('share/locale/%s/LC_MESSAGES' % lang,
+-            glob.glob('share/locale/%s/LC_MESSAGES/*.mo')),
++            glob.glob('share/locale/%s/LC_MESSAGES/*.mo' % lang)),
+         ]
+ 
+ if os.name == 'nt':
diff --git a/tryton.spec b/tryton.spec
index 27faa33..93a0d23 100644
--- a/tryton.spec
+++ b/tryton.spec
@@ -17,7 +17,8 @@ Group:          Applications/Productivity
 License:        GPLv3+
 URL:            http://www.tryton.org
 Source0:        http://downloads.tryton.org/%{major}/%{name}-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# http://hg.tryton.org/tryton/rev/1aa6aa450c48
+Patch0:         %{name}-2.4.0-setup-lang.patch
 
 BuildArch:      noarch
 BuildRequires:  python-devel
@@ -41,6 +42,7 @@ in the trytond package.
 
 %prep
 %setup -q
+%patch0 -p1 -b .lang
 
 
 %build
@@ -54,7 +56,6 @@ popd
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
 
 desktop-file-install --vendor=fedora                            \
@@ -69,12 +70,7 @@ popd
 %find_lang %{name}
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files -f %{name}.lang
-%defattr(-,root,root,-)
 %doc CHANGELOG COPYRIGHT INSTALL LICENSE README TODO
 %if %{with_docs}
 %doc doc/_build/html


More information about the scm-commits mailing list