Show More
@@ -1,78 +1,81 | |||
|
1 | 1 | Summary: Mercurial -- a distributed SCM |
|
2 | 2 | Name: mercurial |
|
3 | 3 | Version: snapshot |
|
4 | 4 | Release: 0 |
|
5 | 5 | License: GPL |
|
6 | 6 | Group: Development/Tools |
|
7 | 7 | Source: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz |
|
8 | 8 | URL: http://www.selenic.com/mercurial |
|
9 | 9 | BuildRoot: /tmp/build.%{name}-%{version}-%{release} |
|
10 | 10 | |
|
11 | 11 | # From the README: |
|
12 | 12 | # |
|
13 | 13 | # Note: some distributions fails to include bits of distutils by |
|
14 | 14 | # default, you'll need python-dev to install. You'll also need a C |
|
15 | 15 | # compiler and a 3-way merge tool like merge, tkdiff, or kdiff3. |
|
16 | 16 | # |
|
17 | 17 | # python-devel provides an adequate python-dev. The merge tool is a |
|
18 | 18 | # run-time dependency. |
|
19 | 19 | # |
|
20 | BuildRequires: python >= 2.3, python-devel, make, gcc | |
|
20 | BuildRequires: python >= 2.3, python-devel, make, gcc, asciidoc, xmlto | |
|
21 | 21 | |
|
22 | 22 | %define pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))') |
|
23 | 23 | %define pythonlib %{_libdir}/python%{pythonver}/site-packages/%{name} |
|
24 | 24 | %define hgext %{_libdir}/python%{pythonver}/site-packages/hgext |
|
25 | 25 | |
|
26 | 26 | %description |
|
27 | 27 | Mercurial is a fast, lightweight source control management system designed |
|
28 | 28 | for efficient handling of very large distributed projects. |
|
29 | 29 | |
|
30 | 30 | %prep |
|
31 | 31 | rm -rf $RPM_BUILD_ROOT |
|
32 | 32 | %setup -q |
|
33 | 33 | |
|
34 | 34 | %build |
|
35 | python setup.py build | |
|
35 | make all | |
|
36 | 36 | |
|
37 | 37 | %install |
|
38 | 38 | python setup.py install --root $RPM_BUILD_ROOT --prefix %{_prefix} |
|
39 | make install-doc DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} | |
|
40 | ||
|
39 | 41 | install contrib/hgk $RPM_BUILD_ROOT%{_bindir} |
|
40 | 42 | install contrib/convert-repo $RPM_BUILD_ROOT%{_bindir}/mercurial-convert-repo |
|
41 | 43 | install contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir} |
|
42 | 44 | install contrib/git-viz/{hg-viz,git-rev-tree} $RPM_BUILD_ROOT%{_bindir} |
|
43 | 45 | |
|
44 | 46 | bash_completion_dir=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d |
|
45 | 47 | mkdir -p $bash_completion_dir |
|
46 | 48 | install contrib/bash_completion $bash_completion_dir/mercurial.sh |
|
47 | 49 | |
|
48 | 50 | zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions |
|
49 | 51 | mkdir -p $zsh_completion_dir |
|
50 | 52 | install contrib/zsh_completion $zsh_completion_dir/_mercurial |
|
51 | 53 | |
|
52 | 54 | lisp_dir=$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp |
|
53 | 55 | mkdir -p $lisp_dir |
|
54 | 56 | install contrib/mercurial.el $lisp_dir |
|
55 | 57 | |
|
56 | 58 | %clean |
|
57 | 59 | rm -rf $RPM_BUILD_ROOT |
|
58 | 60 | |
|
59 | 61 | %files |
|
60 | 62 | %defattr(-,root,root,-) |
|
61 | %doc doc/* *.cgi | |
|
63 | %doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html doc/ja *.cgi | |
|
64 | %{_mandir}/man?/hg*.gz | |
|
62 | 65 | %dir %{pythonlib} |
|
63 | 66 | %dir %{hgext} |
|
64 | 67 | %{_sysconfdir}/bash_completion.d/mercurial.sh |
|
65 | 68 | %{_datadir}/zsh/site-functions/_mercurial |
|
66 | 69 | %{_datadir}/emacs/site-lisp/mercurial.el |
|
67 | 70 | %{_bindir}/hg |
|
68 | 71 | %{_bindir}/hgk |
|
69 | 72 | %{_bindir}/hgmerge |
|
70 | 73 | %{_bindir}/hg-ssh |
|
71 | 74 | %{_bindir}/hg-viz |
|
72 | 75 | %{_bindir}/git-rev-tree |
|
73 | 76 | %{_bindir}/mercurial-convert-repo |
|
74 | 77 | %{pythonlib}/templates |
|
75 | 78 | %{pythonlib}/*.py* |
|
76 | 79 | %{pythonlib}/hgweb/*.py* |
|
77 | 80 | %{pythonlib}/*.so |
|
78 | 81 | %{hgext}/*.py* |
@@ -1,44 +1,44 | |||
|
1 | 1 | SOURCES=$(wildcard *.[0-9].txt) |
|
2 | 2 | MAN=$(SOURCES:%.txt=%) |
|
3 | 3 | HTML=$(SOURCES:%.txt=%.html) |
|
4 | 4 | PREFIX=/usr/local |
|
5 | 5 | MANDIR=$(PREFIX)/share/man |
|
6 | 6 | INSTALL=install -c |
|
7 | 7 | |
|
8 | 8 | all: man html |
|
9 | 9 | |
|
10 | 10 | man: $(MAN) |
|
11 | 11 | |
|
12 | 12 | html: $(HTML) |
|
13 | 13 | |
|
14 | 14 | hg.1.txt: hg.1.gendoc.txt |
|
15 | 15 | touch hg.1.txt |
|
16 | 16 | |
|
17 | 17 | hg.1.gendoc.txt: ../mercurial/commands.py ../mercurial/help.py |
|
18 | 18 | python gendoc.py > $@ |
|
19 | 19 | |
|
20 | 20 | %: %.xml |
|
21 | 21 | xmlto man $*.xml |
|
22 | 22 | |
|
23 | 23 | %.xml: %.txt |
|
24 | 24 | asciidoc -d manpage -b docbook $*.txt |
|
25 | 25 | |
|
26 | 26 | %.html: %.txt |
|
27 | 27 | asciidoc -b html4 $*.txt || asciidoc -b html $*.txt |
|
28 | 28 | |
|
29 | 29 | MANIFEST: man html |
|
30 | 30 | # versionned files are already in the main MANIFEST |
|
31 | 31 | $(RM) $@ |
|
32 | 32 | for i in $(MAN) $(HTML) hg.1.gendoc.txt; do \ |
|
33 | 33 | echo "doc/$$i" >> $@ ; \ |
|
34 | 34 | done |
|
35 | 35 | |
|
36 | 36 | install: man |
|
37 | 37 | for i in $(MAN) ; do \ |
|
38 | 38 | subdir=`echo $$i | sed -n 's/..*\.\([0-9]\)$$/man\1/p'` ; \ |
|
39 |
mkdir -p $(DESTDIR) |
|
|
40 |
$(INSTALL) $$i $(DESTDIR) |
|
|
39 | mkdir -p $(DESTDIR)$(MANDIR)/$$subdir ; \ | |
|
40 | $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \ | |
|
41 | 41 | done |
|
42 | 42 | |
|
43 | 43 | clean: |
|
44 | 44 | $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST |
General Comments 0
You need to be logged in to leave comments.
Login now