source: spec/trunk/SPECS/mercurial.spec@ 17

Last change on this file since 17 was 11, checked in by Yuri Dario, 15 years ago

spec: initial import for base .spec files.

  • Property svn:eol-style set to native
File size: 5.3 KB
Line 
1%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
2
3Summary: A fast, lightweight distributed source control management system
4Name: mercurial
5Version: 1.6.3
6Release: 1
7License: GPLv2+
8Group: Development/Tools
9URL: http://www.selenic.com/mercurial/
10Source0: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz
11
12Patch0: mercurial-%{version}-os2.diff
13
14BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
15BuildRequires: python python-devel
16#BuildRequires: emacs emacs-el pkgconfig
17BuildRequires: pkgconfig
18Provides: hg = %{version}-%{release}
19
20Requires: python
21Requires: python(abi) = 2.6
22
23%description
24Mercurial is a fast, lightweight source control management system designed
25for efficient handling of very large distributed projects.
26
27Quick start: http://www.selenic.com/mercurial/wiki/index.cgi/QuickStart
28Tutorial: http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial
29Extensions: http://www.selenic.com/mercurial/wiki/index.cgi/CategoryExtension
30
31%define pkg mercurial
32
33# If the emacs-el package has installed a pkgconfig file, use that to determine
34# install locations and Emacs version at build time, otherwise set defaults.
35#if ($(pkgconfig emacs) ; echo $?)
36#define emacs_version 22.1
37#define emacs_lispdir %{_datadir}/emacs/site-lisp
38#define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
39#else
40#define emacs_version %{expand:%(pkg-config emacs --modversion)}
41#define emacs_lispdir %{expand:%(pkg-config emacs --variable sitepkglispdir)}
42#define emacs_startdir %{expand:%(pkg-config emacs --variable sitestartdir)}
43#endif
44
45#%package -n emacs-%{pkg}
46#Summary: Mercurial version control system support for Emacs
47#Group: Applications/Editors
48#Requires: hg = %{version}-%{release}, emacs-common
49#Requires: emacs(bin) >= %{emacs_version}
50#Obsoletes: %{pkg}-emacs
51
52#%description -n emacs-%{pkg}
53#Contains byte compiled elisp packages for %{pkg}.
54#To get started: start emacs, load hg-mode with M-x hg-mode, and show
55#help with C-c h h
56
57#%package -n emacs-%{pkg}-el
58#Summary: Elisp source files for %{pkg} under GNU Emacs
59#Group: Applications/Editors
60#Requires: emacs-%{pkg} = %{version}-%{release}
61
62#%description -n emacs-%{pkg}-el
63#This package contains the elisp source files for %{pkg} under GNU Emacs. You
64#do not need to install this package to run %{pkg}. Install the emacs-%{pkg}
65#package to use %{pkg} with GNU Emacs.
66
67%package hgk
68Summary: Hgk interface for mercurial
69Group: Development/Tools
70Requires: hg = %{version}-%{release}, tk
71
72
73%description hgk
74A Mercurial extension for displaying the change history graphically
75using Tcl/Tk. Displays branches and merges in an easily
76understandable way and shows diffs for each revision. Based on
77gitk for the git SCM.
78
79Adds the "hg view" command. See
80http://www.selenic.com/mercurial/wiki/index.cgi/UsingHgk for more
81documentation.
82
83%prep
84%setup -q
85%patch0 -p1 -b .os2~
86
87%build
88make all
89
90%install
91rm -rf $RPM_BUILD_ROOT
92%{__python} setup.py install -O1 --root $RPM_BUILD_ROOT --prefix %{_prefix} --record=%{name}.files
93make install-doc DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir}
94
95grep -v 'hgk.py*' < %{name}.files > %{name}-base.files
96grep 'hgk.py*' < %{name}.files > %{name}-hgk.files
97
98#install -D contrib/hgk $RPM_BUILD_ROOT%{_libexecdir}/mercurial/hgk
99install contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir}
100
101bash_completion_dir=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
102mkdir -p $bash_completion_dir
103install -m 644 contrib/bash_completion $bash_completion_dir/mercurial.sh
104
105zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
106mkdir -p $zsh_completion_dir
107install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial
108
109#mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
110
111#pushd contrib
112#for file in mercurial.el mq.el; do
113# emacs -batch -l mercurial.el --no-site-file -f batch-byte-compile $file
114# install -p -m 644 $file ${file}c $RPM_BUILD_ROOT%{emacs_lispdir}
115# rm ${file}c
116#done
117#popd
118
119
120
121mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
122
123#mkdir -p $RPM_BUILD_ROOT%{emacs_startdir} && install -m644 %SOURCE1 $RPM_BUILD_ROOT%{emacs_startdir}
124
125#cat >hgk.rc <<EOF
126#[extensions]
127## enable hgk extension ('hg help' shows 'view' as a command)
128#hgk=
129#
130#[hgk]
131#path=%{_libexecdir}/mercurial/hgk
132#EOF
133#install hgk.rc $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
134
135install contrib/mergetools.hgrc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/mergetools.rc
136
137%clean
138rm -rf $RPM_BUILD_ROOT
139
140%files
141# -f %{name}-base.files
142%defattr(-,root,root,-)
143%doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi
144#%doc %attr(644,root,root) %{_mandir}/man?/hg*.gz
145%doc %attr(644,root,root) contrib/*.svg contrib/sample.hgrc
146%{_sysconfdir}/bash_completion.d/mercurial.sh
147%{_datadir}/zsh/site-functions/_mercurial
148%{_bindir}/hg
149%{_bindir}/hg-ssh
150%{_libdir}/*
151%dir %{_sysconfdir}/bash_completion.d/
152%dir %{_datadir}/zsh/site-functions/
153%dir %{_sysconfdir}/mercurial
154%dir %{_sysconfdir}/mercurial/hgrc.d
155%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/mergetools.rc
156#%dir %{python_sitearch}/mercurial
157#%dir %{python_sitearch}/hgext
158
159#%files -n emacs-%{pkg}
160#%{emacs_lispdir}/*.elc
161#%{emacs_startdir}/*.el
162
163#%files -n emacs-%{pkg}-el
164#%{emacs_lispdir}/*.el
165
166#%files hgk -f %{name}-hgk.files
167#%{_libexecdir}/mercurial/
168#%{_sysconfdir}/mercurial/hgrc.d/hgk.rc
169
170##%%check
171##cd tests && %{__python} run-tests.py
172
173%changelog
Note: See TracBrowser for help on using the repository browser.