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

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

spec: git, added debug package with symbolic info for exceptq.

File size: 15.8 KB
Line 
1# Note: this .spec is borrowed from git-2.1.0-1.fc22.src.rpm
2
3# Pass --without docs to rpmbuild if you don't want the documentation (force it for now)
4%define _without_docs 1
5
6%global gitcoredir %{_libexecdir}/git-core
7%global libcurl_devel libcurl-devel
8%global docbook_suppress_sp 0
9%global enable_ipv6 0
10
11%global use_systemd 0
12
13Name: git
14Version: 2.0.0
15Release: 2%{?dist}
16Summary: Fast Version Control System
17License: GPLv2
18Group: Development/Tools
19URL: http://git-scm.com/
20#Source0: http://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz
21
22%define svn_url http://svn.netlabs.org/repos/ports/git/branches/2.0
23%define svn_rev 864
24
25Source: %{name}-%{version}-r%{svn_rev}.zip
26
27BuildRequires: gcc make subversion zip
28
29BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
30
31%if ! 0%{?_without_docs}
32BuildRequires: asciidoc >= 8.4.1
33BuildRequires: xmlto
34%endif
35#BuildRequires: emacs
36BuildRequires: expat-devel
37BuildRequires: gettext
38BuildRequires: libcurl-devel
39#BuildRequires: pcre-devel
40BuildRequires: openssl-devel
41BuildRequires: zlib-devel >= 1.2
42
43#Requires: less
44#Requires: openssh-clients
45#Requires: perl(Error)
46#Requires: perl(Term::ReadKey)
47Requires: perl-Git = %{version}-%{release}
48#Requires: rsync
49Requires: zlib >= 1.2
50
51Provides: git-core = %{version}-%{release}
52
53# Obsolete git-arch
54Obsoletes: git-arch < %{version}-%{release}
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
68BuildArch: noarch
69Requires: git = %{version}-%{release}
70Requires: git-cvs = %{version}-%{release}
71Requires: git-email = %{version}-%{release}
72#Requires: git-gui = %{version}-%{release}
73Requires: git-svn = %{version}-%{release}
74Requires: git-p4 = %{version}-%{release}
75#Requires: gitk = %{version}-%{release}
76Requires: perl-Git = %{version}-%{release}
77#Requires: emacs-git = %{version}-%{release}
78Obsoletes: git <= 1.5.4.3
79
80%description all
81Git is a fast, scalable, distributed revision control system with an
82unusually rich command set that provides both high-level operations
83and full access to internals.
84
85This is a dummy package which brings in all subpackages.
86
87%package bzr
88Summary: Git tools for working with bzr repositories
89Group: Development/Tools
90BuildArch: noarch
91Requires: git = %{version}-%{release}
92Requires: bzr
93
94%description bzr
95%{summary}.
96
97%package daemon
98Summary: Git protocol dÊmon
99Group: Development/Tools
100Requires: git = %{version}-%{release}
101#%if %{use_systemd}
102#Requires: systemd
103#Requires(post): systemd
104#Requires(preun): systemd
105#Requires(postun): systemd
106#%else
107#Requires: xinetd
108#%endif
109%description daemon
110The git dÊmon for supporting git:// access to git repositories
111
112%if 0
113%package -n gitweb
114Summary: Simple web interface to git repositories
115Group: Development/Tools
116BuildArch: noarch
117Requires: git = %{version}-%{release}
118
119%description -n gitweb
120Simple web interface to track changes in git repositories
121%endif
122
123%package hg
124Summary: Git tools for working with mercurial repositories
125Group: Development/Tools
126BuildArch: noarch
127Requires: git = %{version}-%{release}
128Requires: mercurial >= 1.8
129
130%description hg
131%{summary}.
132
133%package p4
134Summary: Git tools for working with Perforce depots
135Group: Development/Tools
136BuildArch: noarch
137BuildRequires: python
138Requires: git = %{version}-%{release}
139%description p4
140%{summary}.
141
142%package svn
143Summary: Git tools for importing Subversion repositories
144Group: Development/Tools
145Requires: git = %{version}-%{release}, subversion, subversion-perl
146#Requires: perl(Term::ReadKey)
147%description svn
148Git tools for importing Subversion repositories.
149
150%package cvs
151Summary: Git tools for importing CVS repositories
152Group: Development/Tools
153BuildArch: noarch
154Requires: git = %{version}-%{release}, cvs
155Requires: cvsps
156Requires: perl-DBD-SQLite
157%description cvs
158Git tools for importing CVS repositories.
159
160%package email
161Summary: Git tools for sending email
162Group: Development/Tools
163BuildArch: noarch
164Requires: git = %{version}-%{release}, perl-Git = %{version}-%{release}
165Requires: perl(Authen::SASL)
166Requires: perl(Net::SMTP::SSL)
167%description email
168Git tools for sending email.
169
170%if 0
171
172%package gui
173Summary: Git GUI tool
174Group: Development/Tools
175BuildArch: noarch
176Requires: git = %{version}-%{release}, tk >= 8.4
177Requires: gitk = %{version}-%{release}
178%description gui
179Git GUI tool.
180
181%package -n gitk
182Summary: Git revision tree visualiser
183Group: Development/Tools
184BuildArch: noarch
185Requires: git = %{version}-%{release}, tk >= 8.4
186%description -n gitk
187Git revision tree visualiser.
188
189%endif
190
191%package -n perl-Git
192Summary: Perl interface to Git
193Group: Development/Libraries
194BuildArch: noarch
195Requires: git = %{version}-%{release}
196#BuildRequires: perl(Error)
197BuildRequires: perl(ExtUtils::MakeMaker)
198#Requires: perl(Error)
199#Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
200
201%description -n perl-Git
202Perl interface to Git.
203
204%package -n perl-Git-SVN
205Summary: Perl interface to Git::SVN
206Group: Development/Libraries
207BuildArch: noarch
208Requires: git = %{version}-%{release}
209Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
210
211%description -n perl-Git-SVN
212Perl interface to Git.
213
214%if 0
215
216%package -n emacs-git
217Summary: Git version control system support for Emacs
218Group: Applications/Editors
219Requires: git = %{version}-%{release}
220BuildArch: noarch
221Requires: emacs(bin) >= %{_emacs_version}
222
223%description -n emacs-git
224%{summary}.
225
226%package -n emacs-git-el
227Summary: Elisp source files for git version control system support for Emacs
228Group: Applications/Editors
229BuildArch: noarch
230Requires: emacs-git = %{version}-%{release}
231
232%description -n emacs-git-el
233%{summary}.
234
235%endif
236
237%package debug
238Summary: HLL debug data for exception handling support.
239
240%description debug
241HLL debug data for exception handling support.
242
243
244%prep
245%if %(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
246%setup -q
247%else
248%setup -n "%{name}-%{version}" -Tc
249svn export -r %{svn_rev} %{svn_url} . --force
250rm -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip"
251(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" "%{name}-%{version}")
252%endif
253
254# Use these same options for every invocation of 'make'.
255# Otherwise it will rebuild in %%install due to flags changes.
256cat << \EOF > config.mak
257V = 1
258CFLAGS = %{optflags}
259#BLK_SHA1 = 1
260#NEEDS_CRYPTO_WITH_SSL = 1
261#USE_LIBPCRE = 1
262ETC_GITCONFIG = %{_sysconfdir}/gitconfig
263DESTDIR = %{buildroot}
264INSTALL = install -p
265GITWEB_PROJECTROOT = %{_var}/lib/git
266GNU_ROFF = 1
267htmldir = %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
268prefix = %{_prefix}
269gitwebdir = %{_var}/www/git
270EOF
271
272%if "%{gitcoredir}" == "%{_bindir}"
273echo gitexecdir = %{_bindir} >> config.mak
274%endif
275
276%if %{docbook_suppress_sp}
277# This is needed for 1.69.1-1.71.0
278echo DOCBOOK_SUPPRESS_SP = 1 >> config.mak
279%endif
280
281%build
282make %{?_smp_mflags} all
283%if ! 0%{?_without_docs}
284make doc
285%endif
286
287%if 0
288make -C contrib/emacs
289%endif
290
291make -C contrib/subtree/
292
293# Remove shebang from bash-completion script
294sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash
295
296%install
297rm -rf %{buildroot}
298make INSTALLDIRS=vendor install
299%if ! 0%{?_without_docs}
300make INSTALLDIRS=vendor install-doc
301%endif
302
303%if 0
304
305%global elispdir %{_emacs_sitelispdir}/git
306make -C contrib/emacs install \
307 emacsdir=%{buildroot}%{elispdir}
308for elc in %{buildroot}%{elispdir}/*.elc ; do
309 install -pm 644 contrib/emacs/$(basename $elc .elc).el \
310 %{buildroot}%{elispdir}
311done
312install -Dpm 644 %{SOURCE2} \
313 %{buildroot}%{_emacs_sitestartdir}/git-init.el
314
315%endif
316
317make -C contrib/subtree install
318%if ! 0%{?_without_docs}
319make -C contrib/subtree install-doc
320%endif
321
322%if 0
323mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
324install -pm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf
325sed "s|@PROJECTROOT@|%{_var}/lib/git|g" \
326 %{SOURCE6} > %{buildroot}%{_sysconfdir}/gitweb.conf
327%else
328rm -rf %{buildroot}%{_var}/www/git/
329%endif
330
331find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
332find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
333find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'
334
335# git-archimport is not supported
336find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';'
337
338exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bzr|git-remote-hg|gitk|p4|svn"
339(find %{buildroot}%{_bindir} %{buildroot}%{_libexecdir} -type f | grep -vE "$exclude_re" | sed -e s@^%{buildroot}@@) > bin-man-doc-files
340(find %{buildroot}%{_bindir} %{buildroot}%{_libexecdir} -mindepth 1 -type d | grep -vE "$exclude_re" | sed -e 's@^%{buildroot}@%dir @') >> bin-man-doc-files
341(find %{buildroot}%{perl_vendorlib} -type f | sed -e s@^%{buildroot}@@) > perl-git-files
342(find %{buildroot}%{perl_vendorlib} -mindepth 1 -type d | sed -e 's@^%{buildroot}@%dir @') >> perl-git-files
343# Split out Git::SVN files
344grep Git/SVN perl-git-files > perl-git-svn-files
345sed -i "/Git\/SVN/ d" perl-git-files
346%if %{!?_without_docs:1}0
347(find %{buildroot}%{_mandir} -type f | grep -vE "$exclude_re|Git" | sed -e s@^%{buildroot}@@ -e 's/$/*/' ) >> bin-man-doc-files
348%else
349rm -rf %{buildroot}%{_mandir}
350%endif
351
352mkdir -p %{buildroot}%{_var}/lib/git
353%if 0
354%if %{use_systemd}
355mkdir -p %{buildroot}%{_unitdir}
356cp -a %{SOURCE12} %{SOURCE13} %{buildroot}%{_unitdir}
357%else
358mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d
359# On EL <= 5, xinetd does not enable IPv6 by default
360enable_ipv6=" # xinetd does not enable IPv6 by default
361 flags = IPv6"
362perl -p \
363 -e "s|\@GITCOREDIR\@|%{gitcoredir}|g;" \
364 -e "s|\@BASE_PATH\@|%{_var}/lib/git|g;" \
365%if %{enable_ipv6}
366 -e "s|^}|$enable_ipv6\n$&|;" \
367%endif
368 %{SOURCE3} > %{buildroot}%{_sysconfdir}/xinetd.d/git
369%endif
370%endif
371
372# Install bzr and hg remote helpers from contrib
373install -pm 755 contrib/remote-helpers/git-remote-* %{buildroot}%{gitcoredir}
374
375# Setup bash completion
376mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
377install -pm 644 contrib/completion/git-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/git
378
379# Install tcsh completion
380mkdir -p %{buildroot}%{_datadir}/git-core/contrib/completion
381install -pm 644 contrib/completion/git-completion.tcsh \
382 %{buildroot}%{_datadir}/git-core/contrib/completion/
383
384# Move contrib/hooks out of %%docdir and make them executable
385mkdir -p %{buildroot}%{_datadir}/git-core/contrib
386mv contrib/hooks %{buildroot}%{_datadir}/git-core/contrib
387chmod +x %{buildroot}%{_datadir}/git-core/contrib/hooks/*
388ln -s ../../../git-core/contrib/hooks contrib/
389
390# Install git-prompt.sh
391mkdir -p %{buildroot}%{_datadir}/git-core/contrib/completion
392install -pm 644 contrib/completion/git-prompt.sh \
393 %{buildroot}%{_datadir}/git-core/contrib/completion/
394
395# find translations
396%if 0
397%find_lang %{name} %{name}.lang
398cat %{name}.lang >> bin-man-doc-files
399%else
400find %{buildroot}%{_datadir}/locale/* -type f | sed -e s@^%{buildroot}@@ >> bin-man-doc-files
401%endif
402
403# quiet some rpmlint complaints
404chmod -R g-w %{buildroot}
405find %{buildroot} -name git-mergetool--lib | xargs chmod a-x
406rm -f {Documentation/technical,contrib/emacs,contrib/credential/gnome-keyring}/.gitignore
407chmod a-x Documentation/technical/api-index.sh
408find contrib -type f | xargs chmod -x
409
410
411%clean
412rm -rf %{buildroot}
413
414%if %{use_systemd}
415%post daemon
416%systemd_post git.service
417
418%preun daemon
419%systemd_preun git.service
420
421%postun daemon
422%systemd_postun_with_restart git.service
423%endif
424
425%files -f bin-man-doc-files
426%defattr(-,root,root)
427%{_datadir}/git-core/
428%doc README COPYING Documentation/*.txt Documentation/RelNotes contrib/
429%{!?_without_docs: %doc Documentation/*.html Documentation/docbook-xsl.css}
430%{!?_without_docs: %doc Documentation/howto Documentation/technical}
431%{_sysconfdir}/bash_completion.d
432
433%files bzr
434%defattr(-,root,root)
435%{gitcoredir}/git-remote-bzr
436
437%files hg
438%defattr(-,root,root)
439%{gitcoredir}/git-remote-hg
440
441%files p4
442%defattr(-,root,root)
443%{gitcoredir}/*p4*
444%{gitcoredir}/mergetools/p4merge
445%doc Documentation/*p4*.txt
446%{!?_without_docs: %{_mandir}/man1/*p4*.1*}
447%{!?_without_docs: %doc Documentation/*p4*.html }
448
449%files svn
450%defattr(-,root,root)
451%{gitcoredir}/*svn*
452%doc Documentation/*svn*.txt
453%{!?_without_docs: %{_mandir}/man1/*svn*.1*}
454%{!?_without_docs: %doc Documentation/*svn*.html }
455
456%files cvs
457%defattr(-,root,root)
458%doc Documentation/*git-cvs*.txt
459%{_bindir}/git-cvsserver
460%{gitcoredir}/*cvs*
461%{!?_without_docs: %{_mandir}/man1/*cvs*.1*}
462%{!?_without_docs: %doc Documentation/*git-cvs*.html }
463
464%files email
465%defattr(-,root,root)
466%doc Documentation/*email*.txt
467%{gitcoredir}/*email*
468%{!?_without_docs: %{_mandir}/man1/*email*.1*}
469%{!?_without_docs: %doc Documentation/*email*.html }
470
471%if 0
472
473%files gui
474%defattr(-,root,root)
475%{gitcoredir}/git-gui*
476%{gitcoredir}/git-citool
477%{_datadir}/applications/*git-gui.desktop
478%{_datadir}/git-gui/
479%{!?_without_docs: %{_mandir}/man1/git-gui.1*}
480%{!?_without_docs: %doc Documentation/git-gui.html}
481%{!?_without_docs: %{_mandir}/man1/git-citool.1*}
482%{!?_without_docs: %doc Documentation/git-citool.html}
483
484%files -n gitk
485%defattr(-,root,root)
486%doc Documentation/*gitk*.txt
487%{_bindir}/*gitk*
488%{_datadir}/gitk
489%{!?_without_docs: %{_mandir}/man1/*gitk*.1*}
490%{!?_without_docs: %doc Documentation/*gitk*.html }
491
492%endif
493
494%files -n perl-Git -f perl-git-files
495%defattr(-,root,root)
496%{!?_without_docs: %exclude %{_mandir}/man3/*Git*SVN*.3pm*}
497%{!?_without_docs: %{_mandir}/man3/*Git*.3pm*}
498
499%files -n perl-Git-SVN -f perl-git-svn-files
500%defattr(-,root,root)
501%{!?_without_docs: %{_mandir}/man3/*Git*SVN*.3pm*}
502
503%if 0
504
505%files -n emacs-git
506%defattr(-,root,root)
507%doc contrib/emacs/README
508%dir %{elispdir}
509%{elispdir}/*.elc
510%{_emacs_sitestartdir}/git-init.el
511
512%files -n emacs-git-el
513%defattr(-,root,root)
514%{elispdir}/*.el
515
516%endif
517
518%files daemon
519%defattr(-,root,root)
520%doc Documentation/*daemon*.txt
521%if %{use_systemd}
522%{_unitdir}/git.socket
523%{_unitdir}/git.service
524%else
525%if 0
526%config(noreplace)%{_sysconfdir}/xinetd.d/git
527%endif
528%endif
529%{gitcoredir}/git-daemon*
530%{_var}/lib/git
531%{!?_without_docs: %{_mandir}/man1/*daemon*.1*}
532%{!?_without_docs: %doc Documentation/*daemon*.html}
533
534%if 0
535%files -n gitweb
536%defattr(-,root,root)
537%doc gitweb/INSTALL gitweb/README
538%config(noreplace)%{_sysconfdir}/gitweb.conf
539%config(noreplace)%{_sysconfdir}/httpd/conf.d/git.conf
540%{_var}/www/git/
541%endif
542
543%files all
544# No files for you!
545
546%files debug
547%defattr(-,root,root)
548%{_bindir}/*.dbg
549%{gitcoredir}/*.dbg
550
551%changelog
552* Wed Sep 10 2014 yd
553- added debug package with symbolic info for exceptq.
554
555* Wed Sep 10 2014 Dmitriy Kuminov <coding@dmik.org> 2.0.0-1
556- Update git to version 2.0.0.
557- Fix cloning and pushing over HTTP(S).
558- Remove many old unneeded patches to have less OS/2-dependent code.
559
560* Sat Dec 17 2011 yd
561- rebuild due to gcc 4.4.6 bug.
562
563* Sun Nov 27 2011 yd
564- use /@unixroot/usr/bin shell.
565
566* Wed Sep 28 2011 yd
567- fixed build patches.
568- fixed expat support.
569
570* Sat Sep 24 2011 yd
571- symlink script files to exe, so execvp can find them.
572- ignore CR while reading CRLF terminated text files.
573
574* Tue Sep 20 2011 yd
575- disable broken_path_fix macro.
576
577* Mon Sep 19 2011 yd
578- use bigger stack for threads; use socketpair instead of pipes.
Note: See TracBrowser for help on using the repository browser.