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