mercurial.spec
92 lines
| 3.2 KiB
| text/x-rpm-spec
|
RPMSpecLexer
/ contrib / mercurial.spec
|
r459 | Summary: Mercurial -- a distributed SCM | ||
Name: mercurial | ||||
|
r3863 | Version: snapshot | ||
|
r1891 | Release: 0 | ||
|
r10263 | License: GPLv2+ | ||
|
r459 | Group: Development/Tools | ||
|
r8942 | URL: http://mercurial.selenic.com/ | ||
Source0: http://mercurial.selenic.com/release/%{name}-%{version}.tar.gz | ||||
|
r7424 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root | ||
|
r459 | |||
|
r4751 | # From the README: | ||
# | ||||
# Note: some distributions fails to include bits of distutils by | ||||
# default, you'll need python-dev to install. You'll also need a C | ||||
# compiler and a 3-way merge tool like merge, tkdiff, or kdiff3. | ||||
# | ||||
# python-devel provides an adequate python-dev. The merge tool is a | ||||
# run-time dependency. | ||||
# | ||||
|
r9635 | BuildRequires: python >= 2.4, python-devel, make, gcc, docutils >= 0.5 | ||
|
r8942 | Provides: hg = %{version}-%{release} | ||
|
r10255 | Requires: python >= 2.4 | ||
# The hgk extension uses the wish tcl interpreter, but we don't enforce it | ||||
#Requires: tk | ||||
|
r4751 | |||
|
r563 | %define pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))') | ||
|
r8942 | %define emacs_lispdir %{_datadir}/emacs/site-lisp | ||
|
r563 | |||
|
r459 | %description | ||
Mercurial is a fast, lightweight source control management system designed | ||||
for efficient handling of very large distributed projects. | ||||
%prep | ||||
|
r1273 | %setup -q | ||
|
r459 | |||
%build | ||||
|
r4753 | make all | ||
|
r459 | |||
%install | ||||
|
r7424 | rm -rf $RPM_BUILD_ROOT | ||
|
r4750 | python setup.py install --root $RPM_BUILD_ROOT --prefix %{_prefix} | ||
|
r4753 | make install-doc DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} | ||
|
r4752 | install contrib/hgk $RPM_BUILD_ROOT%{_bindir} | ||
install contrib/convert-repo $RPM_BUILD_ROOT%{_bindir}/mercurial-convert-repo | ||||
install contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir} | ||||
|
r10255 | install contrib/git-viz/hg-viz $RPM_BUILD_ROOT%{_bindir} | ||
install contrib/git-viz/git-rev-tree $RPM_BUILD_ROOT%{_bindir} | ||||
|
r4752 | |||
bash_completion_dir=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d | ||||
mkdir -p $bash_completion_dir | ||||
|
r8942 | install -m 644 contrib/bash_completion $bash_completion_dir/mercurial.sh | ||
|
r4752 | |||
zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions | ||||
mkdir -p $zsh_completion_dir | ||||
|
r8942 | install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial | ||
|
r4752 | |||
|
r8942 | mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir} | ||
install contrib/mercurial.el $RPM_BUILD_ROOT%{emacs_lispdir} | ||||
|
r10255 | install contrib/mq.el $RPM_BUILD_ROOT%{emacs_lispdir} | ||
|
r8942 | |||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d | ||||
install contrib/mergetools.hgrc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/mergetools.rc | ||||
|
r459 | |||
|
r563 | %clean | ||
rm -rf $RPM_BUILD_ROOT | ||||
|
r459 | |||
|
r563 | %files | ||
%defattr(-,root,root,-) | ||||
|
r10664 | %doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi | ||
|
r10255 | %doc %attr(644,root,root) %{_mandir}/man?/hg* | ||
|
r8942 | %doc %attr(644,root,root) contrib/*.svg contrib/sample.hgrc | ||
|
r4752 | %{_sysconfdir}/bash_completion.d/mercurial.sh | ||
%{_datadir}/zsh/site-functions/_mercurial | ||||
%{_datadir}/emacs/site-lisp/mercurial.el | ||||
|
r10255 | %{_datadir}/emacs/site-lisp/mq.el | ||
|
r4752 | %{_bindir}/hg | ||
%{_bindir}/hgk | ||||
%{_bindir}/hg-ssh | ||||
%{_bindir}/hg-viz | ||||
%{_bindir}/git-rev-tree | ||||
%{_bindir}/mercurial-convert-repo | ||||
|
r8942 | %dir %{_sysconfdir}/bash_completion.d/ | ||
%dir %{_datadir}/zsh/site-functions/ | ||||
%dir %{_sysconfdir}/mercurial | ||||
%dir %{_sysconfdir}/mercurial/hgrc.d | ||||
%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/mergetools.rc | ||||
|
r8867 | %if "%{?pythonver}" != "2.4" | ||
%{_libdir}/python%{pythonver}/site-packages/%{name}-*-py%{pythonver}.egg-info | ||||
%endif | ||||
|
r8942 | %{_libdir}/python%{pythonver}/site-packages/%{name} | ||
%{_libdir}/python%{pythonver}/site-packages/hgext | ||||