]> git.pld-linux.org Git - packages/git-core.git/blame - git-core.spec
up to 2.22.0
[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
89a476f8 14%include /usr/lib/rpm/macros.perl
479de23d
AM
15Summary: Distributed version control system focused on speed, effectivity and usability
16Summary(pl.UTF-8): Rozproszony system śledzenia treści skupiony na szybkości, wydajności i użyteczności
51c3b977 17Name: git-core
dab2f9ca 18Version: 2.22.0
82b6bcfb 19Release: 1
51c3b977 20License: GPL v2
21Group: Development/Tools
b4c15beb 22Source0: http://www.kernel.org/pub/software/scm/git/git-%{version}.tar.xz
dab2f9ca 23# Source0-md5: fcaf01506175c56fe88d887f1ff02ce8
be2ccf99 24Source1: %{name}-gitweb.conf
814a047c 25Source2: %{name}-gitweb-httpd.conf
51ce768a
KK
26Source3: %{name}-gitweb-lighttpd.conf
27Source4: %{name}.sysconfig
28Source5: %{name}.inet
29Source6: %{name}.init
642ee6ff 30Source7: gitolite.pl
0aa13f22
JP
31Patch0: %{name}-key-bindings.patch
32Patch1: %{name}-sysconfdir.patch
33Patch2: cherry-picked-commitlog.patch
e699dd89 34URL: http://git-scm.com/
fdf2ed38 35BuildRequires: autoconf >= 2.59
11856720 36BuildRequires: automake
51c3b977 37BuildRequires: curl-devel
115484e9 38BuildRequires: expat-devel
2ece97c6
ER
39%if "%{pld_release}" == "ac"
40BuildRequires: gettext-devel
41%else
25a92afd 42BuildRequires: gettext-tools
2ece97c6 43%endif
20b80b37
JB
44%if %{with gnome_keyring} || %{with libsecret}
45BuildRequires: glib2-devel >= 2.0
46%endif
cecb5b67
KK
47%if %{with gnome_keyring}
48BuildRequires: libgnome-keyring-devel
20b80b37
JB
49%endif
50%if %{with libsecret}
51BuildRequires: libsecret-devel
cecb5b67 52%endif
51c3b977 53BuildRequires: openssl-devel
d5e39597 54%{?with_pcre:BuildRequires: pcre2-8-devel}
0f1e5795 55BuildRequires: perl-Error > 0.15
561578e1 56BuildRequires: perl-MailTools
51c3b977 57BuildRequires: perl-base
20b80b37
JB
58%if %{with gnome_keyring} || %{with libsecret}
59BuildRequires: pkgconfig
60%endif
db444c11 61BuildRequires: python-devel
89a476f8 62BuildRequires: rpm-perlprov >= 4.1-13
c841a4fc 63BuildRequires: rpm-pythonprov
e43aceaa 64BuildRequires: rpmbuild(macros) >= 1.673
7d9cd7eb 65%if %{with tk}
1db22c36
JB
66# wish
67BuildRequires: tk
7d9cd7eb 68%endif
51c3b977 69BuildRequires: zlib-devel
08cc92d7
ER
70%if %{with doc}
71BuildRequires: asciidoc >= 7.1.2-3
c841a4fc 72BuildRequires: docbook-dtd45-xml
08cc92d7
ER
73BuildRequires: xmlto
74%endif
2c50f007 75%if %{with tests}
db032591 76%if %{with tests_cvs}
dfed7e92 77# tests failed sometimes when using nserver/cvsnt client so enforce pure cvs here
3554b1a3 78BuildRequires: cvs-gnu-client < 1.13
2c0376c9 79BuildRequires: cvs-gnu-client >= 1.12
db032591 80%endif
ef4eeb6d
KK
81%if %{with tests_svn}
82BuildRequires: perl-subversion
83BuildRequires: subversion
84%endif
1b3085ff 85Conflicts: pdksh < 5.2.14-46
2c50f007 86%endif
23c8c456 87# git-sh-setup: sane_grep
3f245fc5 88Requires: grep
23c8c456
ER
89# git-pull: printf
90Requires: coreutils
3f245fc5 91Requires: sed
0d2db069 92Suggests: git-core-bzr
26361b03 93Suggests: git-core-cvs
0d2db069
ER
94Suggests: git-core-hg
95Suggests: git-core-p4
26361b03 96Suggests: git-core-svn
d82521ea 97Suggests: less
9e9faf95 98Suggests: openssh-clients
e7120917 99Suggests: perl-Git = %{version}-%{release}
d82521ea 100Suggests: rsync
22105a2f 101Obsoletes: git-core-gitview
a77c0aad 102Obsoletes: python-Git
f4018182 103Conflicts: perl-Git < %{version}
51c3b977 104BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105
19936745
AM
106# html docs have links to txt files
107%define _noautocompressdoc *.txt
108
e7120917 109# do not generate perl dependency, git add -p support is optional
27399cc4
ER
110# skip dependency generation from templates
111%define _noautoreqfiles %{_libexecdir}/%{name}/git-add--interactive %{_datadir}/%{name}/templates
e7120917 112
be2ccf99
AG
113%define webapp gitweb
114%define webappdir %{_sysconfdir}/webapps/%{webapp}
115%define appdir %{_datadir}/%{webapp}
116%define cgibindir %{_prefix}/lib/cgi-bin
ee14b8db 117%define gitcoredir %{_libexecdir}/%{name}
be2ccf99 118
51c3b977 119%description
120"git" can mean anything, depending on your mood.
121
d52424f5 122- random three-letter combination that is pronounceable, and not
123 actually used by any common UNIX command. The fact that it is a
124 mispronunciation of "get" may or may not be relevant.
125- stupid. contemptible and despicable. simple. Take your pick from the
126 dictionary of slang.
127- "global information tracker": you're in a good mood, and it actually
128 works for you. Angels sing, and a light suddenly fills the room.
129- "goddamn idiotic truckload of sh*t": when it breaks
51c3b977 130
c751087d 131This is a stupid (but extremely fast) directory content manager. It
51c3b977 132doesn't do a whole lot, but what it 'does' do is track directory
133contents efficiently.
134
ea061c99
JR
135%description -l pl.UTF-8
136"git" może oznaczać cokolwiek, w zależności od nastroju.
137
d52424f5 138- losową kombinację trzech liter, która jest wymawialna i właściwie
139 nie używana przez żadne popularne polecenie uniksowe. Fakt, że jest to
140 błędna pisownia słowa "get" może mieć lub nie mieć znaczenia.
141- głupi, pogardliwy, prosty. Można wybrać ze słownika slangu.
142- "global information tracker" (narzędzie do globalnego śledzenia
143 informacji) - jeśli jesteśmy w dobrym nastroju i git akurat działa.
144 Anioły śpiewają, a światło niespodziewanie wypełnia pokój.
145- "goddamn idiotic truckload of sh*t" (przeklęty idiotyczny ładunek
146 g*) - kiedy się zepsuje.
ea061c99
JR
147
148Jest to prymitywny (ale bardzo szybki) zarządca treści słownikowej.
149Nie robi wiele, ale to, co "robi", to wydajne śledzenie zawartości
c751087d
JB
150katalogu.
151
a8655d02
ER
152%package doc
153Summary: Documentation for git-core
154Summary(pl.UTF-8): Dokumentacja do git-core
155Group: Documentation
ad39aec1
ER
156%if "%{_rpmversion}" >= "5"
157BuildArch: noarch
158%endif
a8655d02
ER
159
160%description doc
161Documentation for git-core.
162
163%description doc -l pl.UTF-8
164Dokumentacja do git-core.
165
b11ada2c
AG
166%package daemon-inetd
167Summary: Files necessary to run git-daemon as an inetd service
5db07614 168Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi inetd
b11ada2c
AG
169Group: Networking/Daemons
170Requires: %{name} = %{version}-%{release}
171Requires: setup >= 2.4.11-1
172Provides: git-core-daemon
173Obsoletes: git-core-daemon
174Obsoletes: git-core-daemon-standalone
175
176%description daemon-inetd
177Git-daemon is a really simple TCP git daemon that can serve git
178repositories. This package provides all necessarry files to run
179git-daemon as an inetd service.
180
181%description daemon-inetd -l pl.UTF-8
5db07614
JB
182Git-daemon to prosty demon git korzystający z protokołu TCP do
183udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
184do uruchomienia git-demona w trybie usługi inetd.
b11ada2c
AG
185
186%package daemon-standalone
187Summary: Files necessary to run git-daemon as a standalone service
5db07614 188Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi samodzielnej
b11ada2c
AG
189Group: Networking/Daemons
190Requires: %{name} = %{version}-%{release}
191Provides: git-core-daemon
192Obsoletes: git-core-daemon
193Obsoletes: git-core-daemon-inetd
194
195%description daemon-standalone
196Git-daemon is a really simple TCP git daemon that can serve git
197repositories. This package provides all necessarry files to run
198git-daemon as an standalone service.
199
200%description daemon-standalone -l pl.UTF-8
5db07614
JB
201Git-daemon to prosty demon git korzystający z protokołu TCP do
202udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne
203do uruchomienia git-daemona w trybie usługi samodzielnej.
b11ada2c 204
e3cefa79 205%package devel
8bed7625
JB
206Summary: Git library with header files
207Summary(pl.UTF-8): Biblioteka Gita oraz pliki nagłówkowe
66a7f095 208Group: Development/Libraries
d52424f5 209Requires: zlib-devel
e3cefa79 210
211%description devel
8bed7625 212Git library with header files.
66a7f095 213
ea061c99 214%description devel -l pl.UTF-8
8bed7625 215Biblioteka Gita oraz pliki nagłówkowe.
e3cefa79 216
91396e2e
AG
217%package gitk
218Summary: Tcl/Tk interface to the Git version control system
219Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
220Group: Development/Tools
221Requires: %{name} = %{version}-%{release}
222Requires: tk
6743dd7e
ER
223%if "%{_rpmversion}" >= "5"
224BuildArch: noarch
225%endif
91396e2e
AG
226
227%description gitk
1fcd08a6
JB
228gitk displays changes in a repository or a selected set of commits.
229This includes visualizing the commit graph, showing information
230related to each commit, and the files in the trees of each revision.
91396e2e
AG
231
232Historically, gitk was the first repository browser. It's written in
04fdf912 233Tcl/Tk and started off in a separate repository but was later merged
91396e2e
AG
234into the main git repository.
235
236%description gitk -l pl.UTF-8
1fcd08a6
JB
237gitk wyświetla zmiany w repozytorium lub wybranym zbiorze commitów.
238Oznacza to wizualizację grafu commitów, wyświetlanie informacji
239związanych z każdym z commitów oraz listę plików dla każdej rewizji.
91396e2e 240
1fcd08a6 241Z historycznego punktu widzenia gitk był pierwszą przeglądarką
02059138
ER
242repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
243osobnym repozytorium, ale z czasem został włączony do głównego
2712fe7b 244repozytorium gita.
91396e2e 245
be2ccf99
AG
246%package gitweb
247Summary: Web frontend to git
41b5f4b1 248Summary(pl.UTF-8): Frontend WWW do gita
be2ccf99
AG
249Group: Development/Tools
250Requires: %{name} = %{version}-%{release}
251Requires: webapps
666cda7c 252Requires: webserver(access)
51ce768a
KK
253Requires: webserver(alias)
254Requires: webserver(cgi)
93a30d5e 255Suggests: webserver(setenv)
be2ccf99
AG
256
257%description gitweb
258This package provides a web interface for browsing git repositories.
259
260%description gitweb -l pl.UTF-8
2712fe7b 261Pakiet ten dostarcza interfejs WWW do przeglądania repozytoriów gita.
be2ccf99 262
f9871074
AG
263%package gui
264Summary: Tcl/Tk interface to the Git version control system
265Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git
266Group: Development/Tools
267Requires: %{name} = %{version}-%{release}
268Requires: tk
d4106757 269Requires: xdg-utils
531b434f 270Suggests: meld
f9871074
AG
271
272%description gui
273Displays changes in a repository or a selected set of commits. This
274includes visualizing the commit graph, showing information related to
275each commit, and the files in the trees of each revision.
276
277Historically, gitk was the first repository browser. It's written in
278Tcl/Tk and started off in a separate repository but was later merged
279into the main git repository.
280
281%description gui -l pl.UTF-8
282Wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. Oznacza
283to wizualizację grafu commitów, wyświetlanie informacji związanych z
284każdym z commitów oraz listę plików dla każdej rewizji.
285
286Z punktu widzenia historii, gitk był pierwszą przeglądarką
287repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w
288osobnym repozytorium, ale z czasem został włączony do głównego
289repozytorium gita.
290
e5fa8af5
JB
291%package arch
292Summary: Git tools for importing Arch repositories
293Summary(pl.UTF-8): Narzędzia Gita do importowania repozytoriów Archa
294Group: Development/Tools
295Requires: %{name} = %{version}-%{release}
296Requires: tla
297
298%description arch
299Git tools for importing Arch repositories.
300
301%description arch -l pl.UTF-8
302Narzędzia Gita do importowania repozytoriów Archa.
303
0d2db069
ER
304%package bzr
305Summary: Git tools for working with bzr repositories
e5fa8af5 306Summary(pl.UTF-8): Narzędzia Gita do pracy z repozytoriami bzr
0d2db069
ER
307Group: Development/Tools
308Requires: %{name} = %{version}-%{release}
309Requires: bzr
310
311%description bzr
312Git tools for working with bzr repositories.
313
e5fa8af5
JB
314%description bzr -l pl.UTF-8
315Narzędzia Gita do pracy z repozytoriami bzr.
316
317%package cvs
318Summary: CVS support for Git
319Summary(pl.UTF-8): Obsługa CVS dla Gita
320Group: Development/Tools
321Requires: %{name} = %{version}-%{release}
322Requires: cvsps >= 2.1-2
323Requires: rcs
324
325%description cvs
326CVS support for Git.
327
328%description cvs -l pl.UTF-8
329Obsługa CVS dla Gita.
330
0d2db069
ER
331%package hg
332Summary: Git tools for working with mercurial repositories
e5fa8af5 333Summary(pl.UTF-8): Narzędzia Gita do pracy z repozytoriami mercuriala
0d2db069
ER
334Group: Development/Tools
335Requires: %{name} = %{version}-%{release}
336Requires: mercurial >= 1.8
337
338%description hg
339Git tools for working with mercurial repositories.
340
e5fa8af5
JB
341%description hg -l pl.UTF-8
342Narzędzia Gita do pracy z repozytoriami mercuriala.
343
0d2db069
ER
344%package p4
345Summary: Git tools for working with Perforce depots
e5fa8af5 346Summary(pl.UTF-8): Narzędzia Gita do pracy z magazynami Perforce'a
0d2db069
ER
347Group: Development/Tools
348Requires: %{name} = %{version}-%{release}
349
350%description p4
351Git tools for working with Perforce depots.
352
e5fa8af5
JB
353%description p4 -l pl.UTF-8
354Narzędzia Gita do pracy z magazynami Perforce'a.
355
2c0376c9
AM
356%package svn
357Summary: Subversion support for Git
41b5f4b1 358Summary(pl.UTF-8): Obsługa Subversion dla Gita
2c0376c9
AM
359Group: Development/Tools
360Requires: %{name} = %{version}-%{release}
daccfb39 361Requires: perl-Encode
4ea37765 362Requires: perl-Term-ReadKey
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
f2c1983d
AG
385%package -n bash-completion-git
386Summary: bash-completion for git
2712fe7b 387Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gita
02059138 388Group: Applications/Shells
cdeb0400 389Requires: %{name} = %{version}-%{release}
3102984c 390Requires: bash-completion >= 2.0
c7e1d931
ER
391%if "%{_rpmversion}" >= "5"
392BuildArch: noarch
393%endif
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
27b79a12 405Obsoletes: perl-git-core
24ff48af
ER
406%if "%{_rpmversion}" >= "5"
407BuildArch: noarch
408%endif
5d7220ad 409
3dc01deb 410%description -n perl-Git
5d7220ad
AM
411This module provides Perl scripts easy way to interface the Git
412version control system. The modules have an easy and well-tested way
413to call arbitrary Git commands; in the future, the interface will also
414provide specialized methods for doing easily operations which are not
415totally trivial to do over the generic command interface.
416
ea061c99
JR
417%description -n perl-Git -l pl.UTF-8
418Ten moduł umożliwia skryptom Perla współpracę z systemem kontroli
08cc92d7
ER
419wersji Git. W łatwy i dobrze przetestowany sposób pozwala wywoływać
420dowolne polecenia Gita; w przyszłości interfejs udostępni także
421specjalne metody do łatwego wykonywania operacji nietrywialnych do
422wykonania przy użyciu ogólnego interfejsu poleceń.
7eef96e1 423
0643d0ea
ER
424%package -n gnome-keyring-git-core
425Summary: GNOME Keyring authentication provider for Git
20b80b37 426Summary(pl.UTF-8): Moduł uwierzytelniający GNOME Keyring dla Gita
0643d0ea 427Group: X11/Applications
25c1ae0c 428URL: http://git-scm.com/docs/gitcredentials.html
0643d0ea
ER
429Requires: %{name} = %{version}-%{release}
430
431%description -n gnome-keyring-git-core
432Authentication provider module for Git which allows git client to
433authenticate using GNOME Keyring.
434
25c1ae0c 435You need to register it with:
a4e33b57 436- git config --global credential.helper gnome-keyring
25c1ae0c 437
0643d0ea 438%description -n gnome-keyring-git-core -l pl.UTF-8
20b80b37 439Moduł uwierzytelniający dla Gita pozwalający klientom git
0643d0ea
ER
440uwierzytelniać się przy użyciu mechanizmu GNOME Keyring.
441
50e442d4 442Moduł trzeba zarejestrować poleceniem:
a4e33b57 443- git config --global credential.helper gnome-keyring
50e442d4 444
20b80b37
JB
445%package credential-libsecret
446Summary: GNOME authentication provider for Git using libsecret
447Summary(pl.UTF-8): Moduł uwierzytelniający GNOME dla Gita wykorzystujący libsecret
448Group: X11/Applications
449URL: http://git-scm.com/docs/gitcredentials.html
450Requires: %{name} = %{version}-%{release}
451
452%description credential-libsecret
453Authentication provider module for Git which allows git client to
454authenticate using GNOME libsecret.
455
456You need to register it with:
457- git config --global credential.helper libsecret
458
459%description credential-libsecret -l pl.UTF-8
460Moduł uwierzytelniający dla Gita pozwalający klientom git
461uwierzytelniać się przy użyciu mechanizmu GNOME libsecret.
462
463Moduł trzeba zarejestrować poleceniem:
464- git config --global credential.helper libsecret
465
51c3b977 466%prep
5013f7fc 467%setup -q -n git-%{version}
0aa13f22
JP
468%patch0 -p0
469%patch1 -p1
d12d8532 470%patch2 -p1
a1036d06 471
797bc583 472%{__rm} {Documentation/technical,contrib/credential/gnome-keyring}/.gitignore
0643d0ea 473
ab67970b
AM
474# we build things in contrib but want to have it clean for doc purporses, too
475cp -a contrib contrib-doc
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
b11ada2c
AG
644%post daemon-inetd
645%service -q rc-inetd reload
646
647%postun daemon-inetd
648if [ "$1" = "0" ]; then
649 %service -q rc-inetd reload
650fi
651
652%post daemon-standalone
653/sbin/chkconfig --add git-daemon
654%service git-daemon restart "git-daemon"
655
656%preun daemon-standalone
657if [ "$1" = "0" ]; then
658 %service git-daemon stop
659 /sbin/chkconfig --del git-daemon
660fi
661
be2ccf99
AG
662%triggerin gitweb -- apache1 < 1.3.37-3, apache1-base
663%webapp_register apache %{webapp}
664
665%triggerun gitweb -- apache1 < 1.3.37-3, apache1-base
666%webapp_unregister apache %{webapp}
667
814a047c 668%triggerin gitweb -- apache < 2.2.0, apache-base
be2ccf99
AG
669%webapp_register httpd %{webapp}
670
814a047c 671%triggerun gitweb -- apache < 2.2.0, apache-base
be2ccf99
AG
672%webapp_unregister httpd %{webapp}
673
51ce768a
KK
674%triggerin gitweb -- lighttpd
675%webapp_register lighttpd %{webapp}
676
677%triggerun gitweb -- lighttpd
678%webapp_unregister lighttpd %{webapp}
679
fdf2ed38 680%files -f git.lang
51c3b977 681%defattr(644,root,root,755)
a824ba4f 682%doc README.md contrib-doc
a8655d02 683%attr(755,root,root) %{_bindir}/git
44ee5525
ER
684%attr(755,root,root) %{_bindir}/git-receive-pack
685%attr(755,root,root) %{_bindir}/git-shell
686%attr(755,root,root) %{_bindir}/git-upload-archive
687%attr(755,root,root) %{_bindir}/git-upload-pack
cdeb0400 688%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}
a8655d02 689
08cc92d7 690%if %{with doc}
0afd37aa 691%{_mandir}/man1/git-*.1*
dbde9893 692%exclude %{_mandir}/man1/git-archimport.1*
2c0376c9
AM
693%exclude %{_mandir}/man1/git-svn.1*
694%exclude %{_mandir}/man1/git-cvs*.1*
858c27ef 695%exclude %{_mandir}/man1/git-imap-send*.1*
dbde9893 696%exclude %{_mandir}/man1/*email*.1*
a48d28b8 697%{_mandir}/man1/git.1*
0afd37aa 698%{_mandir}/man5/gitattributes.5*
a48d28b8 699%{_mandir}/man5/githooks.5*
0afd37aa 700%{_mandir}/man5/gitignore.5*
785b167d 701%{_mandir}/man5/gitmodules.5*
a48d28b8
AG
702%{_mandir}/man5/gitrepository-layout.5*
703%{_mandir}/man7/gitcli.7*
704%{_mandir}/man7/gitcore-tutorial.7*
fdf2ed38 705%{_mandir}/man7/gitcredentials.7*
a48d28b8 706%{_mandir}/man7/gitdiffcore.7*
ab67970b 707%{_mandir}/man7/giteveryday.7*
a48d28b8 708%{_mandir}/man7/gitglossary.7*
60b58680 709%{_mandir}/man7/gitnamespaces.7*
dab2f9ca 710%{_mandir}/man7/gitremote-helpers.7*
f16e8911 711%{_mandir}/man7/gitrevisions.7*
d5e39597 712%{_mandir}/man7/gitsubmodules.7*
a48d28b8
AG
713%{_mandir}/man7/gittutorial-2.7*
714%{_mandir}/man7/gittutorial.7*
670fe4d6 715%{_mandir}/man7/gitworkflows.7*
08cc92d7 716%endif
a8655d02 717
348dee00
ER
718%dir %{gitcoredir}
719%attr(755,root,root) %{gitcoredir}/*-*
720%attr(755,root,root) %{gitcoredir}/git
721%dir %{gitcoredir}/mergetools
722%{gitcoredir}/mergetools/*
a8655d02 723
0d2db069
ER
724%{_datadir}/%{name}
725%{_localstatedir}/lib/git
726
727# subpackages
348dee00
ER
728%exclude %{gitcoredir}/*email*
729%exclude %{gitcoredir}/*p4*
730%exclude %{gitcoredir}/git-archimport
6fbf4942 731%exclude %{gitcoredir}/git-citool
348dee00
ER
732%exclude %{gitcoredir}/git-cvs*
733%exclude %{gitcoredir}/git-gui
734%exclude %{gitcoredir}/git-imap-send
735%exclude %{gitcoredir}/git-instaweb
736%exclude %{gitcoredir}/git-remote-bzr
737%exclude %{gitcoredir}/git-remote-hg
738%exclude %{gitcoredir}/git-remote-testsvn
739%exclude %{gitcoredir}/git-svn
740%exclude %{gitcoredir}/mergetools/p4merge
f295f80f 741%if %{with gnome_keyring}
348dee00 742%exclude %{gitcoredir}/git-credential-gnome-keyring
f295f80f 743%endif
20b80b37
JB
744%if %{with libsecret}
745%exclude %{gitcoredir}/git-credential-libsecret
746%endif
e3cefa79 747
a8655d02
ER
748%if %{with doc}
749%files doc
778b89a7 750%defattr(644,root,root,755)
a8655d02
ER
751%doc Documentation/RelNotes*
752%doc Documentation/*.html Documentation/howto Documentation/technical
753%endif
754
b11ada2c
AG
755%files daemon-inetd
756%defattr(644,root,root,755)
757%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/git-daemon
758
759%files daemon-standalone
760%defattr(644,root,root,755)
761%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/git-daemon
762%attr(754,root, root) /etc/rc.d/init.d/git-daemon
763
e3cefa79 764%files devel
3ff86e9e 765%defattr(644,root,root,755)
cdeb0400 766%{_includedir}/%{name}
5db07614 767%{_libdir}/libgit.a
eaf5c40c 768%{_libdir}/libgit_xdiff.a
5d7220ad 769
7d9cd7eb 770%if %{with tk}
91396e2e
AG
771%files gitk
772%defattr(644,root,root,755)
08cc92d7 773%if %{with doc}
91396e2e 774%{_mandir}/man1/gitk.1*
08cc92d7
ER
775%endif
776%attr(755,root,root) %{_bindir}/gitk
9fa88d97
AM
777%dir %{_datadir}/gitk
778%dir %{_datadir}/gitk/lib
779%dir %{_datadir}/gitk/lib/msgs
5d132744 780%lang(bg) %{_datadir}/gitk/lib/msgs/bg.msg
6cc57eea 781%lang(ca) %{_datadir}/gitk/lib/msgs/ca.msg
3b243bbe 782%lang(de) %{_datadir}/gitk/lib/msgs/de.msg
f9871074 783%lang(es) %{_datadir}/gitk/lib/msgs/es.msg
778b89a7
AM
784%lang(fr) %{_datadir}/gitk/lib/msgs/fr.msg
785%lang(hu) %{_datadir}/gitk/lib/msgs/hu.msg
3b243bbe 786%lang(it) %{_datadir}/gitk/lib/msgs/it.msg
469258c9 787%lang(ja) %{_datadir}/gitk/lib/msgs/ja.msg
3ed82b68 788%lang(pt_BR) %{_datadir}/gitk/lib/msgs/pt_br.msg
22105a2f 789%lang(pt_PT) %{_datadir}/gitk/lib/msgs/pt_pt.msg
95998f97 790%lang(ru) %{_datadir}/gitk/lib/msgs/ru.msg
f9871074 791%lang(sv) %{_datadir}/gitk/lib/msgs/sv.msg
1adc1f85 792%lang(vi) %{_datadir}/gitk/lib/msgs/vi.msg
7d9cd7eb 793%endif
91396e2e 794
be2ccf99
AG
795%files gitweb
796%defattr(644,root,root,755)
797%doc gitweb/{README,INSTALL}
798%dir %{webappdir}
be2ccf99
AG
799%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf
800%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf
51ce768a 801%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/lighttpd.conf
642ee6ff 802%config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitweb.conf
9611d914 803%config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitolite.pl
be2ccf99
AG
804%attr(755,root,root) %{cgibindir}/gitweb.cgi
805%{appdir}
348dee00 806%attr(755,root,root) %{gitcoredir}/git-instaweb
93a30d5e 807%if %{with doc}
0c582eb3
AM
808%{_mandir}/man1/gitweb.1*
809%{_mandir}/man5/gitweb.conf.5*
93a30d5e 810%endif
be2ccf99 811
7d9cd7eb 812%if %{with tk}
f9871074
AG
813%files gui
814%defattr(644,root,root,755)
6fbf4942 815%attr(755,root,root) %{gitcoredir}/git-citool
348dee00 816%attr(755,root,root) %{gitcoredir}/git-gui
f9871074
AG
817%dir %{_datadir}/git-gui
818%dir %{_datadir}/git-gui/lib
819%dir %{_datadir}/git-gui/lib/msgs
820%{_datadir}/git-gui/lib/git-gui.ico
821%{_datadir}/git-gui/lib/tclIndex
822%{_datadir}/git-gui/lib/*.js
823%{_datadir}/git-gui/lib/*.tcl
5d132744 824%lang(bg) %{_datadir}/git-gui/lib/msgs/bg.msg
f9871074 825%lang(de) %{_datadir}/git-gui/lib/msgs/de.msg
469258c9 826%lang(el) %{_datadir}/git-gui/lib/msgs/el.msg
f9871074
AG
827%lang(fr) %{_datadir}/git-gui/lib/msgs/fr.msg
828%lang(hu) %{_datadir}/git-gui/lib/msgs/hu.msg
829%lang(it) %{_datadir}/git-gui/lib/msgs/it.msg
830%lang(ja) %{_datadir}/git-gui/lib/msgs/ja.msg
670fe4d6 831%lang(nb) %{_datadir}/git-gui/lib/msgs/nb.msg
345fc12f 832%lang(pt) %{_datadir}/git-gui/lib/msgs/pt_pt.msg
10343d09 833%lang(pt_BR) %{_datadir}/git-gui/lib/msgs/pt_br.msg
f9871074
AG
834%lang(ru) %{_datadir}/git-gui/lib/msgs/ru.msg
835%lang(sv) %{_datadir}/git-gui/lib/msgs/sv.msg
6cc57eea 836%lang(vi) %{_datadir}/git-gui/lib/msgs/vi.msg
35cbc54f 837%lang(zh_CN) %{_datadir}/git-gui/lib/msgs/zh_cn.msg
7d9cd7eb 838%endif
f9871074 839
e5fa8af5
JB
840%files arch
841%defattr(644,root,root,755)
348dee00 842%attr(755,root,root) %{gitcoredir}/git-archimport
e5fa8af5
JB
843%if %{with doc}
844%{_mandir}/man1/git-archimport.1*
845%endif
846
0d2db069
ER
847%files bzr
848%defattr(644,root,root,755)
348dee00 849%attr(755,root,root) %{gitcoredir}/git-remote-bzr
0d2db069 850
e5fa8af5
JB
851%files cvs
852%defattr(644,root,root,755)
853%attr(755,root,root) %{_bindir}/git-cvsserver
348dee00 854%attr(755,root,root) %{gitcoredir}/git-cvs*
e5fa8af5
JB
855%if %{with doc}
856%{_mandir}/man1/git-cvs*.1*
857%{_mandir}/man7/gitcvs-migration.7*
858%endif
859
0d2db069
ER
860%files hg
861%defattr(644,root,root,755)
348dee00 862%attr(755,root,root) %{gitcoredir}/git-remote-hg
0d2db069
ER
863
864%files p4
865%defattr(644,root,root,755)
348dee00
ER
866%attr(755,root,root) %{gitcoredir}/git-p4
867%attr(755,root,root) %{gitcoredir}/mergetools/p4merge
0d2db069 868
2c0376c9
AM
869%files svn
870%defattr(644,root,root,755)
348dee00
ER
871%attr(755,root,root) %{gitcoredir}/git-svn
872%attr(755,root,root) %{gitcoredir}/git-remote-testsvn
b5884c73 873%{perl_vendorlib}/Git/SVN
bbceff2c 874%{perl_vendorlib}/Git/SVN.pm
2c0376c9
AM
875%if %{with doc}
876%{_mandir}/man1/git-svn.1*
877%endif
878
d82521ea
ER
879%files email
880%defattr(644,root,root,755)
348dee00
ER
881%attr(755,root,root) %{gitcoredir}/git-imap-send
882%attr(755,root,root) %{gitcoredir}/*email*
d82521ea 883%if %{with doc}
d82521ea 884%{_mandir}/man1/*email*.1*
858c27ef 885%{_mandir}/man1/*imap-send*.1*
d82521ea
ER
886%endif
887
f2c1983d
AG
888%files -n bash-completion-git
889%defattr(644,root,root,755)
3102984c 890%{bash_compdir}/git
f2c1983d 891
3dc01deb 892%files -n perl-Git
5d7220ad 893%defattr(644,root,root,755)
3dc01deb 894%{perl_vendorlib}/Git.pm
b5884c73
KK
895%dir %{perl_vendorlib}/Git
896%{perl_vendorlib}/Git/I18N.pm
bbceff2c 897%{perl_vendorlib}/Git/IndexInfo.pm
6fa8665e 898%{perl_vendorlib}/Git/LoadCPAN.pm
499c2b98 899%{perl_vendorlib}/Git/Packet.pm
6fa8665e
JP
900%dir %{perl_vendorlib}/Git/LoadCPAN
901%{perl_vendorlib}/Git/LoadCPAN/Error.pm
902%dir %{perl_vendorlib}/Git/LoadCPAN/Mail
903%{perl_vendorlib}/Git/LoadCPAN/Mail/Address.pm
11d00f14 904%{_mandir}/man3/Git.3pm*
0643d0ea
ER
905
906%if %{with gnome_keyring}
907%files -n gnome-keyring-git-core
908%defattr(644,root,root,755)
348dee00 909%attr(755,root,root) %{gitcoredir}/git-credential-gnome-keyring
0643d0ea 910%endif
20b80b37
JB
911
912%if %{with libsecret}
913%files credential-libsecret
914%defattr(644,root,root,755)
915%attr(755,root,root) %{gitcoredir}/git-credential-libsecret
916%endif
This page took 0.495473 seconds and 4 git commands to generate.