]> git.pld-linux.org Git - packages/git-core.git/blame - git-core.spec
up to 2.36.1
[packages/git-core.git] / git-core.spec
CommitLineData
84013e7c 1#
891d0b05 2# Conditional build:
20b80b37
JB
3%bcond_without tests # test suite
4%bcond_with tests_cvs # tests which use CVS
5%bcond_without tests_svn # tests which use subversion
6%bcond_without doc # building/packaging docs/manuals (takes some time)
0643d0ea 7%bcond_without pcre # perl-compatible regexes support
20b80b37
JB
8%bcond_without gnome_keyring # gnome keyring credentials support
9%bcond_without libsecret # libsecret credentials support
10%bcond_without tk # Tcl/Tk interface
cdeb0400 11
7ad420b5
ER
12# for AC: --without doc --without gnome_keyring --without tests
13
479de23d
AM
14Summary: Distributed version control system focused on speed, effectivity and usability
15Summary(pl.UTF-8): Rozproszony system śledzenia treści skupiony na szybkości, wydajności i użyteczności
51c3b977 16Name: git-core
79c7f87f 17Version: 2.36.1
e587e1bb 18Release: 1
51c3b977 19License: GPL v2
20Group: Development/Tools
eee65439 21Source0: https://www.kernel.org/pub/software/scm/git/git-%{version}.tar.xz
79c7f87f 22# Source0-md5: b069d4919c8d9faf28db4fd90feb8e1d
be2ccf99 23Source1: %{name}-gitweb.conf
814a047c 24Source2: %{name}-gitweb-httpd.conf
51ce768a
KK
25Source3: %{name}-gitweb-lighttpd.conf
26Source4: %{name}.sysconfig
27Source5: %{name}.inet
28Source6: %{name}.init
642ee6ff 29Source7: gitolite.pl
0aa13f22
JP
30Patch0: %{name}-key-bindings.patch
31Patch1: %{name}-sysconfdir.patch
32Patch2: cherry-picked-commitlog.patch
e699dd89 33URL: http://git-scm.com/
fdf2ed38 34BuildRequires: autoconf >= 2.59
11856720 35BuildRequires: automake
51c3b977 36BuildRequires: curl-devel
115484e9 37BuildRequires: expat-devel
2ece97c6
ER
38%if "%{pld_release}" == "ac"
39BuildRequires: gettext-devel
40%else
25a92afd 41BuildRequires: gettext-tools
2ece97c6 42%endif
20b80b37
JB
43%if %{with gnome_keyring} || %{with libsecret}
44BuildRequires: glib2-devel >= 2.0
45%endif
cecb5b67
KK
46%if %{with gnome_keyring}
47BuildRequires: libgnome-keyring-devel
20b80b37
JB
48%endif
49%if %{with libsecret}
50BuildRequires: libsecret-devel
cecb5b67 51%endif
51c3b977 52BuildRequires: openssl-devel
d5e39597 53%{?with_pcre:BuildRequires: pcre2-8-devel}
0f1e5795 54BuildRequires: perl-Error > 0.15
561578e1 55BuildRequires: perl-MailTools
51c3b977 56BuildRequires: perl-base
20b80b37
JB
57%if %{with gnome_keyring} || %{with libsecret}
58BuildRequires: pkgconfig
59%endif
b4f8bcbb 60BuildRequires: python3-devel
0a79dbf8 61BuildRequires: rpm-build >= 4.6
89a476f8 62BuildRequires: rpm-perlprov >= 4.1-13
c841a4fc 63BuildRequires: rpm-pythonprov
760a71de 64BuildRequires: rpmbuild(macros) >= 1.752
8754353c 65BuildRequires: tar >= 1:1.22
7d9cd7eb 66%if %{with tk}
1db22c36
JB
67# wish
68BuildRequires: tk
8754353c 69BuildRequires: xz
7d9cd7eb 70%endif
51c3b977 71BuildRequires: zlib-devel
08cc92d7
ER
72%if %{with doc}
73BuildRequires: asciidoc >= 7.1.2-3
c841a4fc 74BuildRequires: docbook-dtd45-xml
08cc92d7
ER
75BuildRequires: xmlto
76%endif
2c50f007 77%if %{with tests}
e460872a
JB
78BuildRequires: perl-CGI
79BuildRequires: perl-Digest-MD5
80BuildRequires: perl-Encode
81BuildRequires: perl-Time-HiRes
db032591 82%if %{with tests_cvs}
dfed7e92 83# tests failed sometimes when using nserver/cvsnt client so enforce pure cvs here
3554b1a3 84BuildRequires: cvs-gnu-client < 1.13
2c0376c9 85BuildRequires: cvs-gnu-client >= 1.12
db032591 86%endif
ef4eeb6d
KK
87%if %{with tests_svn}
88BuildRequires: perl-subversion
89BuildRequires: subversion
90%endif
1b3085ff 91Conflicts: pdksh < 5.2.14-46
2c50f007 92%endif
23c8c456 93# git-sh-setup: sane_grep
3f245fc5 94Requires: grep
23c8c456
ER
95# git-pull: printf
96Requires: coreutils
3f245fc5 97Requires: sed
0d2db069 98Suggests: git-core-bzr
26361b03 99Suggests: git-core-cvs
0d2db069
ER
100Suggests: git-core-hg
101Suggests: git-core-p4
26361b03 102Suggests: git-core-svn
d82521ea 103Suggests: less
9e9faf95 104Suggests: openssh-clients
e7120917 105Suggests: perl-Git = %{version}-%{release}
d82521ea 106Suggests: rsync
6769cb97
JB
107Obsoletes: git-core-gitview < 2.12.1
108Obsoletes: python-Git < 1.8.5
f4018182 109Conflicts: perl-Git < %{version}
51c3b977 110BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
111
19936745
AM
112# html docs have links to txt files
113%define _noautocompressdoc *.txt
114
e7120917 115# do not generate perl dependency, git add -p support is optional
27399cc4
ER
116# skip dependency generation from templates
117%define _noautoreqfiles %{_libexecdir}/%{name}/git-add--interactive %{_datadir}/%{name}/templates
e7120917 118
be2ccf99
AG
119%define webapp gitweb
120%define webappdir %{_sysconfdir}/webapps/%{webapp}
121%define appdir %{_datadir}/%{webapp}
122%define cgibindir %{_prefix}/lib/cgi-bin
ee14b8db 123%define gitcoredir %{_libexecdir}/%{name}
be2ccf99 124
51c3b977 125%description
126"git" can mean anything, depending on your mood.
127
d52424f5 128- random three-letter combination that is pronounceable, and not
129 actually used by any common UNIX command. The fact that it is a
130 mispronunciation of "get" may or may not be relevant.
131- stupid. contemptible and despicable. simple. Take your pick from the
132 dictionary of slang.
133- "global information tracker": you're in a good mood, and it actually
134 works for you. Angels sing, and a light suddenly fills the room.
135- "goddamn idiotic truckload of sh*t": when it breaks
51c3b977 136
c751087d 137This is a stupid (but extremely fast) directory content manager. It
51c3b977 138doesn't do a whole lot, but what it 'does' do is track directory
139contents efficiently.
140
ea061c99
JR
141%description -l pl.UTF-8
142"git" może oznaczać cokolwiek, w zależności od nastroju.
143
d52424f5 144- losową kombinację trzech liter, która jest wymawialna i właściwie
145 nie używana przez żadne popularne polecenie uniksowe. Fakt, że jest to
146 błędna pisownia słowa "get" może mieć lub nie mieć znaczenia.
147- głupi, pogardliwy, prosty. Można wybrać ze słownika slangu.
148- "global information tracker" (narzędzie do globalnego śledzenia
149 informacji) - jeśli jesteśmy w dobrym nastroju i git akurat działa.
150 Anioły śpiewają, a światło niespodziewanie wypełnia pokój.
151- "goddamn idiotic truckload of sh*t" (przeklęty idiotyczny ładunek
152 g*) - kiedy się zepsuje.
ea061c99
JR
153
154Jest to prymitywny (ale bardzo szybki) zarządca treści słownikowej.
155Nie robi wiele, ale to, co "robi", to wydajne śledzenie zawartości
c751087d
JB
156katalogu.
157
a8655d02
ER
158%package doc
159Summary: Documentation for git-core
160Summary(pl.UTF-8): Dokumentacja do git-core
161Group: Documentation
f0d8046b 162BuildArch: noarch
a8655d02
ER
163
164%description doc
165Documentation for git-core.
166
167%description doc -l pl.UTF-8
168Dokumentacja do git-core.
169
b11ada2c
AG
170%package daemon-inetd
171Summary: Files necessary to run git-daemon as an inetd service
5db07614 172Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi inetd
b11ada2c
AG
173Group: Networking/Daemons
174Requires: %{name} = %{version}-%{release}
175Requires: setup >= 2.4.11-1
176Provides: git-core-daemon
177Obsoletes: git-core-daemon
178Obsoletes: git-core-daemon-standalone
179
180%description daemon-inetd
181Git-daemon is a really simple TCP git daemon that can serve git
182repositories. This package provides all necessarry files to run
183git-daemon as an inetd service.
184
185%description daemon-inetd -l pl.UTF-8
5db07614
JB
186Git-daemon to prosty demon git korzystający z protokołu TCP do
187udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
188do uruchomienia git-demona w trybie usługi inetd.
b11ada2c
AG
189
190%package daemon-standalone
191Summary: Files necessary to run git-daemon as a standalone service
5db07614 192Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi samodzielnej
b11ada2c
AG
193Group: Networking/Daemons
194Requires: %{name} = %{version}-%{release}
195Provides: git-core-daemon
196Obsoletes: git-core-daemon
197Obsoletes: git-core-daemon-inetd
198
199%description daemon-standalone
200Git-daemon is a really simple TCP git daemon that can serve git
201repositories. This package provides all necessarry files to run
202git-daemon as an standalone service.
203
204%description daemon-standalone -l pl.UTF-8
5db07614
JB
205Git-daemon to prosty demon git korzystający z protokołu TCP do
206udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
207do uruchomienia git-daemona w trybie usługi samodzielnej.
b11ada2c 208
e3cefa79 209%package devel
8bed7625
JB
210Summary: Git library with header files
211Summary(pl.UTF-8): Biblioteka Gita oraz pliki nagłówkowe
66a7f095 212Group: Development/Libraries
d52424f5 213Requires: zlib-devel
e3cefa79 214
215%description devel
8bed7625 216Git library with header files.
66a7f095 217
ea061c99 218%description devel -l pl.UTF-8
8bed7625 219Biblioteka Gita oraz pliki nagłówkowe.
e3cefa79 220
91396e2e
AG
221%package gitk
222Summary: Tcl/Tk interface to the Git version control system
223Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
224Group: Development/Tools
225Requires: %{name} = %{version}-%{release}
226Requires: tk
f0d8046b 227BuildArch: noarch
91396e2e
AG
228
229%description gitk
1fcd08a6
JB
230gitk displays changes in a repository or a selected set of commits.
231This includes visualizing the commit graph, showing information
232related to each commit, and the files in the trees of each revision.
91396e2e
AG
233
234Historically, gitk was the first repository browser. It's written in
04fdf912 235Tcl/Tk and started off in a separate repository but was later merged
91396e2e
AG
236into the main git repository.
237
238%description gitk -l pl.UTF-8
1fcd08a6
JB
239gitk wyświetla zmiany w repozytorium lub wybranym zbiorze commitów.
240Oznacza to wizualizację grafu commitów, wyświetlanie informacji
241związanych z każdym z commitów oraz listę plików dla każdej rewizji.
91396e2e 242
1fcd08a6 243Z historycznego punktu widzenia gitk był pierwszą przeglądarką
02059138
ER
244repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
245osobnym repozytorium, ale z czasem został włączony do głównego
2712fe7b 246repozytorium gita.
91396e2e 247
be2ccf99
AG
248%package gitweb
249Summary: Web frontend to git
41b5f4b1 250Summary(pl.UTF-8): Frontend WWW do gita
be2ccf99
AG
251Group: Development/Tools
252Requires: %{name} = %{version}-%{release}
253Requires: webapps
666cda7c 254Requires: webserver(access)
51ce768a
KK
255Requires: webserver(alias)
256Requires: webserver(cgi)
93a30d5e 257Suggests: webserver(setenv)
be2ccf99
AG
258
259%description gitweb
260This package provides a web interface for browsing git repositories.
261
262%description gitweb -l pl.UTF-8
2712fe7b 263Pakiet ten dostarcza interfejs WWW do przeglądania repozytoriów gita.
be2ccf99 264
f9871074
AG
265%package gui
266Summary: Tcl/Tk interface to the Git version control system
267Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
268Group: Development/Tools
269Requires: %{name} = %{version}-%{release}
270Requires: tk
d4106757 271Requires: xdg-utils
531b434f 272Suggests: meld
f9871074
AG
273
274%description gui
275Displays changes in a repository or a selected set of commits. This
276includes visualizing the commit graph, showing information related to
277each commit, and the files in the trees of each revision.
278
279Historically, gitk was the first repository browser. It's written in
280Tcl/Tk and started off in a separate repository but was later merged
281into the main git repository.
282
283%description gui -l pl.UTF-8
284Wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. Oznacza
285to wizualizację grafu commitów, wyświetlanie informacji związanych z
286każdym z commitów oraz listę plików dla każdej rewizji.
287
288Z punktu widzenia historii, gitk był pierwszą przeglądarką
289repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
290osobnym repozytorium, ale z czasem został włączony do głównego
291repozytorium gita.
292
e5fa8af5
JB
293%package arch
294Summary: Git tools for importing Arch repositories
295Summary(pl.UTF-8): Narzędzia Gita do importowania repozytoriów Archa
296Group: Development/Tools
297Requires: %{name} = %{version}-%{release}
298Requires: tla
299
300%description arch
301Git tools for importing Arch repositories.
302
303%description arch -l pl.UTF-8
304Narzędzia Gita do importowania repozytoriów Archa.
305
0d2db069
ER
306%package bzr
307Summary: Git tools for working with bzr repositories
e5fa8af5 308Summary(pl.UTF-8): Narzędzia Gita do pracy z repozytoriami bzr
0d2db069
ER
309Group: Development/Tools
310Requires: %{name} = %{version}-%{release}
311Requires: bzr
312
313%description bzr
314Git tools for working with bzr repositories.
315
e5fa8af5
JB
316%description bzr -l pl.UTF-8
317Narzędzia Gita do pracy z repozytoriami bzr.
318
319%package cvs
320Summary: CVS support for Git
321Summary(pl.UTF-8): Obsługa CVS dla Gita
322Group: Development/Tools
323Requires: %{name} = %{version}-%{release}
324Requires: cvsps >= 2.1-2
325Requires: rcs
326
327%description cvs
328CVS support for Git.
329
330%description cvs -l pl.UTF-8
331Obsługa CVS dla Gita.
332
0d2db069
ER
333%package hg
334Summary: Git tools for working with mercurial repositories
e5fa8af5 335Summary(pl.UTF-8): Narzędzia Gita do pracy z repozytoriami mercuriala
0d2db069
ER
336Group: Development/Tools
337Requires: %{name} = %{version}-%{release}
338Requires: mercurial >= 1.8
339
340%description hg
341Git tools for working with mercurial repositories.
342
e5fa8af5
JB
343%description hg -l pl.UTF-8
344Narzędzia Gita do pracy z repozytoriami mercuriala.
345
0d2db069
ER
346%package p4
347Summary: Git tools for working with Perforce depots
e5fa8af5 348Summary(pl.UTF-8): Narzędzia Gita do pracy z magazynami Perforce'a
0d2db069
ER
349Group: Development/Tools
350Requires: %{name} = %{version}-%{release}
351
352%description p4
353Git tools for working with Perforce depots.
354
e5fa8af5
JB
355%description p4 -l pl.UTF-8
356Narzędzia Gita do pracy z magazynami Perforce'a.
357
2c0376c9
AM
358%package svn
359Summary: Subversion support for Git
41b5f4b1 360Summary(pl.UTF-8): Obsługa Subversion dla Gita
2c0376c9
AM
361Group: Development/Tools
362Requires: %{name} = %{version}-%{release}
daccfb39 363Requires: perl-Encode
4ea37765 364Requires: perl-Term-ReadKey
2c0376c9
AM
365
366%description svn
367Subversion support for Git.
368
369%description svn -l pl.UTF-8
41b5f4b1 370Obsługa Subversion dla Gita.
2c0376c9 371
d82521ea
ER
372%package email
373Summary: Git tools for sending email
41b5f4b1 374Summary(pl.UTF-8): Narzędzia Gita do wysyłania poczty
d82521ea
ER
375Group: Development/Tools
376Requires: %{name} = %{version}-%{release}
561578e1
JP
377Requires: perl-Error
378Requires: perl-MailTools
77b23c69 379Suggests: perl-Net-SMTP-SSL
d82521ea
ER
380
381%description email
382Git tools for sending email.
383
41b5f4b1
JB
384%description email -l pl.UTF-8
385Narzędzia Gita do wysyłania poczty.
386
f2c1983d
AG
387%package -n bash-completion-git
388Summary: bash-completion for git
2712fe7b 389Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gita
02059138 390Group: Applications/Shells
cdeb0400 391Requires: %{name} = %{version}-%{release}
3102984c 392Requires: bash-completion >= 2.0
f0d8046b 393BuildArch: noarch
f2c1983d
AG
394
395%description -n bash-completion-git
396This package provides bash-completion for git.
397
398%description -n bash-completion-git -l pl.UTF-8
5383e3af 399Pakiet ten dostarcza bashowe uzupełnianie nazw dla gita.
f2c1983d 400
3dc01deb 401%package -n perl-Git
5d7220ad 402Summary: Perl interface to the Git version control system
3f8032f4 403Summary(pl.UTF-8): Perlowy interfejs do systemu kontroli wersji Git
5d7220ad 404Group: Development/Languages/Perl
6f4be518 405Requires: perl-Error
6769cb97 406Obsoletes: perl-git-core < 1.4.3.5
f0d8046b 407BuildArch: noarch
5d7220ad 408
3dc01deb 409%description -n perl-Git
5d7220ad
AM
410This module provides Perl scripts easy way to interface the Git
411version control system. The modules have an easy and well-tested way
412to call arbitrary Git commands; in the future, the interface will also
413provide specialized methods for doing easily operations which are not
414totally trivial to do over the generic command interface.
415
ea061c99
JR
416%description -n perl-Git -l pl.UTF-8
417Ten moduł umożliwia skryptom Perla współpracę z systemem kontroli
08cc92d7
ER
418wersji Git. W łatwy i dobrze przetestowany sposób pozwala wywoływać
419dowolne polecenia Gita; w przyszłości interfejs udostępni także
420specjalne metody do łatwego wykonywania operacji nietrywialnych do
421wykonania przy użyciu ogólnego interfejsu poleceń.
7eef96e1 422
0643d0ea
ER
423%package -n gnome-keyring-git-core
424Summary: GNOME Keyring authentication provider for Git
20b80b37 425Summary(pl.UTF-8): Moduł uwierzytelniający GNOME Keyring dla Gita
0643d0ea 426Group: X11/Applications
25c1ae0c 427URL: http://git-scm.com/docs/gitcredentials.html
0643d0ea
ER
428Requires: %{name} = %{version}-%{release}
429
430%description -n gnome-keyring-git-core
431Authentication provider module for Git which allows git client to
432authenticate using GNOME Keyring.
433
25c1ae0c 434You need to register it with:
a4e33b57 435- git config --global credential.helper gnome-keyring
25c1ae0c 436
0643d0ea 437%description -n gnome-keyring-git-core -l pl.UTF-8
20b80b37 438Moduł uwierzytelniający dla Gita pozwalający klientom git
0643d0ea
ER
439uwierzytelniać się przy użyciu mechanizmu GNOME Keyring.
440
50e442d4 441Moduł trzeba zarejestrować poleceniem:
a4e33b57 442- git config --global credential.helper gnome-keyring
50e442d4 443
20b80b37
JB
444%package credential-libsecret
445Summary: GNOME authentication provider for Git using libsecret
446Summary(pl.UTF-8): Moduł uwierzytelniający GNOME dla Gita wykorzystujący libsecret
447Group: X11/Applications
448URL: http://git-scm.com/docs/gitcredentials.html
449Requires: %{name} = %{version}-%{release}
450
451%description credential-libsecret
452Authentication provider module for Git which allows git client to
453authenticate using GNOME libsecret.
454
455You need to register it with:
456- git config --global credential.helper libsecret
457
458%description credential-libsecret -l pl.UTF-8
459Moduł uwierzytelniający dla Gita pozwalający klientom git
460uwierzytelniać się przy użyciu mechanizmu GNOME libsecret.
461
462Moduł trzeba zarejestrować poleceniem:
463- git config --global credential.helper libsecret
464
d500b766
JP
465%package -n zsh-completion-git
466Summary: Zsh completion for git command
467Summary(pl.UTF-8): Dopełnianie parametrów komendy git dla powłoki zsh
468Group: Applications/Shells
469Requires: %{name} = %{version}-%{release}
470Requires: bash-completion-git = %{version}-%{release}
471Requires: zsh
472BuildArch: noarch
473
474%description -n zsh-completion-git
475Zsh completion for git command.
476
477%description -n zsh-completion-git -l pl.UTF-8
478Dopełnianie parametrów komendy git dla powłoki zsh.
479
51c3b977 480%prep
5013f7fc 481%setup -q -n git-%{version}
0aa13f22
JP
482%patch0 -p0
483%patch1 -p1
d12d8532 484%patch2 -p1
a1036d06 485
797bc583 486%{__rm} {Documentation/technical,contrib/credential/gnome-keyring}/.gitignore
0643d0ea 487
ab67970b
AM
488# we build things in contrib but want to have it clean for doc purporses, too
489cp -a contrib contrib-doc
490
a1036d06 491%build
11856720
AM
492%{__aclocal}
493%{__autoconf}
494%configure \
d12d8532 495 --sysconfdir=%{_sysconfdir}/git-core \
d5e39597 496 %{?with_pcre:--with-libpcre2} \
b4f8bcbb
JP
497 --with-openssl \
498 --with-python="%{__python3}"
51c3b977 499
7cfee1ba
KK
500echo "BLK_SHA1=1" >> config.mak
501
b69112f7 502%{__make} \
be2ccf99
AG
503 GITWEB_CONFIG="%{webappdir}/gitweb.conf" \
504 GITWEB_PROJECTROOT="/var/lib/git" \
505 GITWEB_CSS="/gitweb/gitweb.css" \
506 GITWEB_LOGO="/gitweb/git-logo.png" \
f74aede9 507 GITWEB_FAVICON="/gitweb/git-favicon.png" \
6fa8665e
JP
508 NO_PERL_CPAN_FALLBACKS=1 \
509 perllibdir=%{perl_vendorlib} \
f74aede9 510 V=1
27b79a12 511
d1d05a7a
ER
512%{__make} -C contrib/subtree
513
0643d0ea 514%if %{with gnome_keyring}
20b80b37
JB
515%{__make} -C contrib/credential/gnome-keyring \
516 CC="%{__cc}" \
517 CFLAGS="%{rpmcflags} -Wall" \
518 LDFLAGS="%{rpmldflags}"
519%endif
520
521%if %{with libsecret}
522%{__make} -C contrib/credential/libsecret \
523 CC="%{__cc}" \
524 CFLAGS="%{rpmcflags} -Wall" \
525 LDFLAGS="%{rpmldflags}"
0643d0ea
ER
526%endif
527
83b9a8cd 528%if %{with doc}
6fa8665e 529%{__make} doc \
83b9a8cd
ER
530 MAN_BASE_URL=file://%{_docdir}/%{name}-doc-%{version}/ \
531 V=1
532%endif
7fdeb28c 533
db032591
AM
534%if %{with tests}
535%if %{without tests_cvs}
8bed7625 536%{__rm} t/t*cvs*.sh || :
db032591 537%endif
13b76b20
JP
538%if %{without tests_svn}
539GIT_SKIP_TESTS="$GIT_SKIP_TESTS t91??"
540%endif
541export GIT_SKIP_TESTS
017b037c
JB
542%{__make} test \
543 NO_PERL_CPAN_FALLBACKS=1
db032591 544%endif
6c0d6e05 545
51c3b977 546%install
547rm -rf $RPM_BUILD_ROOT
6fa8665e 548install -d $RPM_BUILD_ROOT{%{_includedir}/%{name}/xdiff,%{_libdir},%{_localstatedir}/lib/git}
be2ccf99 549install -d $RPM_BUILD_ROOT{%{appdir},%{cgibindir},%{webappdir}}
5db07614 550install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d}
cdeb0400 551install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
d12d8532
KK
552cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/git-core/gitconfig
553[init]
cdeb0400 554 templatedir = %{_sysconfdir}/%{name}/templates
d12d8532 555EOF
c751087d 556
51c3b977 557%{__make} install \
6fa8665e
JP
558 DESTDIR=$RPM_BUILD_ROOT \
559 NO_PERL_CPAN_FALLBACKS=1 \
560 perllibdir=%{perl_vendorlib}
51c3b977 561
08cc92d7 562%if %{with doc}
6fa8665e 563%{__make} install-doc \
7fdeb28c 564 DESTDIR=$RPM_BUILD_ROOT
08cc92d7 565%endif
7fdeb28c 566
d12d8532
KK
567# copy templates except sample hooks
568cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/templates $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
569%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/templates/hooks/*.sample
570
1f25da6d 571# header files and lib
cdeb0400 572cp -p *.h $RPM_BUILD_ROOT%{_includedir}/%{name}
31b26a50 573cp -a compat $RPM_BUILD_ROOT%{_includedir}/%{name}
cdeb0400 574cp -p xdiff/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/xdiff
95341e74
KK
575install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/block-sha1
576cp -p block-sha1/sha1.h $RPM_BUILD_ROOT%{_includedir}/%{name}/block-sha1
cdeb0400
ER
577cp -p libgit.a $RPM_BUILD_ROOT%{_libdir}
578cp -p xdiff/lib.a $RPM_BUILD_ROOT%{_libdir}/libgit_xdiff.a
95341e74 579cp -p {Makefile,config.mak,config.mak.autogen,config.mak.uname} $RPM_BUILD_ROOT%{_includedir}/%{name}
e3cefa79 580
d1d05a7a 581%{__make} -C contrib/subtree install \
348dee00 582 libexecdir=%{gitcoredir} \
d1d05a7a
ER
583 DESTDIR=$RPM_BUILD_ROOT
584
585%if %{with doc}
e6bf5c7d 586%{__make} -C contrib/subtree install-man \
d1d05a7a
ER
587 DESTDIR=$RPM_BUILD_ROOT
588%endif
589
0643d0ea 590%if %{with gnome_keyring}
348dee00 591install -p contrib/credential/gnome-keyring/git-credential-gnome-keyring $RPM_BUILD_ROOT%{gitcoredir}
0643d0ea
ER
592%endif
593
20b80b37
JB
594%if %{with libsecret}
595install -p contrib/credential/libsecret/git-credential-libsecret $RPM_BUILD_ROOT%{gitcoredir}
596%endif
597
f2c1983d 598# bash completion
3102984c
ER
599install -d $RPM_BUILD_ROOT%{bash_compdir}
600cp -p contrib/completion/git-completion.bash $RPM_BUILD_ROOT%{bash_compdir}/git
d500b766
JP
601install -d $RPM_BUILD_ROOT%{zsh_compdir}
602cp -p contrib/completion/git-completion.zsh $RPM_BUILD_ROOT%{zsh_compdir}/_git
603sed -i -e "1 a zstyle ':completion:*:*:git:*' script %{bash_compdir}/git" $RPM_BUILD_ROOT%{zsh_compdir}/_git
f2c1983d 604
b0d443ea
ER
605# Install git-prompt.sh
606install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/contrib/completion
607cp -p contrib/completion/git-prompt.sh $RPM_BUILD_ROOT%{_datadir}/%{name}/contrib/completion
608
0d2db069 609# Install bzr and hg remote helpers from contrib
348dee00 610install -p contrib/remote-helpers/git-remote-{bzr,hg} $RPM_BUILD_ROOT%{gitcoredir}
0d2db069 611
be2ccf99 612# gitweb
20b80b37 613%{__mv} $RPM_BUILD_ROOT{%{appdir},%{cgibindir}}/gitweb.cgi
93a30d5e 614ln -s %{cgibindir}/gitweb.cgi $RPM_BUILD_ROOT%{appdir}/gitweb.cgi
cdeb0400 615cp -p %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}/gitweb.conf
642ee6ff 616cp -p %{SOURCE7} $RPM_BUILD_ROOT%{webappdir}/gitolite.pl
cdeb0400 617cp -p %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/apache.conf
814a047c 618cp -p %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/httpd.conf
cdeb0400 619cp -p %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/lighttpd.conf
be2ccf99 620
b11ada2c 621# git-daemon related files
e43aceaa
ER
622cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/git-daemon
623cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
51ce768a 624install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
b11ada2c 625
bf7a9a54 626# paths cleanup
6743dd7e
ER
627sed -e 's,@libdir@/git-core,%{gitcoredir},g' -i $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon
628sed -e 's,@libdir@/git-core,%{gitcoredir},g' -i $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon
bf7a9a54 629
698b79f9
ER
630# same file, link
631ln -sf git $RPM_BUILD_ROOT%{_bindir}/git-receive-pack
632ln -sf git $RPM_BUILD_ROOT%{_bindir}/git-upload-archive
6aec1d92
ER
633ln -sf ../..%{gitcoredir}/git-shell $RPM_BUILD_ROOT%{_bindir}/git-shell
634ln -sf ../..%{gitcoredir}/git-upload-pack $RPM_BUILD_ROOT%{_bindir}/git-upload-pack
635ln -sf ../..%{gitcoredir}/git $RPM_BUILD_ROOT%{_bindir}/git
698b79f9
ER
636
637# convert all hardlinks to symlinks, as rpm fails to calculate it properly
638# requiring excessive free space when it may not be available
639# https://bugs.launchpad.net/pld-linux/+bug/1176337
640find $RPM_BUILD_ROOT%{gitcoredir} -samefile $RPM_BUILD_ROOT%{gitcoredir}/git > files
641for f in $(cat files); do
642 f=${f#$RPM_BUILD_ROOT%{gitcoredir}/}
643 test $f = git && continue
644 ln -snf git $RPM_BUILD_ROOT%{gitcoredir}/$f
645done
646
647# few others
648ln -snf git-gui $RPM_BUILD_ROOT%{gitcoredir}/git-citool
649ln -snf git-remote-http $RPM_BUILD_ROOT%{gitcoredir}/git-remote-https
650ln -snf git-remote-http $RPM_BUILD_ROOT%{gitcoredir}/git-remote-ftp
651ln -snf git-remote-http $RPM_BUILD_ROOT%{gitcoredir}/git-remote-ftps
4e9fd7a9 652
20b80b37 653%{__mv} $RPM_BUILD_ROOT%{_localedir}/pt{_PT,}
fdf2ed38
JB
654%find_lang git
655
51c3b977 656%clean
657rm -rf $RPM_BUILD_ROOT
658
21f26c1e
JP
659%post
660if [ ! -f /etc/shells ]; then
661 echo "%{_bindir}/git-shell" >> /etc/shells
662else
663 grep -q '^%{_bindir}/git-shell$' /etc/shells || echo "%{_bindir}/git-shell" >> /etc/shells
664fi
665
666%preun
667if [ "$1" = "0" ]; then
668 umask 022
669 grep -v '^%{_bindir}/git-shell$' /etc/shells > /etc/shells.new
670 mv -f /etc/shells.new /etc/shells
671fi
672
b11ada2c
AG
673%post daemon-inetd
674%service -q rc-inetd reload
675
676%postun daemon-inetd
677if [ "$1" = "0" ]; then
678 %service -q rc-inetd reload
679fi
680
681%post daemon-standalone
682/sbin/chkconfig --add git-daemon
683%service git-daemon restart "git-daemon"
684
685%preun daemon-standalone
686if [ "$1" = "0" ]; then
687 %service git-daemon stop
688 /sbin/chkconfig --del git-daemon
689fi
690
be2ccf99
AG
691%triggerin gitweb -- apache1 < 1.3.37-3, apache1-base
692%webapp_register apache %{webapp}
693
694%triggerun gitweb -- apache1 < 1.3.37-3, apache1-base
695%webapp_unregister apache %{webapp}
696
814a047c 697%triggerin gitweb -- apache < 2.2.0, apache-base
be2ccf99
AG
698%webapp_register httpd %{webapp}
699
814a047c 700%triggerun gitweb -- apache < 2.2.0, apache-base
be2ccf99
AG
701%webapp_unregister httpd %{webapp}
702
51ce768a
KK
703%triggerin gitweb -- lighttpd
704%webapp_register lighttpd %{webapp}
705
706%triggerun gitweb -- lighttpd
707%webapp_unregister lighttpd %{webapp}
708
fdf2ed38 709%files -f git.lang
51c3b977 710%defattr(644,root,root,755)
a824ba4f 711%doc README.md contrib-doc
a8655d02 712%attr(755,root,root) %{_bindir}/git
44ee5525
ER
713%attr(755,root,root) %{_bindir}/git-receive-pack
714%attr(755,root,root) %{_bindir}/git-shell
715%attr(755,root,root) %{_bindir}/git-upload-archive
716%attr(755,root,root) %{_bindir}/git-upload-pack
cdeb0400 717%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}
a8655d02 718
08cc92d7 719%if %{with doc}
0afd37aa 720%{_mandir}/man1/git-*.1*
dbde9893 721%exclude %{_mandir}/man1/git-archimport.1*
2c0376c9
AM
722%exclude %{_mandir}/man1/git-svn.1*
723%exclude %{_mandir}/man1/git-cvs*.1*
cfe5bf90
JB
724%exclude %{_mandir}/man1/git-imap-send.1*
725%exclude %{_mandir}/man1/git-p4.1*
726%exclude %{_mandir}/man1/git-send-email.1*
a48d28b8 727%{_mandir}/man1/git.1*
0afd37aa 728%{_mandir}/man5/gitattributes.5*
a48d28b8 729%{_mandir}/man5/githooks.5*
0afd37aa 730%{_mandir}/man5/gitignore.5*
eee65439 731%{_mandir}/man5/gitmailmap.5*
785b167d 732%{_mandir}/man5/gitmodules.5*
a48d28b8
AG
733%{_mandir}/man5/gitrepository-layout.5*
734%{_mandir}/man7/gitcli.7*
735%{_mandir}/man7/gitcore-tutorial.7*
fdf2ed38 736%{_mandir}/man7/gitcredentials.7*
a48d28b8 737%{_mandir}/man7/gitdiffcore.7*
ab67970b 738%{_mandir}/man7/giteveryday.7*
f07f1df6 739%{_mandir}/man7/gitfaq.7*
a48d28b8 740%{_mandir}/man7/gitglossary.7*
60b58680 741%{_mandir}/man7/gitnamespaces.7*
dab2f9ca 742%{_mandir}/man7/gitremote-helpers.7*
f16e8911 743%{_mandir}/man7/gitrevisions.7*
d5e39597 744%{_mandir}/man7/gitsubmodules.7*
a48d28b8
AG
745%{_mandir}/man7/gittutorial-2.7*
746%{_mandir}/man7/gittutorial.7*
670fe4d6 747%{_mandir}/man7/gitworkflows.7*
08cc92d7 748%endif
a8655d02 749
348dee00
ER
750%dir %{gitcoredir}
751%attr(755,root,root) %{gitcoredir}/*-*
752%attr(755,root,root) %{gitcoredir}/git
753%dir %{gitcoredir}/mergetools
754%{gitcoredir}/mergetools/*
a8655d02 755
0d2db069
ER
756%{_datadir}/%{name}
757%{_localstatedir}/lib/git
758
759# subpackages
348dee00
ER
760%exclude %{gitcoredir}/*email*
761%exclude %{gitcoredir}/*p4*
762%exclude %{gitcoredir}/git-archimport
6fbf4942 763%exclude %{gitcoredir}/git-citool
348dee00
ER
764%exclude %{gitcoredir}/git-cvs*
765%exclude %{gitcoredir}/git-gui
766%exclude %{gitcoredir}/git-imap-send
767%exclude %{gitcoredir}/git-instaweb
768%exclude %{gitcoredir}/git-remote-bzr
769%exclude %{gitcoredir}/git-remote-hg
348dee00
ER
770%exclude %{gitcoredir}/git-svn
771%exclude %{gitcoredir}/mergetools/p4merge
f295f80f 772%if %{with gnome_keyring}
348dee00 773%exclude %{gitcoredir}/git-credential-gnome-keyring
f295f80f 774%endif
20b80b37
JB
775%if %{with libsecret}
776%exclude %{gitcoredir}/git-credential-libsecret
777%endif
e3cefa79 778
a8655d02
ER
779%if %{with doc}
780%files doc
778b89a7 781%defattr(644,root,root,755)
a8655d02
ER
782%doc Documentation/RelNotes*
783%doc Documentation/*.html Documentation/howto Documentation/technical
784%endif
785
b11ada2c
AG
786%files daemon-inetd
787%defattr(644,root,root,755)
788%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/git-daemon
789
790%files daemon-standalone
791%defattr(644,root,root,755)
792%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/git-daemon
793%attr(754,root, root) /etc/rc.d/init.d/git-daemon
794
e3cefa79 795%files devel
3ff86e9e 796%defattr(644,root,root,755)
cdeb0400 797%{_includedir}/%{name}
5db07614 798%{_libdir}/libgit.a
eaf5c40c 799%{_libdir}/libgit_xdiff.a
5d7220ad 800
7d9cd7eb 801%if %{with tk}
91396e2e
AG
802%files gitk
803%defattr(644,root,root,755)
08cc92d7 804%if %{with doc}
91396e2e 805%{_mandir}/man1/gitk.1*
08cc92d7
ER
806%endif
807%attr(755,root,root) %{_bindir}/gitk
9fa88d97
AM
808%dir %{_datadir}/gitk
809%dir %{_datadir}/gitk/lib
810%dir %{_datadir}/gitk/lib/msgs
5d132744 811%lang(bg) %{_datadir}/gitk/lib/msgs/bg.msg
6cc57eea 812%lang(ca) %{_datadir}/gitk/lib/msgs/ca.msg
3b243bbe 813%lang(de) %{_datadir}/gitk/lib/msgs/de.msg
f9871074 814%lang(es) %{_datadir}/gitk/lib/msgs/es.msg
778b89a7
AM
815%lang(fr) %{_datadir}/gitk/lib/msgs/fr.msg
816%lang(hu) %{_datadir}/gitk/lib/msgs/hu.msg
3b243bbe 817%lang(it) %{_datadir}/gitk/lib/msgs/it.msg
469258c9 818%lang(ja) %{_datadir}/gitk/lib/msgs/ja.msg
3ed82b68 819%lang(pt_BR) %{_datadir}/gitk/lib/msgs/pt_br.msg
22105a2f 820%lang(pt_PT) %{_datadir}/gitk/lib/msgs/pt_pt.msg
95998f97 821%lang(ru) %{_datadir}/gitk/lib/msgs/ru.msg
f9871074 822%lang(sv) %{_datadir}/gitk/lib/msgs/sv.msg
1adc1f85 823%lang(vi) %{_datadir}/gitk/lib/msgs/vi.msg
6a0ecca2 824%lang(zh_CN) %{_datadir}/gitk/lib/msgs/zh_cn.msg
7d9cd7eb 825%endif
91396e2e 826
be2ccf99
AG
827%files gitweb
828%defattr(644,root,root,755)
829%doc gitweb/{README,INSTALL}
830%dir %{webappdir}
be2ccf99
AG
831%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
832%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
51ce768a 833%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/lighttpd.conf
642ee6ff 834%config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitweb.conf
9611d914 835%config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitolite.pl
be2ccf99
AG
836%attr(755,root,root) %{cgibindir}/gitweb.cgi
837%{appdir}
348dee00 838%attr(755,root,root) %{gitcoredir}/git-instaweb
93a30d5e 839%if %{with doc}
0c582eb3
AM
840%{_mandir}/man1/gitweb.1*
841%{_mandir}/man5/gitweb.conf.5*
93a30d5e 842%endif
be2ccf99 843
7d9cd7eb 844%if %{with tk}
f9871074
AG
845%files gui
846%defattr(644,root,root,755)
6fbf4942 847%attr(755,root,root) %{gitcoredir}/git-citool
348dee00 848%attr(755,root,root) %{gitcoredir}/git-gui
f9871074
AG
849%dir %{_datadir}/git-gui
850%dir %{_datadir}/git-gui/lib
851%dir %{_datadir}/git-gui/lib/msgs
852%{_datadir}/git-gui/lib/git-gui.ico
853%{_datadir}/git-gui/lib/tclIndex
854%{_datadir}/git-gui/lib/*.js
855%{_datadir}/git-gui/lib/*.tcl
5d132744 856%lang(bg) %{_datadir}/git-gui/lib/msgs/bg.msg
f9871074 857%lang(de) %{_datadir}/git-gui/lib/msgs/de.msg
469258c9 858%lang(el) %{_datadir}/git-gui/lib/msgs/el.msg
f9871074
AG
859%lang(fr) %{_datadir}/git-gui/lib/msgs/fr.msg
860%lang(hu) %{_datadir}/git-gui/lib/msgs/hu.msg
861%lang(it) %{_datadir}/git-gui/lib/msgs/it.msg
862%lang(ja) %{_datadir}/git-gui/lib/msgs/ja.msg
670fe4d6 863%lang(nb) %{_datadir}/git-gui/lib/msgs/nb.msg
345fc12f 864%lang(pt) %{_datadir}/git-gui/lib/msgs/pt_pt.msg
10343d09 865%lang(pt_BR) %{_datadir}/git-gui/lib/msgs/pt_br.msg
f9871074
AG
866%lang(ru) %{_datadir}/git-gui/lib/msgs/ru.msg
867%lang(sv) %{_datadir}/git-gui/lib/msgs/sv.msg
6cc57eea 868%lang(vi) %{_datadir}/git-gui/lib/msgs/vi.msg
35cbc54f 869%lang(zh_CN) %{_datadir}/git-gui/lib/msgs/zh_cn.msg
7d9cd7eb 870%endif
f9871074 871
e5fa8af5
JB
872%files arch
873%defattr(644,root,root,755)
348dee00 874%attr(755,root,root) %{gitcoredir}/git-archimport
e5fa8af5
JB
875%if %{with doc}
876%{_mandir}/man1/git-archimport.1*
877%endif
878
0d2db069
ER
879%files bzr
880%defattr(644,root,root,755)
348dee00 881%attr(755,root,root) %{gitcoredir}/git-remote-bzr
0d2db069 882
e5fa8af5
JB
883%files cvs
884%defattr(644,root,root,755)
885%attr(755,root,root) %{_bindir}/git-cvsserver
348dee00 886%attr(755,root,root) %{gitcoredir}/git-cvs*
e5fa8af5
JB
887%if %{with doc}
888%{_mandir}/man1/git-cvs*.1*
889%{_mandir}/man7/gitcvs-migration.7*
890%endif
891
0d2db069
ER
892%files hg
893%defattr(644,root,root,755)
348dee00 894%attr(755,root,root) %{gitcoredir}/git-remote-hg
0d2db069
ER
895
896%files p4
897%defattr(644,root,root,755)
348dee00
ER
898%attr(755,root,root) %{gitcoredir}/git-p4
899%attr(755,root,root) %{gitcoredir}/mergetools/p4merge
cfe5bf90
JB
900%if %{with doc}
901%{_mandir}/man1/git-p4.1*
902%endif
0d2db069 903
2c0376c9
AM
904%files svn
905%defattr(644,root,root,755)
348dee00 906%attr(755,root,root) %{gitcoredir}/git-svn
b5884c73 907%{perl_vendorlib}/Git/SVN
bbceff2c 908%{perl_vendorlib}/Git/SVN.pm
2c0376c9
AM
909%if %{with doc}
910%{_mandir}/man1/git-svn.1*
911%endif
912
d82521ea
ER
913%files email
914%defattr(644,root,root,755)
348dee00 915%attr(755,root,root) %{gitcoredir}/git-imap-send
cfe5bf90 916%attr(755,root,root) %{gitcoredir}/git-send-email
d82521ea 917%if %{with doc}
cfe5bf90
JB
918%{_mandir}/man1/git-imap-send.1*
919%{_mandir}/man1/git-send-email.1*
d82521ea
ER
920%endif
921
f2c1983d
AG
922%files -n bash-completion-git
923%defattr(644,root,root,755)
3102984c 924%{bash_compdir}/git
f2c1983d 925
3dc01deb 926%files -n perl-Git
5d7220ad 927%defattr(644,root,root,755)
3dc01deb 928%{perl_vendorlib}/Git.pm
b5884c73
KK
929%dir %{perl_vendorlib}/Git
930%{perl_vendorlib}/Git/I18N.pm
bbceff2c 931%{perl_vendorlib}/Git/IndexInfo.pm
6fa8665e 932%{perl_vendorlib}/Git/LoadCPAN.pm
499c2b98 933%{perl_vendorlib}/Git/Packet.pm
6fa8665e
JP
934%dir %{perl_vendorlib}/Git/LoadCPAN
935%{perl_vendorlib}/Git/LoadCPAN/Error.pm
936%dir %{perl_vendorlib}/Git/LoadCPAN/Mail
937%{perl_vendorlib}/Git/LoadCPAN/Mail/Address.pm
233261d9 938%{?with_doc:%{_mandir}/man3/Git.3pm*}
0643d0ea
ER
939
940%if %{with gnome_keyring}
941%files -n gnome-keyring-git-core
942%defattr(644,root,root,755)
348dee00 943%attr(755,root,root) %{gitcoredir}/git-credential-gnome-keyring
0643d0ea 944%endif
20b80b37
JB
945
946%if %{with libsecret}
947%files credential-libsecret
948%defattr(644,root,root,755)
949%attr(755,root,root) %{gitcoredir}/git-credential-libsecret
950%endif
d500b766
JP
951
952%files -n zsh-completion-git
953%defattr(644,root,root,755)
954%{zsh_compdir}/_git
This page took 0.408615 seconds and 4 git commands to generate.