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