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: fd784f407d538705ed36c0498542d4f5
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: docbook-dtd45-xml
27 BuildRequires: expat-devel
28 BuildRequires: gettext-devel
29 BuildRequires: openssl-devel
30 BuildRequires: perl-Error
31 BuildRequires: perl-base
33 BuildRequires: rpm-perlprov >= 4.1-13
34 BuildRequires: rpmbuild(macros) >= 1.264
35 BuildRequires: zlib-devel
37 BuildRequires: asciidoc >= 7.1.2-3
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
57 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59 # html docs have links to txt files
60 %define _noautocompressdoc *.txt
63 %define webappdir %{_sysconfdir}/webapps/%{webapp}
64 %define appdir %{_datadir}/%{webapp}
65 %define cgibindir %{_prefix}/lib/cgi-bin
68 "git" can mean anything, depending on your mood.
70 - random three-letter combination that is pronounceable, and not
71 actually used by any common UNIX command. The fact that it is a
72 mispronunciation of "get" may or may not be relevant.
73 - stupid. contemptible and despicable. simple. Take your pick from the
75 - "global information tracker": you're in a good mood, and it actually
76 works for you. Angels sing, and a light suddenly fills the room.
77 - "goddamn idiotic truckload of sh*t": when it breaks
79 This is a stupid (but extremely fast) directory content manager. It
80 doesn't do a whole lot, but what it 'does' do is track directory
83 %description -l pl.UTF-8
84 "git" może oznaczać cokolwiek, w zależności od nastroju.
86 - losową kombinację trzech liter, która jest wymawialna i właściwie
87 nie używana przez żadne popularne polecenie uniksowe. Fakt, że jest to
88 błędna pisownia słowa "get" może mieć lub nie mieć znaczenia.
89 - głupi, pogardliwy, prosty. Można wybrać ze słownika slangu.
90 - "global information tracker" (narzędzie do globalnego śledzenia
91 informacji) - jeśli jesteśmy w dobrym nastroju i git akurat działa.
92 Anioły śpiewają, a światło niespodziewanie wypełnia pokój.
93 - "goddamn idiotic truckload of sh*t" (przeklęty idiotyczny ładunek
94 g*) - kiedy się zepsuje.
96 Jest to prymitywny (ale bardzo szybki) zarządca treści słownikowej.
97 Nie robi wiele, ale to, co "robi", to wydajne śledzenie zawartości
100 %package daemon-inetd
101 Summary: Files necessary to run git-daemon as an inetd service
102 Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi inetd
103 Group: Networking/Daemons
104 Requires: %{name} = %{version}-%{release}
105 Requires: setup >= 2.4.11-1
106 Provides: git-core-daemon
107 Obsoletes: git-core-daemon
108 Obsoletes: git-core-daemon-standalone
110 %description daemon-inetd
111 Git-daemon is a really simple TCP git daemon that can serve git
112 repositories. This package provides all necessarry files to run
113 git-daemon as an inetd service.
115 %description daemon-inetd -l pl.UTF-8
116 Git-daemon to prosty demon git korzystający z protokołu TCP do
117 udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
118 do uruchomienia git-demona w trybie usługi inetd.
120 %package daemon-standalone
121 Summary: Files necessary to run git-daemon as a standalone service
122 Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi samodzielnej
123 Group: Networking/Daemons
124 Requires: %{name} = %{version}-%{release}
125 Provides: git-core-daemon
126 Obsoletes: git-core-daemon
127 Obsoletes: git-core-daemon-inetd
129 %description daemon-standalone
130 Git-daemon is a really simple TCP git daemon that can serve git
131 repositories. This package provides all necessarry files to run
132 git-daemon as an standalone service.
134 %description daemon-standalone -l pl.UTF-8
135 Git-daemon to prosty demon git korzystający z protokołu TCP do
136 udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
137 do uruchomienia git-daemona w trybie usługi samodzielnej.
140 Summary: Header files for git-core
141 Summary(pl.UTF-8): Pliki nagłówkowe dla git-core
142 Group: Development/Libraries
145 Header files for git-core.
147 %description devel -l pl.UTF-8
148 Pliki nagłówkowe dla git-core.
151 Summary: Tcl/Tk interface to the Git version control system
152 Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
153 Group: Development/Tools
154 Requires: %{name} = %{version}-%{release}
158 gitk displays changes in a repository or a selected set of commits.
159 This includes visualizing the commit graph, showing information
160 related to each commit, and the files in the trees of each revision.
162 Historically, gitk was the first repository browser. It's written in
163 Tcl/Tk and started off in a separate repository but was later merged
164 into the main git repository.
166 %description gitk -l pl.UTF-8
167 gitk wyświetla zmiany w repozytorium lub wybranym zbiorze commitów.
168 Oznacza to wizualizację grafu commitów, wyświetlanie informacji
169 związanych z każdym z commitów oraz listę plików dla każdej rewizji.
171 Z historycznego punktu widzenia gitk był pierwszą przeglądarką
172 repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
173 osobnym repozytorium, ale z czasem został włączony do głównego
177 Summary: Web frontend to git
178 Summary(pl.UTF-8): Webowy frontend do git
179 Group: Development/Tools
180 Requires: %{name} = %{version}-%{release}
184 This package provides a web interface for browsing git repositories.
186 %description gitweb -l pl.UTF-8
187 Pakiet ten dostarcza interfejs WWW do przeglądania repozytoriów gita.
190 Summary: A GTK+ based repository browser for git
191 Summary(pl.UTF-8): Oparta na GTK+ przeglądarka repozytorium gita
192 Group: Development/Tools
193 Requires: %{name} = %{version}-%{release}
194 Requires: python >= 1:2.4
195 Requires: python-pycairo >= 1.0
196 Requires: python-pygobject
197 Requires: python-pygtk-gtk >= 2:2.8
198 Suggests: python-gnome-desktop-gtksourceview
201 A GTK+ based repository browser for git.
203 %description gitview -l pl.UTF-8
204 Oparta na GTK+ przeglądarka repozytorium gita.
207 Summary: Tcl/Tk interface to the Git version control system
208 Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
209 Group: Development/Tools
210 Requires: %{name} = %{version}-%{release}
214 Displays changes in a repository or a selected set of commits. This
215 includes visualizing the commit graph, showing information related to
216 each commit, and the files in the trees of each revision.
218 Historically, gitk was the first repository browser. It's written in
219 Tcl/Tk and started off in a separate repository but was later merged
220 into the main git repository.
222 %description gui -l pl.UTF-8
223 Wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. Oznacza
224 to wizualizację grafu commitów, wyświetlanie informacji związanych z
225 każdym z commitów oraz listę plików dla każdej rewizji.
227 Z punktu widzenia historii, gitk był pierwszą przeglądarką
228 repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
229 osobnym repozytorium, ale z czasem został włączony do głównego
233 Summary: Subversion support for Git
234 Summary(pl.UTF-8): Obsługa Subversion dla Git
235 Group: Development/Tools
236 Requires: %{name} = %{version}-%{release}
239 Subversion support for Git.
241 %description svn -l pl.UTF-8
242 Obsługa Subversion dla Git.
245 Summary: CVS support for Git
246 Summary(pl.UTF-8): Obsługa CVS dla Git
247 Group: Development/Tools
248 Requires: %{name} = %{version}-%{release}
249 Requires: cvsps >= 2.1-2
255 %description cvs -l pl.UTF-8
258 %package -n bash-completion-git
259 Summary: bash-completion for git
260 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gita
261 Group: Applications/Shells
262 Requires: bash-completion
264 %description -n bash-completion-git
265 This package provides bash-completion for git.
267 %description -n bash-completion-git -l pl.UTF-8
268 Pakiet ten dostarcza bashowe uzupełnianie nazw dla gita.
271 Summary: Perl interface to the Git version control system
272 Summary(pl.UTF-8): Perlowy interfejs do systemu kontroli wersji Git
273 Group: Development/Languages/Perl
274 Requires: %{name} = %{version}-%{release}
275 Obsoletes: perl-git-core
277 %description -n perl-Git
278 This module provides Perl scripts easy way to interface the Git
279 version control system. The modules have an easy and well-tested way
280 to call arbitrary Git commands; in the future, the interface will also
281 provide specialized methods for doing easily operations which are not
282 totally trivial to do over the generic command interface.
284 %description -n perl-Git -l pl.UTF-8
285 Ten moduł umożliwia skryptom Perla współpracę z systemem kontroli
286 wersji Git. W łatwy i dobrze przetestowany sposób pozwala wywoływać
287 dowolne polecenia Gita; w przyszłości interfejs udostępni także
288 specjalne metody do łatwego wykonywania operacji nietrywialnych do
289 wykonania przy użyciu ogólnego interfejsu poleceń.
291 %package -n vim-syntax-gitcommit
292 Summary: Vim syntax: gitcommit
293 Summary(pl.UTF-8): Składnia dla Vima: gitcommit
294 Group: Applications/Editors/Vim
295 # for _vimdatadir existence
296 Requires: vim-rt >= 4:6.3.058-3
298 %description -n vim-syntax-gitcommit
299 This plugin provides syntax highlighting for git's commit messages.
301 %description -n vim-syntax-gitcommit -l pl.UTF-8
302 Ta wtyczka dostarcza podświetlanie składni dla treści commitów gita.
305 %setup -q -n git-%{version}
316 GITWEB_CONFIG="%{webappdir}/gitweb.conf" \
317 GITWEB_PROJECTROOT="/var/lib/git" \
318 GITWEB_CSS="/gitweb/gitweb.css" \
319 GITWEB_LOGO="/gitweb/git-logo.png" \
320 GITWEB_FAVICON="/gitweb/git-favicon.png"
322 %{?with_doc:%{__make} -C Documentation}
325 %if %{without tests_cvs}
332 rm -rf $RPM_BUILD_ROOT
333 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name}/xdiff,%{_localstatedir}/lib/git}
334 install -d $RPM_BUILD_ROOT{%{appdir},%{cgibindir},%{webappdir}}
335 install -d $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax
336 install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
337 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d}
341 DESTDIR=$RPM_BUILD_ROOT
344 %{__make} -C Documentation install \
345 DESTDIR=$RPM_BUILD_ROOT
348 # header files and lib
349 install *.h $RPM_BUILD_ROOT%{_includedir}/%{name}
350 install xdiff/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/xdiff
351 install libgit.a $RPM_BUILD_ROOT%{_libdir}
352 install xdiff/lib.a $RPM_BUILD_ROOT%{_libdir}/libgit_xdiff.a
355 install contrib/completion/git-completion.bash $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
358 cat > $RPM_BUILD_ROOT/%{_datadir}/vim/vimfiles/syntax/gitcommit.vim << 'EOF'
359 autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
360 autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig
361 autocmd BufNewFile,BufRead git-rebase-todo setf gitrebase
362 autocmd BufNewFile,BufRead .msg.[0-9]*
363 \ if getline(1) =~ '^From.*# This line is ignored.$' |
364 \ setf gitsendemail |
366 autocmd BufNewFile,BufRead *.git/**
367 \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
373 install gitweb/*.css gitweb/*.png $RPM_BUILD_ROOT%{appdir}
374 install gitweb/gitweb.cgi $RPM_BUILD_ROOT%{cgibindir}
375 install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}/gitweb.conf
376 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/apache.conf
377 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
380 install contrib/gitview/gitview $RPM_BUILD_ROOT%{_bindir}
382 # git-daemon related files
383 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/git-daemon
384 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
385 install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
388 sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
389 sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
391 # remove unneeded files
392 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
393 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Git/.packlist
394 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Error.pm
395 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/private-Error.3*
398 rm -rf $RPM_BUILD_ROOT
401 %service -q rc-inetd reload
404 if [ "$1" = "0" ]; then
405 %service -q rc-inetd reload
408 %post daemon-standalone
409 /sbin/chkconfig --add git-daemon
410 %service git-daemon restart "git-daemon"
412 %preun daemon-standalone
413 if [ "$1" = "0" ]; then
414 %service git-daemon stop
415 /sbin/chkconfig --del git-daemon
418 %triggerin gitweb -- apache1 < 1.3.37-3, apache1-base
419 %webapp_register apache %{webapp}
421 %triggerun gitweb -- apache1 < 1.3.37-3, apache1-base
422 %webapp_unregister apache %{webapp}
424 %triggerin gitweb -- apache < 2.2.0, apache-base
425 %webapp_register httpd %{webapp}
427 %triggerun gitweb -- apache < 2.2.0, apache-base
428 %webapp_unregister httpd %{webapp}
431 %defattr(644,root,root,755)
434 %doc Documentation/RelNotes*
435 %doc Documentation/*.html Documentation/howto Documentation/technical
436 %{_mandir}/man1/git-*.1*
437 %exclude %{_mandir}/man1/git-svn.1*
438 %exclude %{_mandir}/man1/git-cvs*.1*
439 %{_mandir}/man1/git.1*
440 %{_mandir}/man5/gitattributes.5*
441 %{_mandir}/man5/githooks.5*
442 %{_mandir}/man5/gitignore.5*
443 %{_mandir}/man5/gitmodules.5*
444 %{_mandir}/man5/gitrepository-layout.5*
445 %{_mandir}/man7/gitcli.7*
446 %{_mandir}/man7/gitcore-tutorial.7*
447 %{_mandir}/man7/gitdiffcore.7*
448 %{_mandir}/man7/gitglossary.7*
449 %{_mandir}/man7/gittutorial-2.7*
450 %{_mandir}/man7/gittutorial.7*
451 %{_mandir}/man7/gitworkflows.7*
453 %attr(755,root,root) %{_bindir}/git
454 %attr(755,root,root) %{_bindir}/git-*
455 %dir %{_libdir}/%{name}
456 %attr(755,root,root) %{_libdir}/%{name}/*-*
457 %attr(755,root,root) %{_libdir}/%{name}/git
458 %exclude %{_libdir}/%{name}/git-gui
459 %exclude %{_libdir}/%{name}/git-svn
460 %exclude %{_libdir}/%{name}/git-cvs*
462 %{_localstatedir}/lib/git
465 %defattr(644,root,root,755)
466 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/git-daemon
468 %files daemon-standalone
469 %defattr(644,root,root,755)
470 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/git-daemon
471 %attr(754,root, root) /etc/rc.d/init.d/git-daemon
474 %defattr(644,root,root,755)
475 %{_includedir}/git-core
477 %{_libdir}/libgit_xdiff.a
480 %defattr(644,root,root,755)
482 %{_mandir}/man1/gitk.1*
484 %attr(755,root,root) %{_bindir}/gitk
485 %dir %{_datadir}/gitk
486 %dir %{_datadir}/gitk/lib
487 %dir %{_datadir}/gitk/lib/msgs
488 %lang(de) %{_datadir}/gitk/lib/msgs/de.msg
489 %lang(es) %{_datadir}/gitk/lib/msgs/es.msg
490 %lang(it) %{_datadir}/gitk/lib/msgs/it.msg
491 %lang(ru) %{_datadir}/gitk/lib/msgs/ru.msg
492 %lang(sv) %{_datadir}/gitk/lib/msgs/sv.msg
495 %defattr(644,root,root,755)
496 %doc gitweb/{README,INSTALL}
498 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitweb.conf
499 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
500 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
501 %attr(755,root,root) %{cgibindir}/gitweb.cgi
505 %defattr(644,root,root,755)
506 %doc contrib/gitview/gitview.txt
507 %attr(755,root,root) %{_bindir}/gitview
510 %defattr(644,root,root,755)
511 %attr(755,root,root) %{_libdir}/%{name}/git-gui
512 %dir %{_datadir}/git-gui
513 %dir %{_datadir}/git-gui/lib
514 %dir %{_datadir}/git-gui/lib/msgs
515 %{_datadir}/git-gui/lib/git-gui.ico
516 %{_datadir}/git-gui/lib/tclIndex
517 %{_datadir}/git-gui/lib/*.js
518 %{_datadir}/git-gui/lib/*.tcl
519 %lang(de) %{_datadir}/git-gui/lib/msgs/de.msg
520 %lang(fr) %{_datadir}/git-gui/lib/msgs/fr.msg
521 %lang(hu) %{_datadir}/git-gui/lib/msgs/hu.msg
522 %lang(it) %{_datadir}/git-gui/lib/msgs/it.msg
523 %lang(ja) %{_datadir}/git-gui/lib/msgs/ja.msg
524 %lang(nb) %{_datadir}/git-gui/lib/msgs/nb.msg
525 %lang(ru) %{_datadir}/git-gui/lib/msgs/ru.msg
526 %lang(sv) %{_datadir}/git-gui/lib/msgs/sv.msg
527 %lang(zh_cn) %{_datadir}/git-gui/lib/msgs/zh_cn.msg
530 %defattr(644,root,root,755)
531 %attr(755,root,root) %{_libdir}/%{name}/git-svn
533 %{_mandir}/man1/git-svn.1*
537 %defattr(644,root,root,755)
538 %attr(755,root,root) %{_libdir}/%{name}/git-cvs*
540 %{_mandir}/man1/git-cvs*.1*
541 %{_mandir}/man7/gitcvs-migration.7*
544 %files -n bash-completion-git
545 %defattr(644,root,root,755)
546 %{_sysconfdir}/bash_completion.d/*
549 %defattr(644,root,root,755)
550 %{perl_vendorlib}/Git.pm
551 %{_mandir}/man3/Git.3pm*
553 %files -n vim-syntax-gitcommit
554 %defattr(644,root,root,755)
555 %doc contrib/vim/README
556 %{_datadir}/vim/vimfiles/syntax/*