Jairo Llopis  committed 15f5d22

setup, contrib/tortoisehg.spec: Fix spec: Paths, macros and noarch.

The nautilus extension was not working because its installation folder was
obsolete after the resolution of Fedora's bug #509633 [1]. Fixing this also
means that now the RPM packages generated by tortoisehg.spec build in noarch,
which simplifies their maintenance.

Now the nautilus extension should work out of the box, finally fixing
TortoiseHg's issue #869 [2] and Fedora's bug #730049 [3].

While solving them, I detected more errors in the spec file, but they are
corrected here too. Now this spec should build flawlessly in Fedora 17.


  • Participants
  • Parent commits 9635693
  • Branches default

Comments (0)

Files changed (2)

File contrib/tortoisehg.spec

 Source0:    %{name}-%{version}.tar.gz
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-# This package should be noarch, but we can't do it because the nautilus
-# subpackage has to be arch-specific (because of lib64)
-# BuildArch:    noarch
+BuildArch:  noarch
 BuildRequires:  python, python-devel, gettext, python-sphinx
 BuildRequires:  PyQt4-devel
 Requires:   python >= 2.4, python-iniparse, mercurial >= 1.6
 %setup -q
-# Fedora Nautilus python extensions lives in lib64 on x86_64 ( ...
-%{__sed} -i "s,lib/nautilus,%{_lib}/nautilus,g"
 cat > tortoisehg/util/ << EOT
 bin_path     = "%{_bindir}"
 license_path = "%{_docdir}/%{name}-%{version}/COPYING.txt"
 %doc COPYING.txt doc/build/html/
-%if "%{?pythonver}" > "2.4"
+%if "%{?python_version}" > "2.4"
 # /usr/share/zsh/site-functions/ is owned by zsh package which we don't want to
 %files nautilus
     _data_files += [(os.path.join('share', root),
         [os.path.join(root, file_) for file_ in files])
         for root, dirs, files in os.walk('locale')]
-    _data_files += [('lib/nautilus/extensions-2.0/python',
+    _data_files += [('/usr/share/nautilus-python/extensions/',
     # Create a  Distributions will need to supply their own