3 %bcond_without tests # don't perform make test
5 %bcond_without doc # skip building/packaging docs/manuals (takes some time)
7 %include /usr/lib/rpm/macros.perl
8 Summary: The stupid content tracker
9 Summary(pl.UTF-8): Prymitywne narzędzie do śledzenia treści
14 Group: Development/Tools
15 Source0: http://www.kernel.org/pub/software/scm/git/git-%{version}.tar.bz2
16 # Source0-md5: a1dbc3da46cbf33c4367db689853c142
17 Source1: %{name}-gitweb.conf
18 Source2: %{name}-gitweb-httpd.conf
19 Source3: %{name}.sysconfig
22 URL: http://git-scm.com/
23 BuildRequires: autoconf
24 BuildRequires: automake
25 BuildRequires: curl-devel
26 BuildRequires: expat-devel
27 BuildRequires: gettext-devel
28 BuildRequires: openssl-devel
29 BuildRequires: perl-Error > 0.15
30 BuildRequires: perl-base
31 BuildRequires: rpm-perlprov >= 4.1-13
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.264
34 BuildRequires: zlib-devel
36 BuildRequires: asciidoc >= 7.1.2-3
37 BuildRequires: docbook-dtd45-xml
42 # tests failed sometimes when using nserver/cvsnt client so enforce pure cvs here
43 BuildRequires: cvs-gnu-client < 1.13
44 BuildRequires: cvs-gnu-client >= 1.12
46 BuildRequires: pdksh >= 5.2.14-46
52 Requires: openssh-clients
55 Suggests: git-core-cvs
56 Suggests: git-core-svn
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 # html docs have links to txt files
62 %define _noautocompressdoc *.txt
65 %define webappdir %{_sysconfdir}/webapps/%{webapp}
66 %define appdir %{_datadir}/%{webapp}
67 %define cgibindir %{_prefix}/lib/cgi-bin
70 "git" can mean anything, depending on your mood.
72 - random three-letter combination that is pronounceable, and not
73 actually used by any common UNIX command. The fact that it is a
74 mispronunciation of "get" may or may not be relevant.
75 - stupid. contemptible and despicable. simple. Take your pick from the
77 - "global information tracker": you're in a good mood, and it actually
78 works for you. Angels sing, and a light suddenly fills the room.
79 - "goddamn idiotic truckload of sh*t": when it breaks
81 This is a stupid (but extremely fast) directory content manager. It
82 doesn't do a whole lot, but what it 'does' do is track directory
85 %description -l pl.UTF-8
86 "git" może oznaczać cokolwiek, w zależności od nastroju.
88 - losową kombinację trzech liter, która jest wymawialna i właściwie
89 nie używana przez żadne popularne polecenie uniksowe. Fakt, że jest to
90 błędna pisownia słowa "get" może mieć lub nie mieć znaczenia.
91 - głupi, pogardliwy, prosty. Można wybrać ze słownika slangu.
92 - "global information tracker" (narzędzie do globalnego śledzenia
93 informacji) - jeśli jesteśmy w dobrym nastroju i git akurat działa.
94 Anioły śpiewają, a światło niespodziewanie wypełnia pokój.
95 - "goddamn idiotic truckload of sh*t" (przeklęty idiotyczny ładunek
96 g*) - kiedy się zepsuje.
98 Jest to prymitywny (ale bardzo szybki) zarządca treści słownikowej.
99 Nie robi wiele, ale to, co "robi", to wydajne śledzenie zawartości
102 %package daemon-inetd
103 Summary: Files necessary to run git-daemon as an inetd service
104 Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi inetd
105 Group: Networking/Daemons
106 Requires: %{name} = %{version}-%{release}
107 Requires: setup >= 2.4.11-1
108 Provides: git-core-daemon
109 Obsoletes: git-core-daemon
110 Obsoletes: git-core-daemon-standalone
112 %description daemon-inetd
113 Git-daemon is a really simple TCP git daemon that can serve git
114 repositories. This package provides all necessarry files to run
115 git-daemon as an inetd service.
117 %description daemon-inetd -l pl.UTF-8
118 Git-daemon to prosty demon git korzystający z protokołu TCP do
119 udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
120 do uruchomienia git-demona w trybie usługi inetd.
122 %package daemon-standalone
123 Summary: Files necessary to run git-daemon as a standalone service
124 Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi samodzielnej
125 Group: Networking/Daemons
126 Requires: %{name} = %{version}-%{release}
127 Provides: git-core-daemon
128 Obsoletes: git-core-daemon
129 Obsoletes: git-core-daemon-inetd
131 %description daemon-standalone
132 Git-daemon is a really simple TCP git daemon that can serve git
133 repositories. This package provides all necessarry files to run
134 git-daemon as an standalone service.
136 %description daemon-standalone -l pl.UTF-8
137 Git-daemon to prosty demon git korzystający z protokołu TCP do
138 udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
139 do uruchomienia git-daemona w trybie usługi samodzielnej.
142 Summary: Header files for git-core
143 Summary(pl.UTF-8): Pliki nagłówkowe dla git-core
144 Group: Development/Libraries
147 Header files for git-core.
149 %description devel -l pl.UTF-8
150 Pliki nagłówkowe dla git-core.
153 Summary: Tcl/Tk interface to the Git version control system
154 Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
155 Group: Development/Tools
156 Requires: %{name} = %{version}-%{release}
160 gitk displays changes in a repository or a selected set of commits.
161 This includes visualizing the commit graph, showing information
162 related to each commit, and the files in the trees of each revision.
164 Historically, gitk was the first repository browser. It's written in
165 Tcl/Tk and started off in a separate repository but was later merged
166 into the main git repository.
168 %description gitk -l pl.UTF-8
169 gitk wyświetla zmiany w repozytorium lub wybranym zbiorze commitów.
170 Oznacza to wizualizację grafu commitów, wyświetlanie informacji
171 związanych z każdym z commitów oraz listę plików dla każdej rewizji.
173 Z historycznego punktu widzenia gitk był pierwszą przeglądarką
174 repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
175 osobnym repozytorium, ale z czasem został włączony do głównego
179 Summary: Web frontend to git
180 Summary(pl.UTF-8): Webowy frontend do git
181 Group: Development/Tools
182 Requires: %{name} = %{version}-%{release}
186 This package provides a web interface for browsing git repositories.
188 %description gitweb -l pl.UTF-8
189 Pakiet ten dostarcza interfejs WWW do przeglądania repozytoriów gita.
192 Summary: A GTK+ based repository browser for git
193 Summary(pl.UTF-8): Oparta na GTK+ przeglądarka repozytorium gita
194 Group: Development/Tools
195 Requires: %{name} = %{version}-%{release}
196 Requires: python >= 1:2.4
197 Requires: python-pycairo >= 1.0
198 Requires: python-pygobject
199 Requires: python-pygtk-gtk >= 2:2.8
200 Suggests: python-gnome-desktop-gtksourceview
203 A GTK+ based repository browser for git.
205 %description gitview -l pl.UTF-8
206 Oparta na GTK+ przeglądarka repozytorium gita.
209 Summary: Tcl/Tk interface to the Git version control system
210 Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
211 Group: Development/Tools
212 Requires: %{name} = %{version}-%{release}
216 Displays changes in a repository or a selected set of commits. This
217 includes visualizing the commit graph, showing information related to
218 each commit, and the files in the trees of each revision.
220 Historically, gitk was the first repository browser. It's written in
221 Tcl/Tk and started off in a separate repository but was later merged
222 into the main git repository.
224 %description gui -l pl.UTF-8
225 Wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. Oznacza
226 to wizualizację grafu commitów, wyświetlanie informacji związanych z
227 każdym z commitów oraz listę plików dla każdej rewizji.
229 Z punktu widzenia historii, gitk był pierwszą przeglądarką
230 repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
231 osobnym repozytorium, ale z czasem został włączony do głównego
235 Summary: Subversion support for Git
236 Summary(pl.UTF-8): Obsługa Subversion dla Git
237 Group: Development/Tools
238 Requires: %{name} = %{version}-%{release}
241 Subversion support for Git.
243 %description svn -l pl.UTF-8
244 Obsługa Subversion dla Git.
247 Summary: CVS support for Git
248 Summary(pl.UTF-8): Obsługa CVS dla Git
249 Group: Development/Tools
250 Requires: %{name} = %{version}-%{release}
251 Requires: cvsps >= 2.1-2
257 %description cvs -l pl.UTF-8
261 Summary: Git tools for importing Arch repositories
262 Group: Development/Tools
263 Requires: %{name} = %{version}-%{release}
267 Git tools for importing Arch repositories.
270 Summary: Git tools for sending email
271 Group: Development/Tools
272 Requires: %{name} = %{version}-%{release}
275 Git tools for sending email.
277 %package -n bash-completion-git
278 Summary: bash-completion for git
279 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gita
280 Group: Applications/Shells
281 Requires: bash-completion
283 %description -n bash-completion-git
284 This package provides bash-completion for git.
286 %description -n bash-completion-git -l pl.UTF-8
287 Pakiet ten dostarcza bashowe uzupełnianie nazw dla gita.
290 Summary: Perl interface to the Git version control system
291 Summary(pl.UTF-8): Perlowy interfejs do systemu kontroli wersji Git
292 Group: Development/Languages/Perl
293 Obsoletes: perl-git-core
295 %description -n perl-Git
296 This module provides Perl scripts easy way to interface the Git
297 version control system. The modules have an easy and well-tested way
298 to call arbitrary Git commands; in the future, the interface will also
299 provide specialized methods for doing easily operations which are not
300 totally trivial to do over the generic command interface.
302 %description -n perl-Git -l pl.UTF-8
303 Ten moduł umożliwia skryptom Perla współpracę z systemem kontroli
304 wersji Git. W łatwy i dobrze przetestowany sposób pozwala wywoływać
305 dowolne polecenia Gita; w przyszłości interfejs udostępni także
306 specjalne metody do łatwego wykonywania operacji nietrywialnych do
307 wykonania przy użyciu ogólnego interfejsu poleceń.
309 %package -n vim-syntax-gitcommit
310 Summary: Vim syntax: gitcommit
311 Summary(pl.UTF-8): Składnia dla Vima: gitcommit
312 Group: Applications/Editors/Vim
313 # for _vimdatadir existence
314 Requires: vim-rt >= 4:6.3.058-3
316 %description -n vim-syntax-gitcommit
317 This plugin provides syntax highlighting for git's commit messages.
319 %description -n vim-syntax-gitcommit -l pl.UTF-8
320 Ta wtyczka dostarcza podświetlanie składni dla treści commitów gita.
323 %setup -q -n git-%{version}
334 GITWEB_CONFIG="%{webappdir}/gitweb.conf" \
335 GITWEB_PROJECTROOT="/var/lib/git" \
336 GITWEB_CSS="/gitweb/gitweb.css" \
337 GITWEB_LOGO="/gitweb/git-logo.png" \
338 GITWEB_FAVICON="/gitweb/git-favicon.png"
340 # use DOCBOOK_XSL_172=1 to fix 'the ".ft C" problem' in generated manpages.
341 %{?with_doc:%{__make} -C Documentation V=1 DOCBOOK_XSL_172=1}
344 %if %{without tests_cvs}
351 rm -rf $RPM_BUILD_ROOT
352 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name}/xdiff,%{_localstatedir}/lib/git}
353 install -d $RPM_BUILD_ROOT{%{appdir},%{cgibindir},%{webappdir}}
354 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d}
358 DESTDIR=$RPM_BUILD_ROOT
361 %{__make} -C Documentation install \
362 DESTDIR=$RPM_BUILD_ROOT
365 # header files and lib
366 install *.h $RPM_BUILD_ROOT%{_includedir}/%{name}
367 install xdiff/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/xdiff
368 install libgit.a $RPM_BUILD_ROOT%{_libdir}
369 install xdiff/lib.a $RPM_BUILD_ROOT%{_libdir}/libgit_xdiff.a
372 install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
373 cp -a contrib/completion/git-completion.bash $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
376 install -d $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax
377 cat > $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax/gitcommit.vim << 'EOF'
378 autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
379 autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig
380 autocmd BufNewFile,BufRead git-rebase-todo setf gitrebase
381 autocmd BufNewFile,BufRead .msg.[0-9]*
382 \ if getline(1) =~ '^From.*# This line is ignored.$' |
383 \ setf gitsendemail |
385 autocmd BufNewFile,BufRead *.git/**
386 \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
392 install -p gitweb/gitweb.cgi $RPM_BUILD_ROOT%{cgibindir}
393 cp -a gitweb/*.css gitweb/*.png $RPM_BUILD_ROOT%{appdir}
394 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}/gitweb.conf
395 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/apache.conf
396 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
399 install -p contrib/gitview/gitview $RPM_BUILD_ROOT%{_bindir}
401 # git-daemon related files
402 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/git-daemon
403 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
404 install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
407 sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
408 sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
411 ln -f $RPM_BUILD_ROOT%{_bindir}/{git,git-receive-pack}
412 ln -f $RPM_BUILD_ROOT%{_bindir}/{git,git-upload-archive}
413 ln -f $RPM_BUILD_ROOT{%{_libdir}/%{name},%{_bindir}}/git-shell
414 ln -f $RPM_BUILD_ROOT{%{_libdir}/%{name},%{_bindir}}/git-upload-pack
416 # remove unneeded files
417 rm $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
418 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Git/.packlist
421 rm -rf $RPM_BUILD_ROOT
424 %service -q rc-inetd reload
427 if [ "$1" = "0" ]; then
428 %service -q rc-inetd reload
431 %post daemon-standalone
432 /sbin/chkconfig --add git-daemon
433 %service git-daemon restart "git-daemon"
435 %preun daemon-standalone
436 if [ "$1" = "0" ]; then
437 %service git-daemon stop
438 /sbin/chkconfig --del git-daemon
441 %triggerin gitweb -- apache1 < 1.3.37-3, apache1-base
442 %webapp_register apache %{webapp}
444 %triggerun gitweb -- apache1 < 1.3.37-3, apache1-base
445 %webapp_unregister apache %{webapp}
447 %triggerin gitweb -- apache < 2.2.0, apache-base
448 %webapp_register httpd %{webapp}
450 %triggerun gitweb -- apache < 2.2.0, apache-base
451 %webapp_unregister httpd %{webapp}
454 %defattr(644,root,root,755)
457 %doc Documentation/RelNotes*
458 %doc Documentation/*.html Documentation/howto Documentation/technical
459 %{_mandir}/man1/git-*.1*
461 # rpm doesn't support exclude for %%doc
462 %exclude Documentation/*svn*.html
463 %exclude Documentation/*git-cvs*.html
464 %exclude Documentation/git-archimport.html
466 %exclude %{_mandir}/man1/git-svn.1*
467 %exclude %{_mandir}/man1/git-cvs*.1*
468 %{_mandir}/man1/git.1*
469 %{_mandir}/man5/gitattributes.5*
470 %{_mandir}/man5/githooks.5*
471 %{_mandir}/man5/gitignore.5*
472 %{_mandir}/man5/gitmodules.5*
473 %{_mandir}/man5/gitrepository-layout.5*
474 %{_mandir}/man7/gitcli.7*
475 %{_mandir}/man7/gitcore-tutorial.7*
476 %{_mandir}/man7/gitdiffcore.7*
477 %{_mandir}/man7/gitglossary.7*
478 %{_mandir}/man7/gittutorial-2.7*
479 %{_mandir}/man7/gittutorial.7*
480 %{_mandir}/man7/gitworkflows.7*
482 %attr(755,root,root) %{_bindir}/git
483 %attr(755,root,root) %{_bindir}/git-*
484 %dir %{_libdir}/%{name}
485 %attr(755,root,root) %{_libdir}/%{name}/*-*
486 %attr(755,root,root) %{_libdir}/%{name}/git
487 %exclude %{_libdir}/%{name}/git-gui
488 %exclude %{_libdir}/%{name}/git-svn
489 %exclude %{_libdir}/%{name}/git-archimport
490 %exclude %{_libdir}/%{name}/git-cvs*
491 %exclude %{_libdir}/%{name}/*email*
493 %{_localstatedir}/lib/git
496 %defattr(644,root,root,755)
497 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/git-daemon
499 %files daemon-standalone
500 %defattr(644,root,root,755)
501 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/git-daemon
502 %attr(754,root, root) /etc/rc.d/init.d/git-daemon
505 %defattr(644,root,root,755)
506 %{_includedir}/git-core
508 %{_libdir}/libgit_xdiff.a
511 %defattr(644,root,root,755)
513 %{_mandir}/man1/gitk.1*
515 %attr(755,root,root) %{_bindir}/gitk
516 %dir %{_datadir}/gitk
517 %dir %{_datadir}/gitk/lib
518 %dir %{_datadir}/gitk/lib/msgs
519 %lang(de) %{_datadir}/gitk/lib/msgs/de.msg
520 %lang(es) %{_datadir}/gitk/lib/msgs/es.msg
521 %lang(it) %{_datadir}/gitk/lib/msgs/it.msg
522 %lang(ru) %{_datadir}/gitk/lib/msgs/ru.msg
523 %lang(sv) %{_datadir}/gitk/lib/msgs/sv.msg
526 %defattr(644,root,root,755)
527 %doc gitweb/{README,INSTALL}
529 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitweb.conf
530 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
531 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
532 %attr(755,root,root) %{cgibindir}/gitweb.cgi
536 %defattr(644,root,root,755)
537 %doc contrib/gitview/gitview.txt
538 %attr(755,root,root) %{_bindir}/gitview
541 %defattr(644,root,root,755)
542 %attr(755,root,root) %{_libdir}/%{name}/git-gui
543 %dir %{_datadir}/git-gui
544 %dir %{_datadir}/git-gui/lib
545 %dir %{_datadir}/git-gui/lib/msgs
546 %{_datadir}/git-gui/lib/git-gui.ico
547 %{_datadir}/git-gui/lib/tclIndex
548 %{_datadir}/git-gui/lib/*.js
549 %{_datadir}/git-gui/lib/*.tcl
550 %lang(de) %{_datadir}/git-gui/lib/msgs/de.msg
551 %lang(fr) %{_datadir}/git-gui/lib/msgs/fr.msg
552 %lang(hu) %{_datadir}/git-gui/lib/msgs/hu.msg
553 %lang(it) %{_datadir}/git-gui/lib/msgs/it.msg
554 %lang(ja) %{_datadir}/git-gui/lib/msgs/ja.msg
555 %lang(nb) %{_datadir}/git-gui/lib/msgs/nb.msg
556 %lang(ru) %{_datadir}/git-gui/lib/msgs/ru.msg
557 %lang(sv) %{_datadir}/git-gui/lib/msgs/sv.msg
558 %lang(zh_cn) %{_datadir}/git-gui/lib/msgs/zh_cn.msg
561 %defattr(644,root,root,755)
562 %attr(755,root,root) %{_libdir}/%{name}/git-svn
564 %{_mandir}/man1/git-svn.1*
565 %doc Documentation/*svn*.html
569 %defattr(644,root,root,755)
570 %attr(755,root,root) %{_libdir}/%{name}/git-cvs*
572 %doc Documentation/*git-cvs*.html
573 %{_mandir}/man1/git-cvs*.1*
574 %{_mandir}/man7/gitcvs-migration.7*
578 %defattr(644,root,root,755)
579 %doc Documentation/git-archimport.txt
580 %attr(755,root,root) %{_libdir}/%{name}/git-archimport
582 %doc Documentation/git-archimport.html
583 %{_mandir}/man1/git-archimport.1*
587 %defattr(644,root,root,755)
588 %doc Documentation/*email*.txt
589 %attr(755,root,root) %{_libdir}/%{name}/*email*
591 %doc Documentation/*email*.html
592 %{_mandir}/man1/*email*.1*
595 %files -n bash-completion-git
596 %defattr(644,root,root,755)
597 %{_sysconfdir}/bash_completion.d/*
600 %defattr(644,root,root,755)
601 %{perl_vendorlib}/Git.pm
602 %{_mandir}/man3/Git.3pm*
604 %files -n vim-syntax-gitcommit
605 %defattr(644,root,root,755)
606 %doc contrib/vim/README
607 %{_datadir}/vim/vimfiles/syntax/*.vim