source: spec/trunk/SPECS/git.spec@ 253

Last change on this file since 253 was 253, checked in by Yuri Dario, 14 years ago

spec: git rebuild due to gcc 4.4.6 bug.

File size: 13.5 KB
Line 
1%define _without_docs 1
2
3# Pass --without docs to rpmbuild if you don't want the documentation
4%if 0%{?rhel} && 0%{?rhel} <= 5
5%global gitcoredir %{_bindir}
6%else
7%global gitcoredir %{_libexecdir}/git-core
8%endif
9
10Name: git
11Version: 1.7.6.1
12Release: 7%{?dist}
13Summary: Fast Version Control System
14License: GPLv2
15Group: Development/Tools
16URL: http://git-scm.com/
17
18Source0: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.bz2
19Source1: git-os2.zip
20
21Patch0: git-os2.diff
22
23BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
24
25#BuildRequires: desktop-file-utils
26%if 0%{?fedora}
27BuildRequires: emacs >= 22.2
28BuildRequires: libcurl-devel
29%else
30BuildRequires: curl-devel
31%endif
32#BuildRequires: expat-devel
33BuildRequires: gettext
34BuildRequires: openssl-devel
35BuildRequires: zlib-devel >= 1.2
36#%{!?_without_docs:BuildRequires: asciidoc > 6.0.3, xmlto}
37
38#Requires: less
39#Requires: openssh-clients
40%if 0%{?fedora} || 0%{?rhel} >= 5
41Requires: perl(Error)
42%endif
43#Requires: perl-Git = %{version}-%{release}
44#Requires: rsync
45Requires: zlib >= 1.2
46
47Provides: git-core = %{version}-%{release}
48%if 0%{?fedora} || 0%{?rhel} >= 5
49Obsoletes: git-core <= 1.5.4.3
50%else
51# EL-4 has 1.5.4.7-3.el4. We don't support this, but no point making it more
52# difficult than it needs to be (folks stuck on EL-4 have it bad enough ;).
53Obsoletes: git-core <= 1.5.4.7-4
54%endif
55
56%description
57Git is a fast, scalable, distributed revision control system with an
58unusually rich command set that provides both high-level operations
59and full access to internals.
60
61The git rpm installs the core tools with minimal dependencies. To
62install all git packages, including tools for integrating with other
63SCMs, install the git-all meta-package.
64
65%package all
66Summary: Meta-package to pull in all git tools
67Group: Development/Tools
68%if 0%{?fedora} >= 10
69BuildArch: noarch
70%endif
71Requires: git = %{version}-%{release}
72Requires: git-svn = %{version}-%{release}
73Requires: git-cvs = %{version}-%{release}
74Requires: git-email = %{version}-%{release}
75Requires: gitk = %{version}-%{release}
76Requires: git-gui = %{version}-%{release}
77Requires: perl-Git = %{version}-%{release}
78%if 0%{?fedora}
79Requires: emacs-git = %{version}-%{release}
80Requires: git-arch = %{version}-%{release}
81%endif
82%if 0%{?fedora} || 0%{?rhel} >= 5
83Obsoletes: git <= 1.5.4.3
84%else
85# EL-4 has 1.5.4.7-3.el4. We don't support this, but no point making it more
86# difficult than it needs to be (folks stuck on EL-4 have it bad enough ;).
87Obsoletes: git <= 1.5.4.7-4
88%endif
89
90%description all
91Git is a fast, scalable, distributed revision control system with an
92unusually rich command set that provides both high-level operations
93and full access to internals.
94
95This is a dummy package which brings in all subpackages.
96
97%package daemon
98Summary: Git protocol dÊmon
99Group: Development/Tools
100Requires: git = %{version}-%{release}
101#Requires: xinetd
102%description daemon
103The git dÊmon for supporting git:// access to git repositories
104
105%package -n gitweb
106Summary: Simple web interface to git repositories
107Group: Development/Tools
108%if 0%{?fedora} >= 10
109BuildArch: noarch
110%endif
111Requires: git = %{version}-%{release}
112
113%description -n gitweb
114Simple web interface to track changes in git repositories
115
116
117%package svn
118Summary: Git tools for importing Subversion repositories
119Group: Development/Tools
120%if 0%{?fedora} >= 10
121BuildArch: noarch
122%endif
123Requires: git = %{version}-%{release}, subversion, perl(Term::ReadKey)
124%description svn
125Git tools for importing Subversion repositories.
126
127%package cvs
128Summary: Git tools for importing CVS repositories
129Group: Development/Tools
130%if 0%{?fedora} >= 10
131BuildArch: noarch
132%endif
133Requires: git = %{version}-%{release}, cvs
134%if 0%{?fedora} || 0%{?rhel} >= 5
135Requires: cvsps
136%endif
137%description cvs
138Git tools for importing CVS repositories.
139
140%if 0%{?fedora}
141%package arch
142Summary: Git tools for importing Arch repositories
143Group: Development/Tools
144%if 0%{?fedora} >= 10
145BuildArch: noarch
146%endif
147Requires: git = %{version}-%{release}, tla
148%description arch
149Git tools for importing Arch repositories.
150%endif
151
152%package email
153Summary: Git tools for sending email
154Group: Development/Tools
155%if 0%{?fedora} >= 10
156BuildArch: noarch
157%endif
158Requires: git = %{version}-%{release}, perl-Git = %{version}-%{release}
159Requires: perl(Authen::SASL)
160%if 0%{?fedora} || 0%{?rhel} >= 5
161Requires: perl(Net::SMTP::SSL)
162%endif
163%description email
164Git tools for sending email.
165
166%package gui
167Summary: Git GUI tool
168Group: Development/Tools
169%if 0%{?fedora} >= 10
170BuildArch: noarch
171%endif
172Requires: git = %{version}-%{release}, tk >= 8.4
173Requires: gitk = %{version}-%{release}
174%description gui
175Git GUI tool.
176
177%package -n gitk
178Summary: Git revision tree visualiser
179Group: Development/Tools
180%if 0%{?fedora} >= 10
181BuildArch: noarch
182%endif
183Requires: git = %{version}-%{release}, tk >= 8.4
184%description -n gitk
185Git revision tree visualiser.
186
187%package -n perl-Git
188Summary: Perl interface to Git
189Group: Development/Libraries
190%if 0%{?fedora} >= 10
191BuildArch: noarch
192%endif
193Requires: git = %{version}-%{release}
194%if 0%{?fedora} || 0%{?rhel} >= 5
195BuildRequires: perl(Error), perl(ExtUtils::MakeMaker)
196Requires: perl(Error)
197%endif
198Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
199
200%description -n perl-Git
201Perl interface to Git.
202
203%if 0%{?fedora}
204%package -n emacs-git
205Summary: Git version control system support for Emacs
206Group: Applications/Editors
207%if 0%{?fedora} >= 10
208BuildArch: noarch
209%endif
210Requires: git = %{version}-%{release}, emacs-common >= 22.2
211
212%description -n emacs-git
213%{summary}.
214%endif
215
216%prep
217%setup -q -a 1
218%patch0 -p1
219
220# Use these same options for every invocation of 'make'.
221# Otherwise it will rebuild in %%install due to flags changes.
222cat << \EOF > config.mak
223V = 1
224CFLAGS = %{optflags}
225BLK_SHA1 = 1
226NEEDS_CRYPTO_WITH_SSL = 1
227NO_PYTHON = 1
228ETC_GITCONFIG = %{_sysconfdir}/gitconfig
229DESTDIR = %{buildroot}
230INSTALL = install -p
231GITWEB_PROJECTROOT = %{_var}/lib/git
232htmldir = %{_docdir}/%{name}-%{version}
233prefix = %{_prefix}
234EOF
235
236%if 0%{?fedora}
237cat << \EOF >> config.mak
238ASCIIDOC8 = 1
239ASCIIDOC_NO_ROFF = 1
240EOF
241%endif
242
243%if 0%{?rhel} && 0%{?rhel} <= 5
244echo gitexecdir = %{_bindir} >> config.mak
245%endif
246
247# Filter bogus perl requires
248# packed-refs comes from a comment in contrib/hooks/update-paranoid
249cat << \EOF > %{name}-req
250#!/bin/sh
251%{__perl_requires} $* |\
252sed -e '/perl(packed-refs)/d'
253EOF
254
255%global __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
256chmod +x %{__perl_requires}
257
258%build
259export MAKESHELL=/@unixroot/usr/bin/sh
260export CONFIG_SHELL=/@unixroot/usr/bin/sh
261export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zexe -Zargs-wild -Zargs-resp"
262export LIBS="-lurpo"
263%configure \
264 --without-tcltk \
265 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
266
267make %{?_smp_mflags} all %{!?_without_docs: doc}
268
269%if 0%{?fedora}
270make -C contrib/emacs
271%endif
272
273# Remove shebang from bash-completion script
274sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash
275
276%install
277export MAKESHELL=/@unixroot/usr/bin/sh
278rm -rf %{buildroot}
279make %{?_smp_mflags} INSTALLDIRS=vendor install %{!?_without_docs: install-doc}
280
281%if 0%{?fedora}
282make -C contrib/emacs install \
283 emacsdir=%{buildroot}%{_datadir}/emacs/site-lisp
284for elc in %{buildroot}%{_datadir}/emacs/site-lisp/*.elc ; do
285 install -pm 644 contrib/emacs/$(basename $elc .elc).el \
286 %{buildroot}%{_datadir}/emacs/site-lisp
287done
288install -Dpm 644 %{SOURCE1} \
289 %{buildroot}%{_datadir}/emacs/site-lisp/site-start.d/git-init.el
290%endif
291
292mkdir -p %{buildroot}%{_var}/www/git
293#install -pm 644 gitweb/*.css %{buildroot}%{_var}/www/git
294#install -pm 644 gitweb/*.js %{buildroot}%{_var}/www/git
295#install -pm 644 gitweb/*.png %{buildroot}%{_var}/www/git
296#install -pm 755 gitweb/gitweb.cgi %{buildroot}%{_var}/www/git
297#mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
298#install -pm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf
299#sed "s|@PROJECTROOT@|%{_var}/lib/git|g" \
300# %{SOURCE5} > %{buildroot}%{_sysconfdir}/gitweb.conf
301
302find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
303find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
304find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'
305
306%if ! 0%{?fedora}
307find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';'
308%endif
309
310(find %{buildroot}%{_bindir} -type f | grep -vE "archimport|svn|cvs|email|gitk|git-gui|git-citool|git-daemon" | sed -e s@^%{buildroot}@@) > bin-man-doc-files
311(find %{buildroot}%{_libexecdir} -type f | grep -vE "archimport|svn|cvs|email|gitk|git-gui|git-citool|git-daemon" | sed -e s@^%{buildroot}@@) >> bin-man-doc-files
312#(find %{buildroot}%{perl_vendorlib} -type f | sed -e s@^%{buildroot}@@) >> perl-files
313%if %{!?_without_docs:1}0
314(find %{buildroot}%{_mandir} -type f | grep -vE "archimport|svn|git-cvs|email|gitk|git-gui|git-citool|git-daemon" | sed -e s@^%{buildroot}@@ -e 's/$/*/' ) >> bin-man-doc-files
315%else
316rm -rf %{buildroot}%{_mandir}
317%endif
318
319mkdir -p %{buildroot}%{_var}/lib/git
320mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d
321# On EL <= 5, xinetd does not enable IPv6 by default
322enable_ipv6=" # xinetd does not enable IPv6 by default
323 flags = IPv6"
324perl -p \
325 -e "s|\@GITCOREDIR\@|%{gitcoredir}|g;" \
326 -e "s|\@BASE_PATH\@|%{_var}/lib/git|g;" \
327%if 0%{?rhel} && 0%{?rhel} <= 5
328 -e "s|^}|$enable_ipv6\n$&|;" \
329%endif
330 %{SOURCE2} > %{buildroot}%{_sysconfdir}/xinetd.d/git
331
332mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
333install -pm 644 contrib/completion/git-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/git
334
335# Move contrib/hooks out of %%docdir and make them executable
336#mkdir -p %{buildroot}%{_datadir}/git-core/contrib
337#mv contrib/hooks %{buildroot}%{_datadir}/git-core/contrib
338#chmod +x %{buildroot}%{_datadir}/git-core/contrib/hooks/*
339#pushd contrib > /dev/null
340#ln -s ../../../git-core/contrib/hooks
341#popd > /dev/null
342
343# install git-gui .desktop file
344#desktop-file-install \
345#%if 0%{?rhel} && 0%{?rhel} <= 5
346# --vendor fedora \
347#%endif
348# --dir=%{buildroot}%{_datadir}/applications %{SOURCE4}
349
350# quiet some rpmlint complaints
351chmod -R g-w %{buildroot}
352find %{buildroot} -name git-mergetool--lib | xargs chmod a-x
353rm -f {Documentation/technical,contrib/emacs}/.gitignore
354chmod a-x Documentation/technical/api-index.sh
355find contrib -type f | xargs chmod -x
356
357
358%clean
359rm -rf %{buildroot}
360
361
362%files -f bin-man-doc-files
363%defattr(-,root,root)
364%{_datadir}/git-core/
365%dir %{gitcoredir}
366%doc README COPYING Documentation/*.txt contrib/
367%{!?_without_docs: %doc Documentation/*.html Documentation/docbook-xsl.css}
368%{!?_without_docs: %doc Documentation/howto Documentation/technical}
369%{_sysconfdir}/bash_completion.d
370
371
372%files svn
373%defattr(-,root,root)
374%{gitcoredir}/*svn*
375#%doc Documentation/*svn*.txt
376%{!?_without_docs: %{_mandir}/man1/*svn*.1*}
377%{!?_without_docs: %doc Documentation/*svn*.html }
378
379%files cvs
380%defattr(-,root,root)
381#%doc Documentation/*git-cvs*.txt
382%{_bindir}/git-cvsserver
383%{gitcoredir}/*cvs*
384%{!?_without_docs: %{_mandir}/man1/*cvs*.1*}
385%{!?_without_docs: %doc Documentation/*git-cvs*.html }
386
387%if 0%{?fedora}
388%files arch
389%defattr(-,root,root)
390%doc Documentation/git-archimport.txt
391%{gitcoredir}/git-archimport
392%{!?_without_docs: %{_mandir}/man1/git-archimport.1*}
393%{!?_without_docs: %doc Documentation/git-archimport.html }
394%endif
395
396%files email
397%defattr(-,root,root)
398#%doc Documentation/*email*.txt
399%{gitcoredir}/*email*
400%{!?_without_docs: %{_mandir}/man1/*email*.1*}
401%{!?_without_docs: %doc Documentation/*email*.html }
402
403%files gui
404%defattr(-,root,root)
405#%{gitcoredir}/git-gui*
406#%{gitcoredir}/git-citool
407#%{_datadir}/applications/*git-gui.desktop
408#%{_datadir}/git-gui/
409#%{!?_without_docs: %{_mandir}/man1/git-gui.1*}
410#%{!?_without_docs: %doc Documentation/git-gui.html}
411#%{!?_without_docs: %{_mandir}/man1/git-citool.1*}
412#%{!?_without_docs: %doc Documentation/git-citool.html}
413
414%files -n gitk
415%defattr(-,root,root)
416#%doc Documentation/*gitk*.txt
417#%{_bindir}/*gitk*
418#%{_datadir}/gitk
419#%{!?_without_docs: %{_mandir}/man1/*gitk*.1*}
420#%{!?_without_docs: %doc Documentation/*gitk*.html }
421
422%files -n perl-Git
423# -f perl-files
424%defattr(-,root,root)
425%if 0%{?fedora}
426%files -n emacs-git
427%defattr(-,root,root)
428%doc contrib/emacs/README
429%{_datadir}/emacs/site-lisp/*git*.el*
430%{_datadir}/emacs/site-lisp/site-start.d/git-init.el
431%endif
432
433%files daemon
434%defattr(-,root,root)
435%doc Documentation/*daemon*.txt
436%config(noreplace)%{_sysconfdir}/xinetd.d/git
437%{gitcoredir}/git-daemon.exe
438%{_var}/lib/git
439%{!?_without_docs: %{_mandir}/man1/*daemon*.1*}
440%{!?_without_docs: %doc Documentation/*daemon*.html}
441
442%files -n gitweb
443%defattr(-,root,root)
444#%doc gitweb/INSTALL gitweb/README
445#%config(noreplace)%{_sysconfdir}/gitweb.conf
446#%config(noreplace)%{_sysconfdir}/httpd/conf.d/git.conf
447%{_var}/www/git/
448
449
450%files all
451# No files for you!
452
453%changelog
454* Sat Dec 17 2011 yd
455- rebuild due to gcc 4.4.6 bug.
456
457* Sun Nov 27 2011 yd
458- use /@unixroot/usr/bin shell.
459
460* Wed Sep 28 2011 yd
461- fixed build patches.
462- fixed expat support.
463
464* Sat Sep 24 2011 yd
465- symlink script files to exe, so execvp can find them.
466- ignore CR while reading CRLF terminated text files.
467
468* Tue Sep 20 2011 yd
469- disable broken_path_fix macro.
470
471* Mon Sep 19 2011 yd
472- use bigger stack for threads; use socketpair instead of pipes.
Note: See TracBrowser for help on using the repository browser.