3 %bcond_without tests # don't perform make test
4 %bcond_without doc # skip building/packaging docs/manuals (takes some time)
6 %include /usr/lib/rpm/macros.perl
7 Summary: The stupid content tracker
8 Summary(pl.UTF-8): Prymitywne narzędzie do śledzenia treści
13 Group: Development/Tools
14 Source0: http://www.kernel.org/pub/software/scm/git/git-%{version}.tar.bz2
15 # Source0-md5: d41e3d43c8f1d23024fb3d3fe6aa3858
16 Source1: %{name}-gitweb.conf
17 Source2: %{name}-gitweb-httpd.conf
18 Source3: %{name}.sysconfig
21 URL: http://git-scm.com/
22 BuildRequires: autoconf
23 BuildRequires: automake
24 BuildRequires: curl-devel
25 BuildRequires: docbook-dtd45-xml
26 BuildRequires: expat-devel
27 BuildRequires: gettext-devel
28 BuildRequires: openssl-devel
29 BuildRequires: perl-Error
30 BuildRequires: perl-base
32 BuildRequires: rpm-perlprov >= 4.1-13
33 BuildRequires: rpmbuild(macros) >= 1.264
34 BuildRequires: zlib-devel
36 BuildRequires: asciidoc >= 7.1.2-3
40 # tests failed sometimes when using nserver/cvsnt client so enforce pure cvs here
41 BuildRequires: cvs-gnu-client < 1.13
42 BuildRequires: cvs-gnu-client >= 1.12
43 BuildRequires: pdksh >= 5.2.14-46
49 Requires: openssh-clients
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 # html docs have links to txt files
55 %define _noautocompressdoc *.txt
58 %define webappdir %{_sysconfdir}/webapps/%{webapp}
59 %define appdir %{_datadir}/%{webapp}
60 %define cgibindir %{_prefix}/lib/cgi-bin
63 "git" can mean anything, depending on your mood.
65 - random three-letter combination that is pronounceable, and not
66 actually used by any common UNIX command. The fact that it is a
67 mispronunciation of "get" may or may not be relevant.
68 - stupid. contemptible and despicable. simple. Take your pick from the
70 - "global information tracker": you're in a good mood, and it actually
71 works for you. Angels sing, and a light suddenly fills the room.
72 - "goddamn idiotic truckload of sh*t": when it breaks
74 This is a stupid (but extremely fast) directory content manager. It
75 doesn't do a whole lot, but what it 'does' do is track directory
78 %description -l pl.UTF-8
79 "git" może oznaczać cokolwiek, w zależności od nastroju.
81 - losową kombinację trzech liter, która jest wymawialna i właściwie
82 nie używana przez żadne popularne polecenie uniksowe. Fakt, że jest to
83 błędna pisownia słowa "get" może mieć lub nie mieć znaczenia.
84 - głupi, pogardliwy, prosty. Można wybrać ze słownika slangu.
85 - "global information tracker" (narzędzie do globalnego śledzenia
86 informacji) - jeśli jesteśmy w dobrym nastroju i git akurat działa.
87 Anioły śpiewają, a światło niespodziewanie wypełnia pokój.
88 - "goddamn idiotic truckload of sh*t" (przeklęty idiotyczny ładunek
89 g*) - kiedy się zepsuje.
91 Jest to prymitywny (ale bardzo szybki) zarządca treści słownikowej.
92 Nie robi wiele, ale to, co "robi", to wydajne śledzenie zawartości
96 Summary: Files necessary to run git-daemon as an inetd service
97 Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi inetd
98 Group: Networking/Daemons
99 Requires: %{name} = %{version}-%{release}
100 Requires: setup >= 2.4.11-1
101 Provides: git-core-daemon
102 Obsoletes: git-core-daemon
103 Obsoletes: git-core-daemon-standalone
105 %description daemon-inetd
106 Git-daemon is a really simple TCP git daemon that can serve git
107 repositories. This package provides all necessarry files to run
108 git-daemon as an inetd service.
110 %description daemon-inetd -l pl.UTF-8
111 Git-daemon to prosty demon git korzystający z protokołu TCP do
112 udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
113 do uruchomienia git-demona w trybie usługi inetd.
115 %package daemon-standalone
116 Summary: Files necessary to run git-daemon as a standalone service
117 Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi samodzielnej
118 Group: Networking/Daemons
119 Requires: %{name} = %{version}-%{release}
120 Provides: git-core-daemon
121 Obsoletes: git-core-daemon
122 Obsoletes: git-core-daemon-inetd
124 %description daemon-standalone
125 Git-daemon is a really simple TCP git daemon that can serve git
126 repositories. This package provides all necessarry files to run
127 git-daemon as an standalone service.
129 %description daemon-standalone -l pl.UTF-8
130 Git-daemon to prosty demon git korzystający z protokołu TCP do
131 udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
132 do uruchomienia git-daemona w trybie usługi samodzielnej.
135 Summary: Header files for git-core
136 Summary(pl.UTF-8): Pliki nagłówkowe dla git-core
137 Group: Development/Libraries
140 Header files for git-core.
142 %description devel -l pl.UTF-8
143 Pliki nagłówkowe dla git-core.
146 Summary: Tcl/Tk interface to the Git version control system
147 Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
148 Group: Development/Tools
149 Requires: %{name} = %{version}-%{release}
153 gitk displays changes in a repository or a selected set of commits.
154 This includes visualizing the commit graph, showing information
155 related to each commit, and the files in the trees of each revision.
157 Historically, gitk was the first repository browser. It's written in
158 Tcl/Tk and started off in a separate repository but was later merged
159 into the main git repository.
161 %description gitk -l pl.UTF-8
162 gitk wyświetla zmiany w repozytorium lub wybranym zbiorze commitów.
163 Oznacza to wizualizację grafu commitów, wyświetlanie informacji
164 związanych z każdym z commitów oraz listę plików dla każdej rewizji.
166 Z historycznego punktu widzenia gitk był pierwszą przeglądarką
167 repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
168 osobnym repozytorium, ale z czasem został włączony do głównego
172 Summary: Web frontend to git
173 Summary(pl.UTF-8): Webowy frontend do git
174 Group: Development/Tools
175 Requires: %{name} = %{version}-%{release}
179 This package provides a web interface for browsing git repositories.
181 %description gitweb -l pl.UTF-8
182 Pakiet ten dostarcza interfejs WWW do przeglądania repozytoriów gita.
185 Summary: A GTK+ based repository browser for git
186 Summary(pl.UTF-8): Oparta na GTK+ przeglądarka repozytorium gita
187 Group: Development/Tools
188 Requires: %{name} = %{version}-%{release}
189 Requires: python >= 1:2.4
190 Requires: python-pycairo >= 1.0
191 Requires: python-pygobject
192 Requires: python-pygtk-gtk >= 2:2.8
193 Suggests: python-gnome-desktop-gtksourceview
196 A GTK+ based repository browser for git.
198 %description gitview -l pl.UTF-8
199 Oparta na GTK+ przeglądarka repozytorium gita.
202 Summary: Tcl/Tk interface to the Git version control system
203 Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
204 Group: Development/Tools
205 Requires: %{name} = %{version}-%{release}
209 Displays changes in a repository or a selected set of commits. This
210 includes visualizing the commit graph, showing information related to
211 each commit, and the files in the trees of each revision.
213 Historically, gitk was the first repository browser. It's written in
214 Tcl/Tk and started off in a separate repository but was later merged
215 into the main git repository.
217 %description gui -l pl.UTF-8
218 Wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. Oznacza
219 to wizualizację grafu commitów, wyświetlanie informacji związanych z
220 każdym z commitów oraz listę plików dla każdej rewizji.
222 Z punktu widzenia historii, gitk był pierwszą przeglądarką
223 repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
224 osobnym repozytorium, ale z czasem został włączony do głównego
228 Summary: Subversion support for Git
229 Summary(pl.UTF-8): Obsługa Subversion dla Git
230 Group: Development/Tools
231 Requires: %{name} = %{version}-%{release}
234 Subversion support for Git.
236 %description svn -l pl.UTF-8
237 Obsługa Subversion dla Git.
240 Summary: CVS support for Git
241 Summary(pl.UTF-8): Obsługa CVS dla Git
242 Group: Development/Tools
243 Requires: %{name} = %{version}-%{release}
244 Requires: cvsps >= 2.1-2
250 %description cvs -l pl.UTF-8
253 %package -n bash-completion-git
254 Summary: bash-completion for git
255 Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gita
256 Group: Applications/Shells
257 Requires: bash-completion
259 %description -n bash-completion-git
260 This package provides bash-completion for git.
262 %description -n bash-completion-git -l pl.UTF-8
263 Pakiet ten dostarcza bashowe uzupełnianie nazw dla gita.
266 Summary: Perl interface to the Git version control system
267 Summary(pl.UTF-8): Perlowy interfejs do systemu kontroli wersji Git
268 Group: Development/Languages/Perl
269 Requires: %{name} = %{version}-%{release}
270 Obsoletes: perl-git-core
272 %description -n perl-Git
273 This module provides Perl scripts easy way to interface the Git
274 version control system. The modules have an easy and well-tested way
275 to call arbitrary Git commands; in the future, the interface will also
276 provide specialized methods for doing easily operations which are not
277 totally trivial to do over the generic command interface.
279 %description -n perl-Git -l pl.UTF-8
280 Ten moduł umożliwia skryptom Perla współpracę z systemem kontroli
281 wersji Git. W łatwy i dobrze przetestowany sposób pozwala wywoływać
282 dowolne polecenia Gita; w przyszłości interfejs udostępni także
283 specjalne metody do łatwego wykonywania operacji nietrywialnych do
284 wykonania przy użyciu ogólnego interfejsu poleceń.
286 %package -n vim-syntax-gitcommit
287 Summary: Vim syntax: gitcommit
288 Summary(pl.UTF-8): Składnia dla Vima: gitcommit
289 Group: Applications/Editors/Vim
290 # for _vimdatadir existence
291 Requires: vim-rt >= 4:6.3.058-3
293 %description -n vim-syntax-gitcommit
294 This plugin provides syntax highlighting for git's commit messages.
296 %description -n vim-syntax-gitcommit -l pl.UTF-8
297 Ta wtyczka dostarcza podświetlanie składni dla treści commitów gita.
300 %setup -q -n git-%{version}
310 GITWEB_CONFIG="%{webappdir}/gitweb.conf" \
311 GITWEB_PROJECTROOT="/var/lib/git" \
312 GITWEB_CSS="/gitweb/gitweb.css" \
313 GITWEB_LOGO="/gitweb/git-logo.png" \
314 GITWEB_FAVICON="/gitweb/git-favicon.png"
316 %{?with_doc:%{__make} -C Documentation}
318 %{?with_tests:%{__make} test}
321 rm -rf $RPM_BUILD_ROOT
322 install -d $RPM_BUILD_ROOT{%{_includedir}/%{name}/xdiff,%{_localstatedir}/lib/git}
323 install -d $RPM_BUILD_ROOT{%{appdir},%{cgibindir},%{webappdir}}
324 install -d $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax
325 install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
326 install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d}
330 DESTDIR=$RPM_BUILD_ROOT
333 %{__make} -C Documentation install \
334 DESTDIR=$RPM_BUILD_ROOT
337 # header files and lib
338 install *.h $RPM_BUILD_ROOT%{_includedir}/%{name}
339 install xdiff/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/xdiff
340 install libgit.a $RPM_BUILD_ROOT%{_libdir}
341 install xdiff/lib.a $RPM_BUILD_ROOT%{_libdir}/libgit_xdiff.a
344 install contrib/completion/git-completion.bash $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
347 cat > $RPM_BUILD_ROOT/%{_datadir}/vim/vimfiles/syntax/gitcommit.vim << 'EOF'
348 autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
349 autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig
350 autocmd BufNewFile,BufRead git-rebase-todo setf gitrebase
351 autocmd BufNewFile,BufRead .msg.[0-9]*
352 \ if getline(1) =~ '^From.*# This line is ignored.$' |
353 \ setf gitsendemail |
355 autocmd BufNewFile,BufRead *.git/**
356 \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
362 install gitweb/*.css gitweb/*.png $RPM_BUILD_ROOT%{appdir}
363 install gitweb/gitweb.cgi $RPM_BUILD_ROOT%{cgibindir}
364 install %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}/gitweb.conf
365 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/apache.conf
366 install %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
369 install contrib/gitview/gitview $RPM_BUILD_ROOT%{_bindir}
371 # git-daemon related files
372 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/git-daemon
373 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
374 install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
377 sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
378 sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
380 # remove unneeded files
381 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
382 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Git/.packlist
383 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/Error.pm
384 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/private-Error.3*
387 rm -rf $RPM_BUILD_ROOT
390 %service -q rc-inetd reload
393 if [ "$1" = "0" ]; then
394 %service -q rc-inetd reload
397 %post daemon-standalone
398 /sbin/chkconfig --add git-daemon
399 %service git-daemon restart "git-daemon"
401 %preun daemon-standalone
402 if [ "$1" = "0" ]; then
403 %service git-daemon stop
404 /sbin/chkconfig --del git-daemon
407 %triggerin gitweb -- apache1 < 1.3.37-3, apache1-base
408 %webapp_register apache %{webapp}
410 %triggerun gitweb -- apache1 < 1.3.37-3, apache1-base
411 %webapp_unregister apache %{webapp}
413 %triggerin gitweb -- apache < 2.2.0, apache-base
414 %webapp_register httpd %{webapp}
416 %triggerun gitweb -- apache < 2.2.0, apache-base
417 %webapp_unregister httpd %{webapp}
420 %defattr(644,root,root,755)
423 %doc Documentation/RelNotes*
424 %doc Documentation/*.html Documentation/howto Documentation/technical
425 %{_mandir}/man1/git-*.1*
426 %exclude %{_mandir}/man1/git-svn.1*
427 %exclude %{_mandir}/man1/git-cvs*.1*
428 %{_mandir}/man1/git.1*
429 %{_mandir}/man5/gitattributes.5*
430 %{_mandir}/man5/githooks.5*
431 %{_mandir}/man5/gitignore.5*
432 %{_mandir}/man5/gitmodules.5*
433 %{_mandir}/man5/gitrepository-layout.5*
434 %{_mandir}/man7/gitcli.7*
435 %{_mandir}/man7/gitcore-tutorial.7*
436 %{_mandir}/man7/gitdiffcore.7*
437 %{_mandir}/man7/gitglossary.7*
438 %{_mandir}/man7/gittutorial-2.7*
439 %{_mandir}/man7/gittutorial.7*
440 %{_mandir}/man7/gitworkflows.7*
442 %attr(755,root,root) %{_bindir}/git
443 %attr(755,root,root) %{_bindir}/git-*
444 %dir %{_libdir}/%{name}
445 %attr(755,root,root) %{_libdir}/%{name}/*-*
446 %attr(755,root,root) %{_libdir}/%{name}/git
447 %exclude %{_libdir}/%{name}/git-gui
448 %exclude %{_libdir}/%{name}/git-svn
449 %exclude %{_libdir}/%{name}/git-cvs*
451 %{_localstatedir}/lib/git
454 %defattr(644,root,root,755)
455 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/git-daemon
457 %files daemon-standalone
458 %defattr(644,root,root,755)
459 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/git-daemon
460 %attr(754,root, root) /etc/rc.d/init.d/git-daemon
463 %defattr(644,root,root,755)
464 %{_includedir}/git-core
466 %{_libdir}/libgit_xdiff.a
469 %defattr(644,root,root,755)
471 %{_mandir}/man1/gitk.1*
473 %attr(755,root,root) %{_bindir}/gitk
474 %dir %{_datadir}/gitk
475 %dir %{_datadir}/gitk/lib
476 %dir %{_datadir}/gitk/lib/msgs
477 %lang(de) %{_datadir}/gitk/lib/msgs/de.msg
478 %lang(es) %{_datadir}/gitk/lib/msgs/es.msg
479 %lang(it) %{_datadir}/gitk/lib/msgs/it.msg
480 %lang(ru) %{_datadir}/gitk/lib/msgs/ru.msg
481 %lang(sv) %{_datadir}/gitk/lib/msgs/sv.msg
484 %defattr(644,root,root,755)
485 %doc gitweb/{README,INSTALL}
487 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitweb.conf
488 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
489 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
490 %attr(755,root,root) %{cgibindir}/gitweb.cgi
494 %defattr(644,root,root,755)
495 %doc contrib/gitview/gitview.txt
496 %attr(755,root,root) %{_bindir}/gitview
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_libdir}/%{name}/git-gui
501 %dir %{_datadir}/git-gui
502 %dir %{_datadir}/git-gui/lib
503 %dir %{_datadir}/git-gui/lib/msgs
504 %{_datadir}/git-gui/lib/git-gui.ico
505 %{_datadir}/git-gui/lib/tclIndex
506 %{_datadir}/git-gui/lib/*.js
507 %{_datadir}/git-gui/lib/*.tcl
508 %lang(de) %{_datadir}/git-gui/lib/msgs/de.msg
509 %lang(fr) %{_datadir}/git-gui/lib/msgs/fr.msg
510 %lang(hu) %{_datadir}/git-gui/lib/msgs/hu.msg
511 %lang(it) %{_datadir}/git-gui/lib/msgs/it.msg
512 %lang(ja) %{_datadir}/git-gui/lib/msgs/ja.msg
513 %lang(nb) %{_datadir}/git-gui/lib/msgs/nb.msg
514 %lang(ru) %{_datadir}/git-gui/lib/msgs/ru.msg
515 %lang(sv) %{_datadir}/git-gui/lib/msgs/sv.msg
516 %lang(zh_cn) %{_datadir}/git-gui/lib/msgs/zh_cn.msg
519 %defattr(644,root,root,755)
520 %attr(755,root,root) %{_libdir}/%{name}/git-svn
522 %{_mandir}/man1/git-svn.1*
526 %defattr(644,root,root,755)
527 %attr(755,root,root) %{_libdir}/%{name}/git-cvs*
529 %{_mandir}/man1/git-cvs*.1*
530 %{_mandir}/man7/gitcvs-migration.7*
533 %files -n bash-completion-git
534 %defattr(644,root,root,755)
535 %{_sysconfdir}/bash_completion.d/*
538 %defattr(644,root,root,755)
539 %{perl_vendorlib}/Git.pm
540 %{_mandir}/man3/Git.3pm*
542 %files -n vim-syntax-gitcommit
543 %defattr(644,root,root,755)
544 %doc contrib/vim/README
545 %{_datadir}/vim/vimfiles/syntax/*