]>
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 | %include /usr/lib/rpm/macros.perl | |
15 | Summary: Distributed version control system focused on speed, effectivity and usability | |
16 | Summary(pl.UTF-8): Rozproszony system śledzenia treści skupiony na szybkości, wydajności i użyteczności | |
17 | Name: git-core | |
18 | Version: 2.23.0 | |
19 | Release: 1 | |
20 | License: GPL v2 | |
21 | Group: Development/Tools | |
22 | Source0: http://www.kernel.org/pub/software/scm/git/git-%{version}.tar.xz | |
23 | # Source0-md5: 93ee0f867f81a39e0ef29eabfb1d2c5b | |
24 | Source1: %{name}-gitweb.conf | |
25 | Source2: %{name}-gitweb-httpd.conf | |
26 | Source3: %{name}-gitweb-lighttpd.conf | |
27 | Source4: %{name}.sysconfig | |
28 | Source5: %{name}.inet | |
29 | Source6: %{name}.init | |
30 | Source7: gitolite.pl | |
31 | Patch0: %{name}-key-bindings.patch | |
32 | Patch1: %{name}-sysconfdir.patch | |
33 | Patch2: cherry-picked-commitlog.patch | |
34 | URL: http://git-scm.com/ | |
35 | BuildRequires: autoconf >= 2.59 | |
36 | BuildRequires: automake | |
37 | BuildRequires: curl-devel | |
38 | BuildRequires: expat-devel | |
39 | %if "%{pld_release}" == "ac" | |
40 | BuildRequires: gettext-devel | |
41 | %else | |
42 | BuildRequires: gettext-tools | |
43 | %endif | |
44 | %if %{with gnome_keyring} || %{with libsecret} | |
45 | BuildRequires: glib2-devel >= 2.0 | |
46 | %endif | |
47 | %if %{with gnome_keyring} | |
48 | BuildRequires: libgnome-keyring-devel | |
49 | %endif | |
50 | %if %{with libsecret} | |
51 | BuildRequires: libsecret-devel | |
52 | %endif | |
53 | BuildRequires: openssl-devel | |
54 | %{?with_pcre:BuildRequires: pcre2-8-devel} | |
55 | BuildRequires: perl-Error > 0.15 | |
56 | BuildRequires: perl-MailTools | |
57 | BuildRequires: perl-base | |
58 | %if %{with gnome_keyring} || %{with libsecret} | |
59 | BuildRequires: pkgconfig | |
60 | %endif | |
61 | BuildRequires: python-devel | |
62 | BuildRequires: rpm-perlprov >= 4.1-13 | |
63 | BuildRequires: rpm-pythonprov | |
64 | BuildRequires: rpmbuild(macros) >= 1.673 | |
65 | %if %{with tk} | |
66 | # wish | |
67 | BuildRequires: tk | |
68 | %endif | |
69 | BuildRequires: zlib-devel | |
70 | %if %{with doc} | |
71 | BuildRequires: asciidoc >= 7.1.2-3 | |
72 | BuildRequires: docbook-dtd45-xml | |
73 | BuildRequires: xmlto | |
74 | %endif | |
75 | %if %{with tests} | |
76 | %if %{with tests_cvs} | |
77 | # tests failed sometimes when using nserver/cvsnt client so enforce pure cvs here | |
78 | BuildRequires: cvs-gnu-client < 1.13 | |
79 | BuildRequires: cvs-gnu-client >= 1.12 | |
80 | %endif | |
81 | %if %{with tests_svn} | |
82 | BuildRequires: perl-subversion | |
83 | BuildRequires: subversion | |
84 | %endif | |
85 | Conflicts: pdksh < 5.2.14-46 | |
86 | %endif | |
87 | # git-sh-setup: sane_grep | |
88 | Requires: grep | |
89 | # git-pull: printf | |
90 | Requires: coreutils | |
91 | Requires: sed | |
92 | Suggests: git-core-bzr | |
93 | Suggests: git-core-cvs | |
94 | Suggests: git-core-hg | |
95 | Suggests: git-core-p4 | |
96 | Suggests: git-core-svn | |
97 | Suggests: less | |
98 | Suggests: openssh-clients | |
99 | Suggests: perl-Git = %{version}-%{release} | |
100 | Suggests: rsync | |
101 | Obsoletes: git-core-gitview | |
102 | Obsoletes: python-Git | |
103 | Conflicts: perl-Git < %{version} | |
104 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
105 | ||
106 | # html docs have links to txt files | |
107 | %define _noautocompressdoc *.txt | |
108 | ||
109 | # do not generate perl dependency, git add -p support is optional | |
110 | # skip dependency generation from templates | |
111 | %define _noautoreqfiles %{_libexecdir}/%{name}/git-add--interactive %{_datadir}/%{name}/templates | |
112 | ||
113 | %define webapp gitweb | |
114 | %define webappdir %{_sysconfdir}/webapps/%{webapp} | |
115 | %define appdir %{_datadir}/%{webapp} | |
116 | %define cgibindir %{_prefix}/lib/cgi-bin | |
117 | %define gitcoredir %{_libexecdir}/%{name} | |
118 | ||
119 | %description | |
120 | "git" can mean anything, depending on your mood. | |
121 | ||
122 | - random three-letter combination that is pronounceable, and not | |
123 | actually used by any common UNIX command. The fact that it is a | |
124 | mispronunciation of "get" may or may not be relevant. | |
125 | - stupid. contemptible and despicable. simple. Take your pick from the | |
126 | dictionary of slang. | |
127 | - "global information tracker": you're in a good mood, and it actually | |
128 | works for you. Angels sing, and a light suddenly fills the room. | |
129 | - "goddamn idiotic truckload of sh*t": when it breaks | |
130 | ||
131 | This is a stupid (but extremely fast) directory content manager. It | |
132 | doesn't do a whole lot, but what it 'does' do is track directory | |
133 | contents efficiently. | |
134 | ||
135 | %description -l pl.UTF-8 | |
136 | "git" może oznaczać cokolwiek, w zależności od nastroju. | |
137 | ||
138 | - losową kombinację trzech liter, która jest wymawialna i właściwie | |
139 | nie używana przez żadne popularne polecenie uniksowe. Fakt, że jest to | |
140 | błędna pisownia słowa "get" może mieć lub nie mieć znaczenia. | |
141 | - głupi, pogardliwy, prosty. Można wybrać ze słownika slangu. | |
142 | - "global information tracker" (narzędzie do globalnego śledzenia | |
143 | informacji) - jeśli jesteśmy w dobrym nastroju i git akurat działa. | |
144 | Anioły śpiewają, a światło niespodziewanie wypełnia pokój. | |
145 | - "goddamn idiotic truckload of sh*t" (przeklęty idiotyczny ładunek | |
146 | g*) - kiedy się zepsuje. | |
147 | ||
148 | Jest to prymitywny (ale bardzo szybki) zarządca treści słownikowej. | |
149 | Nie robi wiele, ale to, co "robi", to wydajne śledzenie zawartości | |
150 | katalogu. | |
151 | ||
152 | %package doc | |
153 | Summary: Documentation for git-core | |
154 | Summary(pl.UTF-8): Dokumentacja do git-core | |
155 | Group: Documentation | |
156 | %if "%{_rpmversion}" >= "5" | |
157 | BuildArch: noarch | |
158 | %endif | |
159 | ||
160 | %description doc | |
161 | Documentation for git-core. | |
162 | ||
163 | %description doc -l pl.UTF-8 | |
164 | Dokumentacja do git-core. | |
165 | ||
166 | %package daemon-inetd | |
167 | Summary: Files necessary to run git-daemon as an inetd service | |
168 | Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi inetd | |
169 | Group: Networking/Daemons | |
170 | Requires: %{name} = %{version}-%{release} | |
171 | Requires: setup >= 2.4.11-1 | |
172 | Provides: git-core-daemon | |
173 | Obsoletes: git-core-daemon | |
174 | Obsoletes: git-core-daemon-standalone | |
175 | ||
176 | %description daemon-inetd | |
177 | Git-daemon is a really simple TCP git daemon that can serve git | |
178 | repositories. This package provides all necessarry files to run | |
179 | git-daemon as an inetd service. | |
180 | ||
181 | %description daemon-inetd -l pl.UTF-8 | |
182 | Git-daemon to prosty demon git korzystający z protokołu TCP do | |
183 | udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne | |
184 | do uruchomienia git-demona w trybie usługi inetd. | |
185 | ||
186 | %package daemon-standalone | |
187 | Summary: Files necessary to run git-daemon as a standalone service | |
188 | Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi samodzielnej | |
189 | Group: Networking/Daemons | |
190 | Requires: %{name} = %{version}-%{release} | |
191 | Provides: git-core-daemon | |
192 | Obsoletes: git-core-daemon | |
193 | Obsoletes: git-core-daemon-inetd | |
194 | ||
195 | %description daemon-standalone | |
196 | Git-daemon is a really simple TCP git daemon that can serve git | |
197 | repositories. This package provides all necessarry files to run | |
198 | git-daemon as an standalone service. | |
199 | ||
200 | %description daemon-standalone -l pl.UTF-8 | |
201 | Git-daemon to prosty demon git korzystający z protokołu TCP do | |
202 | udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne | |
203 | do uruchomienia git-daemona w trybie usługi samodzielnej. | |
204 | ||
205 | %package devel | |
206 | Summary: Git library with header files | |
207 | Summary(pl.UTF-8): Biblioteka Gita oraz pliki nagłówkowe | |
208 | Group: Development/Libraries | |
209 | Requires: zlib-devel | |
210 | ||
211 | %description devel | |
212 | Git library with header files. | |
213 | ||
214 | %description devel -l pl.UTF-8 | |
215 | Biblioteka Gita oraz pliki nagłówkowe. | |
216 | ||
217 | %package gitk | |
218 | Summary: Tcl/Tk interface to the Git version control system | |
219 | Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git | |
220 | Group: Development/Tools | |
221 | Requires: %{name} = %{version}-%{release} | |
222 | Requires: tk | |
223 | %if "%{_rpmversion}" >= "5" | |
224 | BuildArch: noarch | |
225 | %endif | |
226 | ||
227 | %description gitk | |
228 | gitk displays changes in a repository or a selected set of commits. | |
229 | This includes visualizing the commit graph, showing information | |
230 | related to each commit, and the files in the trees of each revision. | |
231 | ||
232 | Historically, gitk was the first repository browser. It's written in | |
233 | Tcl/Tk and started off in a separate repository but was later merged | |
234 | into the main git repository. | |
235 | ||
236 | %description gitk -l pl.UTF-8 | |
237 | gitk wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. | |
238 | Oznacza to wizualizację grafu commitów, wyświetlanie informacji | |
239 | związanych z każdym z commitów oraz listę plików dla każdej rewizji. | |
240 | ||
241 | Z historycznego punktu widzenia gitk był pierwszą przeglądarką | |
242 | repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w | |
243 | osobnym repozytorium, ale z czasem został włączony do głównego | |
244 | repozytorium gita. | |
245 | ||
246 | %package gitweb | |
247 | Summary: Web frontend to git | |
248 | Summary(pl.UTF-8): Frontend WWW do gita | |
249 | Group: Development/Tools | |
250 | Requires: %{name} = %{version}-%{release} | |
251 | Requires: webapps | |
252 | Requires: webserver(access) | |
253 | Requires: webserver(alias) | |
254 | Requires: webserver(cgi) | |
255 | Suggests: webserver(setenv) | |
256 | ||
257 | %description gitweb | |
258 | This package provides a web interface for browsing git repositories. | |
259 | ||
260 | %description gitweb -l pl.UTF-8 | |
261 | Pakiet ten dostarcza interfejs WWW do przeglądania repozytoriów gita. | |
262 | ||
263 | %package gui | |
264 | Summary: Tcl/Tk interface to the Git version control system | |
265 | Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git | |
266 | Group: Development/Tools | |
267 | Requires: %{name} = %{version}-%{release} | |
268 | Requires: tk | |
269 | Requires: xdg-utils | |
270 | Suggests: meld | |
271 | ||
272 | %description gui | |
273 | Displays changes in a repository or a selected set of commits. This | |
274 | includes visualizing the commit graph, showing information related to | |
275 | each commit, and the files in the trees of each revision. | |
276 | ||
277 | Historically, gitk was the first repository browser. It's written in | |
278 | Tcl/Tk and started off in a separate repository but was later merged | |
279 | into the main git repository. | |
280 | ||
281 | %description gui -l pl.UTF-8 | |
282 | Wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. Oznacza | |
283 | to wizualizację grafu commitów, wyświetlanie informacji związanych z | |
284 | każdym z commitów oraz listę plików dla każdej rewizji. | |
285 | ||
286 | Z punktu widzenia historii, gitk był pierwszą przeglądarką | |
287 | repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w | |
288 | osobnym repozytorium, ale z czasem został włączony do głównego | |
289 | repozytorium gita. | |
290 | ||
291 | %package arch | |
292 | Summary: Git tools for importing Arch repositories | |
293 | Summary(pl.UTF-8): Narzędzia Gita do importowania repozytoriów Archa | |
294 | Group: Development/Tools | |
295 | Requires: %{name} = %{version}-%{release} | |
296 | Requires: tla | |
297 | ||
298 | %description arch | |
299 | Git tools for importing Arch repositories. | |
300 | ||
301 | %description arch -l pl.UTF-8 | |
302 | Narzędzia Gita do importowania repozytoriów Archa. | |
303 | ||
304 | %package bzr | |
305 | Summary: Git tools for working with bzr repositories | |
306 | Summary(pl.UTF-8): Narzędzia Gita do pracy z repozytoriami bzr | |
307 | Group: Development/Tools | |
308 | Requires: %{name} = %{version}-%{release} | |
309 | Requires: bzr | |
310 | ||
311 | %description bzr | |
312 | Git tools for working with bzr repositories. | |
313 | ||
314 | %description bzr -l pl.UTF-8 | |
315 | Narzędzia Gita do pracy z repozytoriami bzr. | |
316 | ||
317 | %package cvs | |
318 | Summary: CVS support for Git | |
319 | Summary(pl.UTF-8): Obsługa CVS dla Gita | |
320 | Group: Development/Tools | |
321 | Requires: %{name} = %{version}-%{release} | |
322 | Requires: cvsps >= 2.1-2 | |
323 | Requires: rcs | |
324 | ||
325 | %description cvs | |
326 | CVS support for Git. | |
327 | ||
328 | %description cvs -l pl.UTF-8 | |
329 | Obsługa CVS dla Gita. | |
330 | ||
331 | %package hg | |
332 | Summary: Git tools for working with mercurial repositories | |
333 | Summary(pl.UTF-8): Narzędzia Gita do pracy z repozytoriami mercuriala | |
334 | Group: Development/Tools | |
335 | Requires: %{name} = %{version}-%{release} | |
336 | Requires: mercurial >= 1.8 | |
337 | ||
338 | %description hg | |
339 | Git tools for working with mercurial repositories. | |
340 | ||
341 | %description hg -l pl.UTF-8 | |
342 | Narzędzia Gita do pracy z repozytoriami mercuriala. | |
343 | ||
344 | %package p4 | |
345 | Summary: Git tools for working with Perforce depots | |
346 | Summary(pl.UTF-8): Narzędzia Gita do pracy z magazynami Perforce'a | |
347 | Group: Development/Tools | |
348 | Requires: %{name} = %{version}-%{release} | |
349 | ||
350 | %description p4 | |
351 | Git tools for working with Perforce depots. | |
352 | ||
353 | %description p4 -l pl.UTF-8 | |
354 | Narzędzia Gita do pracy z magazynami Perforce'a. | |
355 | ||
356 | %package svn | |
357 | Summary: Subversion support for Git | |
358 | Summary(pl.UTF-8): Obsługa Subversion dla Gita | |
359 | Group: Development/Tools | |
360 | Requires: %{name} = %{version}-%{release} | |
361 | Requires: perl-Encode | |
362 | Requires: perl-Term-ReadKey | |
363 | ||
364 | %description svn | |
365 | Subversion support for Git. | |
366 | ||
367 | %description svn -l pl.UTF-8 | |
368 | Obsługa Subversion dla Gita. | |
369 | ||
370 | %package email | |
371 | Summary: Git tools for sending email | |
372 | Summary(pl.UTF-8): Narzędzia Gita do wysyłania poczty | |
373 | Group: Development/Tools | |
374 | Requires: %{name} = %{version}-%{release} | |
375 | Requires: perl-Error | |
376 | Requires: perl-MailTools | |
377 | Suggests: perl-Net-SMTP-SSL | |
378 | ||
379 | %description email | |
380 | Git tools for sending email. | |
381 | ||
382 | %description email -l pl.UTF-8 | |
383 | Narzędzia Gita do wysyłania poczty. | |
384 | ||
385 | %package -n bash-completion-git | |
386 | Summary: bash-completion for git | |
387 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gita | |
388 | Group: Applications/Shells | |
389 | Requires: %{name} = %{version}-%{release} | |
390 | Requires: bash-completion >= 2.0 | |
391 | %if "%{_rpmversion}" >= "5" | |
392 | BuildArch: noarch | |
393 | %endif | |
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 | Obsoletes: perl-git-core | |
406 | %if "%{_rpmversion}" >= "5" | |
407 | BuildArch: noarch | |
408 | %endif | |
409 | ||
410 | %description -n perl-Git | |
411 | This module provides Perl scripts easy way to interface the Git | |
412 | version control system. The modules have an easy and well-tested way | |
413 | to call arbitrary Git commands; in the future, the interface will also | |
414 | provide specialized methods for doing easily operations which are not | |
415 | totally trivial to do over the generic command interface. | |
416 | ||
417 | %description -n perl-Git -l pl.UTF-8 | |
418 | Ten moduł umożliwia skryptom Perla współpracę z systemem kontroli | |
419 | wersji Git. W łatwy i dobrze przetestowany sposób pozwala wywoływać | |
420 | dowolne polecenia Gita; w przyszłości interfejs udostępni także | |
421 | specjalne metody do łatwego wykonywania operacji nietrywialnych do | |
422 | wykonania przy użyciu ogólnego interfejsu poleceń. | |
423 | ||
424 | %package -n gnome-keyring-git-core | |
425 | Summary: GNOME Keyring authentication provider for Git | |
426 | Summary(pl.UTF-8): Moduł uwierzytelniający GNOME Keyring dla Gita | |
427 | Group: X11/Applications | |
428 | URL: http://git-scm.com/docs/gitcredentials.html | |
429 | Requires: %{name} = %{version}-%{release} | |
430 | ||
431 | %description -n gnome-keyring-git-core | |
432 | Authentication provider module for Git which allows git client to | |
433 | authenticate using GNOME Keyring. | |
434 | ||
435 | You need to register it with: | |
436 | - git config --global credential.helper gnome-keyring | |
437 | ||
438 | %description -n gnome-keyring-git-core -l pl.UTF-8 | |
439 | Moduł uwierzytelniający dla Gita pozwalający klientom git | |
440 | uwierzytelniać się przy użyciu mechanizmu GNOME Keyring. | |
441 | ||
442 | Moduł trzeba zarejestrować poleceniem: | |
443 | - git config --global credential.helper gnome-keyring | |
444 | ||
445 | %package credential-libsecret | |
446 | Summary: GNOME authentication provider for Git using libsecret | |
447 | Summary(pl.UTF-8): Moduł uwierzytelniający GNOME dla Gita wykorzystujący libsecret | |
448 | Group: X11/Applications | |
449 | URL: http://git-scm.com/docs/gitcredentials.html | |
450 | Requires: %{name} = %{version}-%{release} | |
451 | ||
452 | %description credential-libsecret | |
453 | Authentication provider module for Git which allows git client to | |
454 | authenticate using GNOME libsecret. | |
455 | ||
456 | You need to register it with: | |
457 | - git config --global credential.helper libsecret | |
458 | ||
459 | %description credential-libsecret -l pl.UTF-8 | |
460 | Moduł uwierzytelniający dla Gita pozwalający klientom git | |
461 | uwierzytelniać się przy użyciu mechanizmu GNOME libsecret. | |
462 | ||
463 | Moduł trzeba zarejestrować poleceniem: | |
464 | - git config --global credential.helper libsecret | |
465 | ||
466 | %prep | |
467 | %setup -q -n git-%{version} | |
468 | %patch0 -p0 | |
469 | %patch1 -p1 | |
470 | %patch2 -p1 | |
471 | ||
472 | %{__rm} {Documentation/technical,contrib/credential/gnome-keyring}/.gitignore | |
473 | ||
474 | # we build things in contrib but want to have it clean for doc purporses, too | |
475 | cp -a contrib contrib-doc | |
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 daemon-inetd | |
645 | %service -q rc-inetd reload | |
646 | ||
647 | %postun daemon-inetd | |
648 | if [ "$1" = "0" ]; then | |
649 | %service -q rc-inetd reload | |
650 | fi | |
651 | ||
652 | %post daemon-standalone | |
653 | /sbin/chkconfig --add git-daemon | |
654 | %service git-daemon restart "git-daemon" | |
655 | ||
656 | %preun daemon-standalone | |
657 | if [ "$1" = "0" ]; then | |
658 | %service git-daemon stop | |
659 | /sbin/chkconfig --del git-daemon | |
660 | fi | |
661 | ||
662 | %triggerin gitweb -- apache1 < 1.3.37-3, apache1-base | |
663 | %webapp_register apache %{webapp} | |
664 | ||
665 | %triggerun gitweb -- apache1 < 1.3.37-3, apache1-base | |
666 | %webapp_unregister apache %{webapp} | |
667 | ||
668 | %triggerin gitweb -- apache < 2.2.0, apache-base | |
669 | %webapp_register httpd %{webapp} | |
670 | ||
671 | %triggerun gitweb -- apache < 2.2.0, apache-base | |
672 | %webapp_unregister httpd %{webapp} | |
673 | ||
674 | %triggerin gitweb -- lighttpd | |
675 | %webapp_register lighttpd %{webapp} | |
676 | ||
677 | %triggerun gitweb -- lighttpd | |
678 | %webapp_unregister lighttpd %{webapp} | |
679 | ||
680 | %files -f git.lang | |
681 | %defattr(644,root,root,755) | |
682 | %doc README.md contrib-doc | |
683 | %attr(755,root,root) %{_bindir}/git | |
684 | %attr(755,root,root) %{_bindir}/git-receive-pack | |
685 | %attr(755,root,root) %{_bindir}/git-shell | |
686 | %attr(755,root,root) %{_bindir}/git-upload-archive | |
687 | %attr(755,root,root) %{_bindir}/git-upload-pack | |
688 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name} | |
689 | ||
690 | %if %{with doc} | |
691 | %{_mandir}/man1/git-*.1* | |
692 | %exclude %{_mandir}/man1/git-archimport.1* | |
693 | %exclude %{_mandir}/man1/git-svn.1* | |
694 | %exclude %{_mandir}/man1/git-cvs*.1* | |
695 | %exclude %{_mandir}/man1/git-imap-send*.1* | |
696 | %exclude %{_mandir}/man1/*email*.1* | |
697 | %{_mandir}/man1/git.1* | |
698 | %{_mandir}/man5/gitattributes.5* | |
699 | %{_mandir}/man5/githooks.5* | |
700 | %{_mandir}/man5/gitignore.5* | |
701 | %{_mandir}/man5/gitmodules.5* | |
702 | %{_mandir}/man5/gitrepository-layout.5* | |
703 | %{_mandir}/man7/gitcli.7* | |
704 | %{_mandir}/man7/gitcore-tutorial.7* | |
705 | %{_mandir}/man7/gitcredentials.7* | |
706 | %{_mandir}/man7/gitdiffcore.7* | |
707 | %{_mandir}/man7/giteveryday.7* | |
708 | %{_mandir}/man7/gitglossary.7* | |
709 | %{_mandir}/man7/gitnamespaces.7* | |
710 | %{_mandir}/man7/gitremote-helpers.7* | |
711 | %{_mandir}/man7/gitrevisions.7* | |
712 | %{_mandir}/man7/gitsubmodules.7* | |
713 | %{_mandir}/man7/gittutorial-2.7* | |
714 | %{_mandir}/man7/gittutorial.7* | |
715 | %{_mandir}/man7/gitworkflows.7* | |
716 | %endif | |
717 | ||
718 | %dir %{gitcoredir} | |
719 | %attr(755,root,root) %{gitcoredir}/*-* | |
720 | %attr(755,root,root) %{gitcoredir}/git | |
721 | %dir %{gitcoredir}/mergetools | |
722 | %{gitcoredir}/mergetools/* | |
723 | ||
724 | %{_datadir}/%{name} | |
725 | %{_localstatedir}/lib/git | |
726 | ||
727 | # subpackages | |
728 | %exclude %{gitcoredir}/*email* | |
729 | %exclude %{gitcoredir}/*p4* | |
730 | %exclude %{gitcoredir}/git-archimport | |
731 | %exclude %{gitcoredir}/git-citool | |
732 | %exclude %{gitcoredir}/git-cvs* | |
733 | %exclude %{gitcoredir}/git-gui | |
734 | %exclude %{gitcoredir}/git-imap-send | |
735 | %exclude %{gitcoredir}/git-instaweb | |
736 | %exclude %{gitcoredir}/git-remote-bzr | |
737 | %exclude %{gitcoredir}/git-remote-hg | |
738 | %exclude %{gitcoredir}/git-remote-testsvn | |
739 | %exclude %{gitcoredir}/git-svn | |
740 | %exclude %{gitcoredir}/mergetools/p4merge | |
741 | %if %{with gnome_keyring} | |
742 | %exclude %{gitcoredir}/git-credential-gnome-keyring | |
743 | %endif | |
744 | %if %{with libsecret} | |
745 | %exclude %{gitcoredir}/git-credential-libsecret | |
746 | %endif | |
747 | ||
748 | %if %{with doc} | |
749 | %files doc | |
750 | %defattr(644,root,root,755) | |
751 | %doc Documentation/RelNotes* | |
752 | %doc Documentation/*.html Documentation/howto Documentation/technical | |
753 | %endif | |
754 | ||
755 | %files daemon-inetd | |
756 | %defattr(644,root,root,755) | |
757 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/git-daemon | |
758 | ||
759 | %files daemon-standalone | |
760 | %defattr(644,root,root,755) | |
761 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/git-daemon | |
762 | %attr(754,root, root) /etc/rc.d/init.d/git-daemon | |
763 | ||
764 | %files devel | |
765 | %defattr(644,root,root,755) | |
766 | %{_includedir}/%{name} | |
767 | %{_libdir}/libgit.a | |
768 | %{_libdir}/libgit_xdiff.a | |
769 | ||
770 | %if %{with tk} | |
771 | %files gitk | |
772 | %defattr(644,root,root,755) | |
773 | %if %{with doc} | |
774 | %{_mandir}/man1/gitk.1* | |
775 | %endif | |
776 | %attr(755,root,root) %{_bindir}/gitk | |
777 | %dir %{_datadir}/gitk | |
778 | %dir %{_datadir}/gitk/lib | |
779 | %dir %{_datadir}/gitk/lib/msgs | |
780 | %lang(bg) %{_datadir}/gitk/lib/msgs/bg.msg | |
781 | %lang(ca) %{_datadir}/gitk/lib/msgs/ca.msg | |
782 | %lang(de) %{_datadir}/gitk/lib/msgs/de.msg | |
783 | %lang(es) %{_datadir}/gitk/lib/msgs/es.msg | |
784 | %lang(fr) %{_datadir}/gitk/lib/msgs/fr.msg | |
785 | %lang(hu) %{_datadir}/gitk/lib/msgs/hu.msg | |
786 | %lang(it) %{_datadir}/gitk/lib/msgs/it.msg | |
787 | %lang(ja) %{_datadir}/gitk/lib/msgs/ja.msg | |
788 | %lang(pt_BR) %{_datadir}/gitk/lib/msgs/pt_br.msg | |
789 | %lang(pt_PT) %{_datadir}/gitk/lib/msgs/pt_pt.msg | |
790 | %lang(ru) %{_datadir}/gitk/lib/msgs/ru.msg | |
791 | %lang(sv) %{_datadir}/gitk/lib/msgs/sv.msg | |
792 | %lang(vi) %{_datadir}/gitk/lib/msgs/vi.msg | |
793 | %endif | |
794 | ||
795 | %files gitweb | |
796 | %defattr(644,root,root,755) | |
797 | %doc gitweb/{README,INSTALL} | |
798 | %dir %{webappdir} | |
799 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf | |
800 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf | |
801 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/lighttpd.conf | |
802 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitweb.conf | |
803 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitolite.pl | |
804 | %attr(755,root,root) %{cgibindir}/gitweb.cgi | |
805 | %{appdir} | |
806 | %attr(755,root,root) %{gitcoredir}/git-instaweb | |
807 | %if %{with doc} | |
808 | %{_mandir}/man1/gitweb.1* | |
809 | %{_mandir}/man5/gitweb.conf.5* | |
810 | %endif | |
811 | ||
812 | %if %{with tk} | |
813 | %files gui | |
814 | %defattr(644,root,root,755) | |
815 | %attr(755,root,root) %{gitcoredir}/git-citool | |
816 | %attr(755,root,root) %{gitcoredir}/git-gui | |
817 | %dir %{_datadir}/git-gui | |
818 | %dir %{_datadir}/git-gui/lib | |
819 | %dir %{_datadir}/git-gui/lib/msgs | |
820 | %{_datadir}/git-gui/lib/git-gui.ico | |
821 | %{_datadir}/git-gui/lib/tclIndex | |
822 | %{_datadir}/git-gui/lib/*.js | |
823 | %{_datadir}/git-gui/lib/*.tcl | |
824 | %lang(bg) %{_datadir}/git-gui/lib/msgs/bg.msg | |
825 | %lang(de) %{_datadir}/git-gui/lib/msgs/de.msg | |
826 | %lang(el) %{_datadir}/git-gui/lib/msgs/el.msg | |
827 | %lang(fr) %{_datadir}/git-gui/lib/msgs/fr.msg | |
828 | %lang(hu) %{_datadir}/git-gui/lib/msgs/hu.msg | |
829 | %lang(it) %{_datadir}/git-gui/lib/msgs/it.msg | |
830 | %lang(ja) %{_datadir}/git-gui/lib/msgs/ja.msg | |
831 | %lang(nb) %{_datadir}/git-gui/lib/msgs/nb.msg | |
832 | %lang(pt) %{_datadir}/git-gui/lib/msgs/pt_pt.msg | |
833 | %lang(pt_BR) %{_datadir}/git-gui/lib/msgs/pt_br.msg | |
834 | %lang(ru) %{_datadir}/git-gui/lib/msgs/ru.msg | |
835 | %lang(sv) %{_datadir}/git-gui/lib/msgs/sv.msg | |
836 | %lang(vi) %{_datadir}/git-gui/lib/msgs/vi.msg | |
837 | %lang(zh_CN) %{_datadir}/git-gui/lib/msgs/zh_cn.msg | |
838 | %endif | |
839 | ||
840 | %files arch | |
841 | %defattr(644,root,root,755) | |
842 | %attr(755,root,root) %{gitcoredir}/git-archimport | |
843 | %if %{with doc} | |
844 | %{_mandir}/man1/git-archimport.1* | |
845 | %endif | |
846 | ||
847 | %files bzr | |
848 | %defattr(644,root,root,755) | |
849 | %attr(755,root,root) %{gitcoredir}/git-remote-bzr | |
850 | ||
851 | %files cvs | |
852 | %defattr(644,root,root,755) | |
853 | %attr(755,root,root) %{_bindir}/git-cvsserver | |
854 | %attr(755,root,root) %{gitcoredir}/git-cvs* | |
855 | %if %{with doc} | |
856 | %{_mandir}/man1/git-cvs*.1* | |
857 | %{_mandir}/man7/gitcvs-migration.7* | |
858 | %endif | |
859 | ||
860 | %files hg | |
861 | %defattr(644,root,root,755) | |
862 | %attr(755,root,root) %{gitcoredir}/git-remote-hg | |
863 | ||
864 | %files p4 | |
865 | %defattr(644,root,root,755) | |
866 | %attr(755,root,root) %{gitcoredir}/git-p4 | |
867 | %attr(755,root,root) %{gitcoredir}/mergetools/p4merge | |
868 | ||
869 | %files svn | |
870 | %defattr(644,root,root,755) | |
871 | %attr(755,root,root) %{gitcoredir}/git-svn | |
872 | %attr(755,root,root) %{gitcoredir}/git-remote-testsvn | |
873 | %{perl_vendorlib}/Git/SVN | |
874 | %{perl_vendorlib}/Git/SVN.pm | |
875 | %if %{with doc} | |
876 | %{_mandir}/man1/git-svn.1* | |
877 | %endif | |
878 | ||
879 | %files email | |
880 | %defattr(644,root,root,755) | |
881 | %attr(755,root,root) %{gitcoredir}/git-imap-send | |
882 | %attr(755,root,root) %{gitcoredir}/*email* | |
883 | %if %{with doc} | |
884 | %{_mandir}/man1/*email*.1* | |
885 | %{_mandir}/man1/*imap-send*.1* | |
886 | %endif | |
887 | ||
888 | %files -n bash-completion-git | |
889 | %defattr(644,root,root,755) | |
890 | %{bash_compdir}/git | |
891 | ||
892 | %files -n perl-Git | |
893 | %defattr(644,root,root,755) | |
894 | %{perl_vendorlib}/Git.pm | |
895 | %dir %{perl_vendorlib}/Git | |
896 | %{perl_vendorlib}/Git/I18N.pm | |
897 | %{perl_vendorlib}/Git/IndexInfo.pm | |
898 | %{perl_vendorlib}/Git/LoadCPAN.pm | |
899 | %{perl_vendorlib}/Git/Packet.pm | |
900 | %dir %{perl_vendorlib}/Git/LoadCPAN | |
901 | %{perl_vendorlib}/Git/LoadCPAN/Error.pm | |
902 | %dir %{perl_vendorlib}/Git/LoadCPAN/Mail | |
903 | %{perl_vendorlib}/Git/LoadCPAN/Mail/Address.pm | |
904 | %{_mandir}/man3/Git.3pm* | |
905 | ||
906 | %if %{with gnome_keyring} | |
907 | %files -n gnome-keyring-git-core | |
908 | %defattr(644,root,root,755) | |
909 | %attr(755,root,root) %{gitcoredir}/git-credential-gnome-keyring | |
910 | %endif | |
911 | ||
912 | %if %{with libsecret} | |
913 | %files credential-libsecret | |
914 | %defattr(644,root,root,755) | |
915 | %attr(755,root,root) %{gitcoredir}/git-credential-libsecret | |
916 | %endif |