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: c7553b73e2156d187ece6ba936ae30ab
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: python-devel
32 BuildRequires: rpm-perlprov >= 4.1-13
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.264
35 BuildRequires: zlib-devel
37 BuildRequires: asciidoc >= 7.1.2-3
38 BuildRequires: docbook-dtd45-xml
43 # tests failed sometimes when using nserver/cvsnt client so enforce pure cvs here
44 BuildRequires: cvs-gnu-client < 1.13
45 BuildRequires: cvs-gnu-client >= 1.12
47 BuildRequires: pdksh >= 5.2.14-46
53 Requires: openssh-clients
56 Suggests: git-core-cvs
57 Suggests: git-core-svn
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 # html docs have links to txt files
63 %define _noautocompressdoc *.txt
66 %define webappdir %{_sysconfdir}/webapps/%{webapp}
67 %define appdir %{_datadir}/%{webapp}
68 %define cgibindir %{_prefix}/lib/cgi-bin
71 "git" can mean anything, depending on your mood.
73 - random three-letter combination that is pronounceable, and not
74 actually used by any common UNIX command. The fact that it is a
75 mispronunciation of "get" may or may not be relevant.
76 - stupid. contemptible and despicable. simple. Take your pick from the
78 - "global information tracker": you're in a good mood, and it actually
79 works for you. Angels sing, and a light suddenly fills the room.
80 - "goddamn idiotic truckload of sh*t": when it breaks
82 This is a stupid (but extremely fast) directory content manager. It
83 doesn't do a whole lot, but what it 'does' do is track directory
86 %description -l pl.UTF-8
87 "git" może oznaczać cokolwiek, w zależności od nastroju.
89 - losową kombinację trzech liter, która jest wymawialna i właściwie
90 nie używana przez żadne popularne polecenie uniksowe. Fakt, że jest to
91 błędna pisownia słowa "get" może mieć lub nie mieć znaczenia.
92 - głupi, pogardliwy, prosty. Można wybrać ze słownika slangu.
93 - "global information tracker" (narzędzie do globalnego śledzenia
94 informacji) - jeśli jesteśmy w dobrym nastroju i git akurat działa.
95 Anioły śpiewają, a światło niespodziewanie wypełnia pokój.
96 - "goddamn idiotic truckload of sh*t" (przeklęty idiotyczny ładunek
97 g*) - kiedy się zepsuje.
99 Jest to prymitywny (ale bardzo szybki) zarządca treści słownikowej.
100 Nie robi wiele, ale to, co "robi", to wydajne śledzenie zawartości
104 Summary: Documentation for git-core
105 Summary(pl.UTF-8): Dokumentacja do git-core
109 Documentation for git-core.
111 %description doc -l pl.UTF-8
112 Dokumentacja do git-core.
114 %description doc -l fr.UTF-8
115 Javadoc pour git-core.
117 %package daemon-inetd
118 Summary: Files necessary to run git-daemon as an inetd service
119 Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi inetd
120 Group: Networking/Daemons
121 Requires: %{name} = %{version}-%{release}
122 Requires: setup >= 2.4.11-1
123 Provides: git-core-daemon
124 Obsoletes: git-core-daemon
125 Obsoletes: git-core-daemon-standalone
127 %description daemon-inetd
128 Git-daemon is a really simple TCP git daemon that can serve git
129 repositories. This package provides all necessarry files to run
130 git-daemon as an inetd service.
132 %description daemon-inetd -l pl.UTF-8
133 Git-daemon to prosty demon git korzystający z protokołu TCP do
134 udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
135 do uruchomienia git-demona w trybie usługi inetd.
137 %package daemon-standalone
138 Summary: Files necessary to run git-daemon as a standalone service
139 Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi samodzielnej
140 Group: Networking/Daemons
141 Requires: %{name} = %{version}-%{release}
142 Provides: git-core-daemon
143 Obsoletes: git-core-daemon
144 Obsoletes: git-core-daemon-inetd
146 %description daemon-standalone
147 Git-daemon is a really simple TCP git daemon that can serve git
148 repositories. This package provides all necessarry files to run
149 git-daemon as an standalone service.
151 %description daemon-standalone -l pl.UTF-8
152 Git-daemon to prosty demon git korzystający z protokołu TCP do
153 udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
154 do uruchomienia git-daemona w trybie usługi samodzielnej.
157 Summary: Header files for git-core
158 Summary(pl.UTF-8): Pliki nagłówkowe dla git-core
159 Group: Development/Libraries
162 Header files for git-core.
164 %description devel -l pl.UTF-8
165 Pliki nagłówkowe dla git-core.
168 Summary: Tcl/Tk interface to the Git version control system
169 Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
170 Group: Development/Tools
171 Requires: %{name} = %{version}-%{release}
175 gitk displays changes in a repository or a selected set of commits.
176 This includes visualizing the commit graph, showing information
177 related to each commit, and the files in the trees of each revision.
179 Historically, gitk was the first repository browser. It's written in
180 Tcl/Tk and started off in a separate repository but was later merged
181 into the main git repository.
183 %description gitk -l pl.UTF-8
184 gitk wyświetla zmiany w repozytorium lub wybranym zbiorze commitów.
185 Oznacza to wizualizację grafu commitów, wyświetlanie informacji
186 związanych z każdym z commitów oraz listę plików dla każdej rewizji.
188 Z historycznego punktu widzenia gitk był pierwszą przeglądarką
189 repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
190 osobnym repozytorium, ale z czasem został włączony do głównego
194 Summary: Web frontend to git
195 Summary(pl.UTF-8): Webowy frontend do git
196 Group: Development/Tools
197 Requires: %{name} = %{version}-%{release}
201 This package provides a web interface for browsing git repositories.
203 %description gitweb -l pl.UTF-8
204 Pakiet ten dostarcza interfejs WWW do przeglądania repozytoriów gita.
207 Summary: A GTK+ based repository browser for git
208 Summary(pl.UTF-8): Oparta na GTK+ przeglądarka repozytorium gita
209 Group: Development/Tools
210 Requires: %{name} = %{version}-%{release}
211 Requires: python >= 1:2.4
212 Requires: python-pycairo >= 1.0
213 Requires: python-pygobject
214 Requires: python-pygtk-gtk >= 2:2.8
215 Suggests: python-gnome-desktop-gtksourceview
218 A GTK+ based repository browser for git.
220 %description gitview -l pl.UTF-8
221 Oparta na GTK+ przeglądarka repozytorium gita.
224 Summary: Tcl/Tk interface to the Git version control system
225 Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
226 Group: Development/Tools
227 Requires: %{name} = %{version}-%{release}
231 Displays changes in a repository or a selected set of commits. This
232 includes visualizing the commit graph, showing information related to
233 each commit, and the files in the trees of each revision.
235 Historically, gitk was the first repository browser. It's written in
236 Tcl/Tk and started off in a separate repository but was later merged
237 into the main git repository.
239 %description gui -l pl.UTF-8
240 Wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. Oznacza
241 to wizualizację grafu commitów, wyświetlanie informacji związanych z
242 każdym z commitów oraz listę plików dla każdej rewizji.
244 Z punktu widzenia historii, gitk był pierwszą przeglądarką
245 repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
246 osobnym repozytorium, ale z czasem został włączony do głównego
250 Summary: Subversion support for Git
251 Summary(pl.UTF-8): Obsługa Subversion dla Git
252 Group: Development/Tools
253 Requires: %{name} = %{version}-%{release}
256 Subversion support for Git.
258 %description svn -l pl.UTF-8
259 Obsługa Subversion dla Git.
262 Summary: CVS support for Git
263 Summary(pl.UTF-8): Obsługa CVS dla Git
264 Group: Development/Tools
265 Requires: %{name} = %{version}-%{release}
266 Requires: cvsps >= 2.1-2
272 %description cvs -l pl.UTF-8
276 Summary: Git tools for importing Arch repositories
277 Group: Development/Tools
278 Requires: %{name} = %{version}-%{release}
282 Git tools for importing Arch repositories.
285 Summary: Git tools for sending email
286 Group: Development/Tools
287 Requires: %{name} = %{version}-%{release}
290 Git tools for sending email.
292 %package -n bash-completion-git
293 Summary: bash-completion for git
294 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gita
295 Group: Applications/Shells
296 Requires: bash-completion
298 %description -n bash-completion-git
299 This package provides bash-completion for git.
301 %description -n bash-completion-git -l pl.UTF-8
302 Pakiet ten dostarcza bashowe uzupełnianie nazw dla gita.
305 Summary: Perl interface to the Git version control system
306 Summary(pl.UTF-8): Perlowy interfejs do systemu kontroli wersji Git
307 Group: Development/Languages/Perl
308 Obsoletes: perl-git-core
310 %description -n perl-Git
311 This module provides Perl scripts easy way to interface the Git
312 version control system. The modules have an easy and well-tested way
313 to call arbitrary Git commands; in the future, the interface will also
314 provide specialized methods for doing easily operations which are not
315 totally trivial to do over the generic command interface.
317 %description -n perl-Git -l pl.UTF-8
318 Ten moduł umożliwia skryptom Perla współpracę z systemem kontroli
319 wersji Git. W łatwy i dobrze przetestowany sposób pozwala wywoływać
320 dowolne polecenia Gita; w przyszłości interfejs udostępni także
321 specjalne metody do łatwego wykonywania operacji nietrywialnych do
322 wykonania przy użyciu ogólnego interfejsu poleceń.
324 %package -n python-Git
325 Summary: Python interface to the Git version control system
326 Summary(pl.UTF-8): Pythonowy interfejs do systemu kontroli wersji Git
327 Group: Development/Languages/Python
329 %description -n python-Git
330 This module provides Python scripts easy way to interface the Git
331 version control system.
333 %description -n python-Git -l pl.UTF-8
334 Ten moduł umożliwia skryptom Pythonowym współpracę z systemem kontroli
337 %package -n vim-syntax-gitcommit
338 Summary: Vim syntax: gitcommit
339 Summary(pl.UTF-8): Składnia dla Vima: gitcommit
340 Group: Applications/Editors/Vim
341 # for _vimdatadir existence
342 Requires: vim-rt >= 4:6.3.058-3
344 %description -n vim-syntax-gitcommit
345 This plugin provides syntax highlighting for git's commit messages.
347 %description -n vim-syntax-gitcommit -l pl.UTF-8
348 Ta wtyczka dostarcza podświetlanie składni dla treści commitów gita.
351 %setup -q -n git-%{version}
362 GITWEB_CONFIG="%{webappdir}/gitweb.conf" \
363 GITWEB_PROJECTROOT="/var/lib/git" \
364 GITWEB_CSS="/gitweb/gitweb.css" \
365 GITWEB_LOGO="/gitweb/git-logo.png" \
366 GITWEB_FAVICON="/gitweb/git-favicon.png"
368 # use DOCBOOK_XSL_172=1 to fix 'the ".ft C" problem' in generated manpages.
369 %{?with_doc:%{__make} -C Documentation V=1 DOCBOOK_XSL_172=1}
372 %if %{without tests_cvs}
379 rm -rf $RPM_BUILD_ROOT
380 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name}/xdiff,%{_localstatedir}/lib/git}
381 install -d $RPM_BUILD_ROOT{%{appdir},%{cgibindir},%{webappdir}}
382 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d}
386 DESTDIR=$RPM_BUILD_ROOT
389 %{__make} -C Documentation install \
390 DESTDIR=$RPM_BUILD_ROOT
393 # header files and lib
394 install *.h $RPM_BUILD_ROOT%{_includedir}/%{name}
395 install xdiff/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/xdiff
396 install libgit.a $RPM_BUILD_ROOT%{_libdir}
397 install xdiff/lib.a $RPM_BUILD_ROOT%{_libdir}/libgit_xdiff.a
400 install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
401 cp -a contrib/completion/git-completion.bash $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
404 install -d $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax
405 cat > $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax/gitcommit.vim << 'EOF'
406 autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
407 autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig
408 autocmd BufNewFile,BufRead git-rebase-todo setf gitrebase
409 autocmd BufNewFile,BufRead .msg.[0-9]*
410 \ if getline(1) =~ '^From.*# This line is ignored.$' |
411 \ setf gitsendemail |
413 autocmd BufNewFile,BufRead *.git/**
414 \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
420 install -p gitweb/gitweb.cgi $RPM_BUILD_ROOT%{cgibindir}
421 cp -a gitweb/*.css gitweb/*.png $RPM_BUILD_ROOT%{appdir}
422 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}/gitweb.conf
423 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/apache.conf
424 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
427 install -p contrib/gitview/gitview $RPM_BUILD_ROOT%{_bindir}
429 # git-daemon related files
430 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/git-daemon
431 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
432 install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
435 sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
436 sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
439 ln -f $RPM_BUILD_ROOT%{_bindir}/{git,git-receive-pack}
440 ln -f $RPM_BUILD_ROOT%{_bindir}/{git,git-upload-archive}
441 ln -f $RPM_BUILD_ROOT{%{_libdir}/%{name},%{_bindir}}/git-shell
442 ln -f $RPM_BUILD_ROOT{%{_libdir}/%{name},%{_bindir}}/git-upload-pack
444 # remove unneeded files
445 rm $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
446 rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Git/.packlist
449 rm -rf $RPM_BUILD_ROOT
452 %service -q rc-inetd reload
455 if [ "$1" = "0" ]; then
456 %service -q rc-inetd reload
459 %post daemon-standalone
460 /sbin/chkconfig --add git-daemon
461 %service git-daemon restart "git-daemon"
463 %preun daemon-standalone
464 if [ "$1" = "0" ]; then
465 %service git-daemon stop
466 /sbin/chkconfig --del git-daemon
469 %triggerin gitweb -- apache1 < 1.3.37-3, apache1-base
470 %webapp_register apache %{webapp}
472 %triggerun gitweb -- apache1 < 1.3.37-3, apache1-base
473 %webapp_unregister apache %{webapp}
475 %triggerin gitweb -- apache < 2.2.0, apache-base
476 %webapp_register httpd %{webapp}
478 %triggerun gitweb -- apache < 2.2.0, apache-base
479 %webapp_unregister httpd %{webapp}
482 %defattr(644,root,root,755)
484 %attr(755,root,root) %{_bindir}/git
485 %attr(755,root,root) %{_bindir}/git-*
488 %{_mandir}/man1/git-*.1*
489 %exclude %{_mandir}/man1/git-svn.1*
490 %exclude %{_mandir}/man1/git-cvs*.1*
491 %{_mandir}/man1/git.1*
492 %{_mandir}/man5/gitattributes.5*
493 %{_mandir}/man5/githooks.5*
494 %{_mandir}/man5/gitignore.5*
495 %{_mandir}/man5/gitmodules.5*
496 %{_mandir}/man5/gitrepository-layout.5*
497 %{_mandir}/man7/gitcli.7*
498 %{_mandir}/man7/gitcore-tutorial.7*
499 %{_mandir}/man7/gitdiffcore.7*
500 %{_mandir}/man7/gitglossary.7*
501 %{_mandir}/man7/gittutorial-2.7*
502 %{_mandir}/man7/gittutorial.7*
503 %{_mandir}/man7/gitworkflows.7*
506 %dir %{_libdir}/%{name}
507 %attr(755,root,root) %{_libdir}/%{name}/*-*
508 %attr(755,root,root) %{_libdir}/%{name}/git
510 %exclude %{_libdir}/%{name}/git-gui
511 %exclude %{_libdir}/%{name}/git-svn
512 %exclude %{_libdir}/%{name}/git-archimport
513 %exclude %{_libdir}/%{name}/git-cvs*
514 %exclude %{_libdir}/%{name}/*email*
518 %{_localstatedir}/lib/git
522 %defattr(644,root,root,755)
523 %doc Documentation/RelNotes*
524 %doc Documentation/*.html Documentation/howto Documentation/technical
528 %defattr(644,root,root,755)
529 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/git-daemon
531 %files daemon-standalone
532 %defattr(644,root,root,755)
533 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/git-daemon
534 %attr(754,root, root) /etc/rc.d/init.d/git-daemon
537 %defattr(644,root,root,755)
538 %{_includedir}/git-core
540 %{_libdir}/libgit_xdiff.a
543 %defattr(644,root,root,755)
545 %{_mandir}/man1/gitk.1*
547 %attr(755,root,root) %{_bindir}/gitk
548 %dir %{_datadir}/gitk
549 %dir %{_datadir}/gitk/lib
550 %dir %{_datadir}/gitk/lib/msgs
551 %lang(de) %{_datadir}/gitk/lib/msgs/de.msg
552 %lang(es) %{_datadir}/gitk/lib/msgs/es.msg
553 %lang(fr) %{_datadir}/gitk/lib/msgs/fr.msg
554 %lang(hu) %{_datadir}/gitk/lib/msgs/hu.msg
555 %lang(it) %{_datadir}/gitk/lib/msgs/it.msg
556 %lang(ja) %{_datadir}/gitk/lib/msgs/ja.msg
557 %lang(ru) %{_datadir}/gitk/lib/msgs/ru.msg
558 %lang(sv) %{_datadir}/gitk/lib/msgs/sv.msg
561 %defattr(644,root,root,755)
562 %doc gitweb/{README,INSTALL}
564 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitweb.conf
565 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
566 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
567 %attr(755,root,root) %{cgibindir}/gitweb.cgi
571 %defattr(644,root,root,755)
572 %doc contrib/gitview/gitview.txt
573 %attr(755,root,root) %{_bindir}/gitview
576 %defattr(644,root,root,755)
577 %attr(755,root,root) %{_libdir}/%{name}/git-gui
578 %dir %{_datadir}/git-gui
579 %dir %{_datadir}/git-gui/lib
580 %dir %{_datadir}/git-gui/lib/msgs
581 %{_datadir}/git-gui/lib/git-gui.ico
582 %{_datadir}/git-gui/lib/tclIndex
583 %{_datadir}/git-gui/lib/*.js
584 %{_datadir}/git-gui/lib/*.tcl
585 %lang(de) %{_datadir}/git-gui/lib/msgs/de.msg
586 %lang(el) %{_datadir}/git-gui/lib/msgs/el.msg
587 %lang(fr) %{_datadir}/git-gui/lib/msgs/fr.msg
588 %lang(hu) %{_datadir}/git-gui/lib/msgs/hu.msg
589 %lang(it) %{_datadir}/git-gui/lib/msgs/it.msg
590 %lang(ja) %{_datadir}/git-gui/lib/msgs/ja.msg
591 %lang(nb) %{_datadir}/git-gui/lib/msgs/nb.msg
592 %lang(ru) %{_datadir}/git-gui/lib/msgs/ru.msg
593 %lang(sv) %{_datadir}/git-gui/lib/msgs/sv.msg
594 %lang(zh_cn) %{_datadir}/git-gui/lib/msgs/zh_cn.msg
597 %defattr(644,root,root,755)
598 %attr(755,root,root) %{_libdir}/%{name}/git-svn
600 %{_mandir}/man1/git-svn.1*
604 %defattr(644,root,root,755)
605 %attr(755,root,root) %{_libdir}/%{name}/git-cvs*
607 %{_mandir}/man1/git-cvs*.1*
608 %{_mandir}/man7/gitcvs-migration.7*
612 %defattr(644,root,root,755)
613 %attr(755,root,root) %{_libdir}/%{name}/git-archimport
615 %{_mandir}/man1/git-archimport.1*
619 %defattr(644,root,root,755)
620 %attr(755,root,root) %{_libdir}/%{name}/*email*
622 %{_mandir}/man1/*email*.1*
625 %files -n bash-completion-git
626 %defattr(644,root,root,755)
627 %{_sysconfdir}/bash_completion.d/*
630 %defattr(644,root,root,755)
631 %{perl_vendorlib}/Git.pm
632 %{_mandir}/man3/Git.3pm*
635 %defattr(644,root,root,755)
636 %{py_sitescriptdir}/git_remote_helpers*.egg-info
637 %dir %{py_sitescriptdir}/git_remote_helpers
638 %{py_sitescriptdir}/git_remote_helpers/*.py[co]
639 %dir %{py_sitescriptdir}/git_remote_helpers/git
640 %{py_sitescriptdir}/git_remote_helpers/git/*.py[co]
642 %files -n vim-syntax-gitcommit
643 %defattr(644,root,root,755)
644 %doc contrib/vim/README
645 %{_datadir}/vim/vimfiles/syntax/*.vim