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