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