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