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