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