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