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