Update to 0.9.4-3

This commit is contained in:
Neal Becker 2007-09-20 18:58:24 +00:00
parent 57988c4dfc
commit 18b9e193e2
2 changed files with 56 additions and 2 deletions

View File

@ -0,0 +1,35 @@
diff -ruN mercurial-0.9.4.orig/setup.py mercurial-0.9.4.new/setup.py
--- mercurial-0.9.4.orig/setup.py 2007-06-25 22:18:18.000000000 -0400
+++ mercurial-0.9.4.new/setup.py 2007-08-29 19:17:36.000000000 -0400
@@ -54,6 +54,21 @@
mercurial.version.remember_version(version)
cmdclass = {'install_data': install_package_data}
+# We want to install the contrib/ directory, but it isn't immediately
+# clear where to do that on some platforms. As a temporary expedient,
+# assemble that part of the setup manifest only if we are running on
+# a posix platform. This is no worse than the current state, and people
+# who understand the respective target platforms can improve it over
+# time.
+
+contrib_files = [] # default
+if os.name in ['posix']:
+ contrib_files = [(os.path.join('/usr/share/mercurial', root),
+ [os.path.join(root, file_) for file_ in files])
+ for root, dirs, files in os.walk('contrib')]
+ contrib_files = contrib_files + [('/usr/share/mercurial/contrib',
+ ['hgwebdir.cgi', 'hgweb.cgi'])]
+
setup(name='mercurial',
version=mercurial.version.get_version(),
author='Matt Mackall',
@@ -67,7 +82,8 @@
Extension('mercurial.base85', ['mercurial/base85.c'])],
data_files=[(os.path.join('mercurial', root),
[os.path.join(root, file_) for file_ in files])
- for root, dirs, files in os.walk('templates')],
+ for root, dirs, files in os.walk('templates')] +
+ contrib_files,
cmdclass=cmdclass,
scripts=['hg', 'hgmerge'],
options=dict(py2exe=dict(packages=['hgext']),

View File

@ -1,11 +1,12 @@
Summary: A fast, lightweight distributed source control management system
Name: mercurial
Version: 0.9.4
Release: 1%{?dist}
Release: 3%{?dist}
License: GPL
Group: Development/Tools
URL: http://www.selenic.com/mercurial/
Source0: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz
Patch0: mercurial-install-contrib.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: python-devel asciidoc xmlto
Provides: hg = %{version}-%{release}
@ -16,6 +17,7 @@ for efficient handling of very large distributed projects.
%prep
%setup -q
%patch0 -p1
%build
python ./setup.py build
@ -32,7 +34,14 @@ mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 $RPM_BUILD_ROOT/%{_mandir}/man5
install -m 0644 doc/hg.1 $RPM_BUILD_ROOT/%{_mandir}/man1/hg.1
install -m 0644 doc/hgmerge.1 $RPM_BUILD_ROOT/%{_mandir}/man1/hgmerge.1
install -m 0644 doc/hgrc.5 $RPM_BUILD_ROOT/%{_mandir}/man5/hgrc.5
install -m 0644 doc/hgignore.5 $RPM_BUILD_ROOT/%{_mandir}/man5/hgignore.5
# Set up a system-wide hgrc that says where the hgk script went:
mkdir -p $RPM_BUILD_ROOT/etc/mercurial
cat - >$RPM_BUILD_ROOT/etc/mercurial/hgrc << EOF
[hgk]
path=/usr/share/mercurial/contrib/hgk
EOF
%clean
rm -rf $RPM_BUILD_ROOT
@ -41,10 +50,20 @@ rm -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root,-)
%doc CONTRIBUTORS README contrib/sample.hgrc
%{_sysconfdir}/mercurial
%{_mandir}/man*/*
%{_datadir}/mercurial/contrib/*.py[co]
%changelog
* Thu Sep 20 2007 Neal Becker <ndbecker2@gmail.com> - 0.9.4-3
- Fix mercurial-install-contrib.patch (/usr/share/mercurial->/usr/share/mercurial/contrib)
* Wed Aug 29 2007 Jonathan Shapiro <shap@eros-os.com> - 0.9.4-2
- update to 0.9.4-2
- install contrib directory
- set up required path for hgk
- install man5 man pages
* Thu Aug 23 2007 Neal Becker <ndbecker2@gmail.com> - 0.9.4-1
- update to 0.9.4