From 3f69f4d719956cd407a0762247e7fe7c60d92a5d Mon Sep 17 00:00:00 2001 From: Neal Becker Date: Tue, 5 Oct 2010 11:25:31 -0400 Subject: [PATCH 1/3] install translations --- mercurial.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mercurial.spec b/mercurial.spec index e08ae74..eaaaa10 100644 --- a/mercurial.spec +++ b/mercurial.spec @@ -3,7 +3,7 @@ Summary: Mercurial -- a distributed SCM Name: mercurial Version: 1.6.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Development/Tools URL: http://www.selenic.com/mercurial/ @@ -13,7 +13,7 @@ Source1: mercurial-site-start.el #Patch0: mercurial-mergetools.hgrc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python python-devel -BuildRequires: emacs emacs-el pkgconfig +BuildRequires: emacs emacs-el pkgconfig gettext Requires: python Provides: hg = %{version}-%{release} @@ -129,10 +129,17 @@ install -m 644 hgk.rc $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d install -m 644 contrib/mergetools.hgrc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/mergetools.rc +mv $RPM_BUILD_ROOT%{python_sitearch}/mercurial/locale $RPM_BUILD_ROOT%{_datadir}/locale + +%find_lang hg + +grep -v locale %{name}-base.files > %{name}-base-filtered.files +cat %{name}-base-filtered.files hg.lang > %{name}-base+hg.lang.files + %clean rm -rf $RPM_BUILD_ROOT -%files -f %{name}-base.files +%files -f %{name}-base+hg.lang.files %defattr(-,root,root,-) %doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi %doc %attr(644,root,root) %{_mandir}/man?/hg*.gz From 0a9c4559799732aedba522e943262460772084f3 Mon Sep 17 00:00:00 2001 From: Neal Becker Date: Wed, 6 Oct 2010 08:39:14 -0400 Subject: [PATCH 2/3] add patch mercurial-i18n.patch for locale --- mercurial-i18n.patch | 19 +++++++++++++++++++ mercurial.spec | 7 ++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 mercurial-i18n.patch diff --git a/mercurial-i18n.patch b/mercurial-i18n.patch new file mode 100644 index 0000000..b99beb8 --- /dev/null +++ b/mercurial-i18n.patch @@ -0,0 +1,19 @@ +*** /tmp/ediff2864wKI 2010-10-06 08:30:42.639138469 -0400 +--- mercurial/i18n.py 2010-10-06 08:29:26.720138409 -0400 +*************** +*** 15,21 **** + module = __file__ + + base = os.path.dirname(module) +! for dir in ('.', '..'): + localedir = os.path.join(base, dir, 'locale') + if os.path.isdir(localedir): + break +--- 15,21 ---- + module = __file__ + + base = os.path.dirname(module) +! for dir in ('.', '..', '/usr/share'): + localedir = os.path.join(base, dir, 'locale') + if os.path.isdir(localedir): + break diff --git a/mercurial.spec b/mercurial.spec index eaaaa10..2bc9ed6 100644 --- a/mercurial.spec +++ b/mercurial.spec @@ -9,8 +9,7 @@ Group: Development/Tools URL: http://www.selenic.com/mercurial/ Source0: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz Source1: mercurial-site-start.el -# temporary fix for filemerge bug -#Patch0: mercurial-mergetools.hgrc.patch +Patch0: mercurial-i18n.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python python-devel BuildRequires: emacs emacs-el pkgconfig gettext @@ -77,7 +76,7 @@ documentation. %prep %setup -q -#%patch0 -p1 +%patch0 -p0 %build make all @@ -130,6 +129,8 @@ install -m 644 hgk.rc $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d install -m 644 contrib/mergetools.hgrc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/mergetools.rc mv $RPM_BUILD_ROOT%{python_sitearch}/mercurial/locale $RPM_BUILD_ROOT%{_datadir}/locale +rm -rf $RPM_BUILD_ROOT%{python_sitearch}/mercurial/locale + %find_lang hg From 7949d0bbe87e93d008df7b869991547378f8aa2a Mon Sep 17 00:00:00 2001 From: Neal Becker Date: Wed, 6 Oct 2010 08:41:06 -0400 Subject: [PATCH 3/3] bump to 1.6.4-3 --- mercurial.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mercurial.spec b/mercurial.spec index 2bc9ed6..3a7093f 100644 --- a/mercurial.spec +++ b/mercurial.spec @@ -3,7 +3,7 @@ Summary: Mercurial -- a distributed SCM Name: mercurial Version: 1.6.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Development/Tools URL: http://www.selenic.com/mercurial/ @@ -174,6 +174,9 @@ rm -rf $RPM_BUILD_ROOT ##cd tests && %{__python} run-tests.py %changelog +* Wed Oct 6 2010 Neal Becker - 1.6.4-3 +- patch i18n.py so hg will find moved locale files + * Fri Oct 1 2010 Neal Becker - 1.6.4-1 - Update to 1.6.4