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