]>
Commit | Line | Data |
---|---|---|
84013e7c | 1 | # |
891d0b05 | 2 | # Conditional build: |
f74aede9 JB |
3 | %bcond_without tests # don't perform make test |
4 | %bcond_with tests_cvs # perform tests which use CVS | |
843d1d47 | 5 | %bcond_without tests_svn # perform tests which use subversion |
f74aede9 | 6 | %bcond_without doc # skip building/packaging docs/manuals (takes some time) |
f1ced26c | 7 | %bcond_without pcre # perl-compatible regexes support |
cdeb0400 | 8 | |
89a476f8 | 9 | %include /usr/lib/rpm/macros.perl |
479de23d AM |
10 | Summary: Distributed version control system focused on speed, effectivity and usability |
11 | Summary(pl.UTF-8): Rozproszony system śledzenia treści skupiony na szybkości, wydajności i użyteczności | |
51c3b977 | 12 | Name: git-core |
5b152f39 | 13 | Version: 1.8.5.3 |
0d2db069 | 14 | Release: 2 |
51c3b977 | 15 | License: GPL v2 |
16 | Group: Development/Tools | |
5013f7fc | 17 | Source0: http://git-core.googlecode.com/files/git-%{version}.tar.gz |
5b152f39 | 18 | # Source0-md5: 57b966065882f83ef5879620a1e329ca |
be2ccf99 | 19 | Source1: %{name}-gitweb.conf |
814a047c | 20 | Source2: %{name}-gitweb-httpd.conf |
51ce768a KK |
21 | Source3: %{name}-gitweb-lighttpd.conf |
22 | Source4: %{name}.sysconfig | |
23 | Source5: %{name}.inet | |
24 | Source6: %{name}.init | |
6b1e62ae | 25 | Patch0: %{name}-tests.patch |
b2c254f3 | 26 | Patch1: %{name}-key-bindings.patch |
d12d8532 | 27 | Patch2: %{name}-sysconfdir.patch |
8ce45cec | 28 | Patch3: cherry-picked-commitlog.patch |
b11f61e5 | 29 | Patch4: %{name}-svn-exit-errors.patch |
e699dd89 | 30 | URL: http://git-scm.com/ |
fdf2ed38 | 31 | BuildRequires: autoconf >= 2.59 |
11856720 | 32 | BuildRequires: automake |
51c3b977 | 33 | BuildRequires: curl-devel |
115484e9 | 34 | BuildRequires: expat-devel |
72ec88fd | 35 | BuildRequires: gettext-devel |
51c3b977 | 36 | BuildRequires: openssl-devel |
202eeb4b | 37 | %{?with_pcre:BuildRequires: pcre-devel} |
0f1e5795 | 38 | BuildRequires: perl-Error > 0.15 |
51c3b977 | 39 | BuildRequires: perl-base |
db444c11 | 40 | BuildRequires: python-devel |
89a476f8 | 41 | BuildRequires: rpm-perlprov >= 4.1-13 |
c841a4fc | 42 | BuildRequires: rpm-pythonprov |
be2ccf99 | 43 | BuildRequires: rpmbuild(macros) >= 1.264 |
b64915e8 | 44 | BuildRequires: tcl |
51c3b977 | 45 | BuildRequires: zlib-devel |
08cc92d7 ER |
46 | %if %{with doc} |
47 | BuildRequires: asciidoc >= 7.1.2-3 | |
c841a4fc | 48 | BuildRequires: docbook-dtd45-xml |
08cc92d7 ER |
49 | BuildRequires: xmlto |
50 | %endif | |
2c50f007 | 51 | %if %{with tests} |
db032591 | 52 | %if %{with tests_cvs} |
dfed7e92 | 53 | # tests failed sometimes when using nserver/cvsnt client so enforce pure cvs here |
3554b1a3 | 54 | BuildRequires: cvs-gnu-client < 1.13 |
2c0376c9 | 55 | BuildRequires: cvs-gnu-client >= 1.12 |
db032591 | 56 | %endif |
843d1d47 | 57 | %{?with_tests_svn:BuildRequires: subversion} |
1b3085ff | 58 | Conflicts: pdksh < 5.2.14-46 |
2c50f007 | 59 | %endif |
3f245fc5 | 60 | Requires: coreutils |
11856720 | 61 | Requires: diffutils |
3f245fc5 AM |
62 | Requires: findutils |
63 | Requires: grep | |
11856720 | 64 | Requires: openssh-clients |
f266cd28 | 65 | Requires: perl-Error |
7a437e6a | 66 | Requires: perl-Git = %{version}-%{release} |
3f245fc5 | 67 | Requires: sed |
0d2db069 | 68 | Suggests: git-core-bzr |
26361b03 | 69 | Suggests: git-core-cvs |
0d2db069 ER |
70 | Suggests: git-core-hg |
71 | Suggests: git-core-p4 | |
26361b03 | 72 | Suggests: git-core-svn |
d82521ea ER |
73 | Suggests: less |
74 | Suggests: rsync | |
a77c0aad | 75 | Obsoletes: python-Git |
51c3b977 | 76 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
77 | ||
19936745 AM |
78 | # html docs have links to txt files |
79 | %define _noautocompressdoc *.txt | |
80 | ||
be2ccf99 AG |
81 | %define webapp gitweb |
82 | %define webappdir %{_sysconfdir}/webapps/%{webapp} | |
83 | %define appdir %{_datadir}/%{webapp} | |
84 | %define cgibindir %{_prefix}/lib/cgi-bin | |
1db8400f | 85 | %define bash_compdir %{_datadir}/bash-completion/completions |
be2ccf99 | 86 | |
51c3b977 | 87 | %description |
88 | "git" can mean anything, depending on your mood. | |
89 | ||
d52424f5 | 90 | - random three-letter combination that is pronounceable, and not |
91 | actually used by any common UNIX command. The fact that it is a | |
92 | mispronunciation of "get" may or may not be relevant. | |
93 | - stupid. contemptible and despicable. simple. Take your pick from the | |
94 | dictionary of slang. | |
95 | - "global information tracker": you're in a good mood, and it actually | |
96 | works for you. Angels sing, and a light suddenly fills the room. | |
97 | - "goddamn idiotic truckload of sh*t": when it breaks | |
51c3b977 | 98 | |
c751087d | 99 | This is a stupid (but extremely fast) directory content manager. It |
51c3b977 | 100 | doesn't do a whole lot, but what it 'does' do is track directory |
101 | contents efficiently. | |
102 | ||
ea061c99 JR |
103 | %description -l pl.UTF-8 |
104 | "git" może oznaczać cokolwiek, w zależności od nastroju. | |
105 | ||
d52424f5 | 106 | - losową kombinację trzech liter, która jest wymawialna i właściwie |
107 | nie używana przez żadne popularne polecenie uniksowe. Fakt, że jest to | |
108 | błędna pisownia słowa "get" może mieć lub nie mieć znaczenia. | |
109 | - głupi, pogardliwy, prosty. Można wybrać ze słownika slangu. | |
110 | - "global information tracker" (narzędzie do globalnego śledzenia | |
111 | informacji) - jeśli jesteśmy w dobrym nastroju i git akurat działa. | |
112 | Anioły śpiewają, a światło niespodziewanie wypełnia pokój. | |
113 | - "goddamn idiotic truckload of sh*t" (przeklęty idiotyczny ładunek | |
114 | g*) - kiedy się zepsuje. | |
ea061c99 JR |
115 | |
116 | Jest to prymitywny (ale bardzo szybki) zarządca treści słownikowej. | |
117 | Nie robi wiele, ale to, co "robi", to wydajne śledzenie zawartości | |
c751087d JB |
118 | katalogu. |
119 | ||
a8655d02 ER |
120 | %package doc |
121 | Summary: Documentation for git-core | |
122 | Summary(pl.UTF-8): Dokumentacja do git-core | |
123 | Group: Documentation | |
124 | ||
125 | %description doc | |
126 | Documentation for git-core. | |
127 | ||
128 | %description doc -l pl.UTF-8 | |
129 | Dokumentacja do git-core. | |
130 | ||
131 | %description doc -l fr.UTF-8 | |
132 | Javadoc pour git-core. | |
133 | ||
b11ada2c AG |
134 | %package daemon-inetd |
135 | Summary: Files necessary to run git-daemon as an inetd service | |
5db07614 | 136 | Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi inetd |
b11ada2c AG |
137 | Group: Networking/Daemons |
138 | Requires: %{name} = %{version}-%{release} | |
139 | Requires: setup >= 2.4.11-1 | |
140 | Provides: git-core-daemon | |
141 | Obsoletes: git-core-daemon | |
142 | Obsoletes: git-core-daemon-standalone | |
143 | ||
144 | %description daemon-inetd | |
145 | Git-daemon is a really simple TCP git daemon that can serve git | |
146 | repositories. This package provides all necessarry files to run | |
147 | git-daemon as an inetd service. | |
148 | ||
149 | %description daemon-inetd -l pl.UTF-8 | |
5db07614 JB |
150 | Git-daemon to prosty demon git korzystający z protokołu TCP do |
151 | udostępniania repozytoriów git. Ten pakiet dostarcza pliki potrzebne | |
152 | do uruchomienia git-demona w trybie usługi inetd. | |
b11ada2c AG |
153 | |
154 | %package daemon-standalone | |
155 | Summary: Files necessary to run git-daemon as a standalone service | |
5db07614 | 156 | Summary(pl.UTF-8): Pliki niezbędne do uruchomienia git-daemona w trybie usługi samodzielnej |
b11ada2c AG |
157 | Group: Networking/Daemons |
158 | Requires: %{name} = %{version}-%{release} | |
159 | Provides: git-core-daemon | |
160 | Obsoletes: git-core-daemon | |
161 | Obsoletes: git-core-daemon-inetd | |
162 | ||
163 | %description daemon-standalone | |
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 standalone service. | |
167 | ||
168 | %description daemon-standalone -l pl.UTF-8 | |
5db07614 JB |
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-daemona w trybie usługi samodzielnej. | |
b11ada2c | 172 | |
e3cefa79 | 173 | %package devel |
8bed7625 JB |
174 | Summary: Git library with header files |
175 | Summary(pl.UTF-8): Biblioteka Gita oraz pliki nagłówkowe | |
66a7f095 | 176 | Group: Development/Libraries |
d52424f5 | 177 | Requires: zlib-devel |
e3cefa79 | 178 | |
179 | %description devel | |
8bed7625 | 180 | Git library with header files. |
66a7f095 | 181 | |
ea061c99 | 182 | %description devel -l pl.UTF-8 |
8bed7625 | 183 | Biblioteka Gita oraz pliki nagłówkowe. |
e3cefa79 | 184 | |
91396e2e AG |
185 | %package gitk |
186 | Summary: Tcl/Tk interface to the Git version control system | |
187 | Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git | |
188 | Group: Development/Tools | |
189 | Requires: %{name} = %{version}-%{release} | |
190 | Requires: tk | |
191 | ||
192 | %description gitk | |
1fcd08a6 JB |
193 | gitk displays changes in a repository or a selected set of commits. |
194 | This includes visualizing the commit graph, showing information | |
195 | related to each commit, and the files in the trees of each revision. | |
91396e2e AG |
196 | |
197 | Historically, gitk was the first repository browser. It's written in | |
04fdf912 | 198 | Tcl/Tk and started off in a separate repository but was later merged |
91396e2e AG |
199 | into the main git repository. |
200 | ||
201 | %description gitk -l pl.UTF-8 | |
1fcd08a6 JB |
202 | gitk wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. |
203 | Oznacza to wizualizację grafu commitów, wyświetlanie informacji | |
204 | związanych z każdym z commitów oraz listę plików dla każdej rewizji. | |
91396e2e | 205 | |
1fcd08a6 | 206 | Z historycznego punktu widzenia gitk był pierwszą przeglądarką |
02059138 ER |
207 | repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w |
208 | osobnym repozytorium, ale z czasem został włączony do głównego | |
2712fe7b | 209 | repozytorium gita. |
91396e2e | 210 | |
be2ccf99 AG |
211 | %package gitweb |
212 | Summary: Web frontend to git | |
41b5f4b1 | 213 | Summary(pl.UTF-8): Frontend WWW do gita |
be2ccf99 AG |
214 | Group: Development/Tools |
215 | Requires: %{name} = %{version}-%{release} | |
216 | Requires: webapps | |
666cda7c | 217 | Requires: webserver(access) |
51ce768a KK |
218 | Requires: webserver(alias) |
219 | Requires: webserver(cgi) | |
93a30d5e | 220 | Suggests: webserver(setenv) |
be2ccf99 AG |
221 | |
222 | %description gitweb | |
223 | This package provides a web interface for browsing git repositories. | |
224 | ||
225 | %description gitweb -l pl.UTF-8 | |
2712fe7b | 226 | Pakiet ten dostarcza interfejs WWW do przeglądania repozytoriów gita. |
be2ccf99 | 227 | |
e1c8d79f | 228 | %package gitview |
30794a22 JB |
229 | Summary: A GTK+ based repository browser for git |
230 | Summary(pl.UTF-8): Oparta na GTK+ przeglądarka repozytorium gita | |
e1c8d79f | 231 | Group: Development/Tools |
232 | Requires: %{name} = %{version}-%{release} | |
c95a5d99 JB |
233 | Requires: python >= 1:2.4 |
234 | Requires: python-pycairo >= 1.0 | |
235 | Requires: python-pygobject | |
236 | Requires: python-pygtk-gtk >= 2:2.8 | |
237 | Suggests: python-gnome-desktop-gtksourceview | |
e1c8d79f | 238 | |
239 | %description gitview | |
30794a22 | 240 | A GTK+ based repository browser for git. |
e1c8d79f | 241 | |
242 | %description gitview -l pl.UTF-8 | |
30794a22 | 243 | Oparta na GTK+ przeglądarka repozytorium gita. |
e1c8d79f | 244 | |
f9871074 AG |
245 | %package gui |
246 | Summary: Tcl/Tk interface to the Git version control system | |
247 | Summary(pl.UTF-8): Napisany w Tcl/Tk interfejs do systemu kontroli wersji Git | |
248 | Group: Development/Tools | |
249 | Requires: %{name} = %{version}-%{release} | |
250 | Requires: tk | |
d4106757 | 251 | Requires: xdg-utils |
531b434f | 252 | Suggests: meld |
f9871074 AG |
253 | |
254 | %description gui | |
255 | Displays changes in a repository or a selected set of commits. This | |
256 | includes visualizing the commit graph, showing information related to | |
257 | each commit, and the files in the trees of each revision. | |
258 | ||
259 | Historically, gitk was the first repository browser. It's written in | |
260 | Tcl/Tk and started off in a separate repository but was later merged | |
261 | into the main git repository. | |
262 | ||
263 | %description gui -l pl.UTF-8 | |
264 | Wyświetla zmiany w repozytorium lub wybranym zbiorze commitów. Oznacza | |
265 | to wizualizację grafu commitów, wyświetlanie informacji związanych z | |
266 | każdym z commitów oraz listę plików dla każdej rewizji. | |
267 | ||
268 | Z punktu widzenia historii, gitk był pierwszą przeglądarką | |
269 | repozytorium git. Napisany jest w Tcl/Tk i początkowo był rozwijany w | |
270 | osobnym repozytorium, ale z czasem został włączony do głównego | |
271 | repozytorium gita. | |
272 | ||
0d2db069 ER |
273 | %package bzr |
274 | Summary: Git tools for working with bzr repositories | |
275 | Group: Development/Tools | |
276 | Requires: %{name} = %{version}-%{release} | |
277 | Requires: bzr | |
278 | ||
279 | %description bzr | |
280 | Git tools for working with bzr repositories. | |
281 | ||
282 | %package hg | |
283 | Summary: Git tools for working with mercurial repositories | |
284 | Group: Development/Tools | |
285 | Requires: %{name} = %{version}-%{release} | |
286 | Requires: mercurial >= 1.8 | |
287 | ||
288 | %description hg | |
289 | Git tools for working with mercurial repositories. | |
290 | ||
291 | %package p4 | |
292 | Summary: Git tools for working with Perforce depots | |
293 | Group: Development/Tools | |
294 | Requires: %{name} = %{version}-%{release} | |
295 | ||
296 | %description p4 | |
297 | Git tools for working with Perforce depots. | |
298 | ||
2c0376c9 AM |
299 | %package svn |
300 | Summary: Subversion support for Git | |
41b5f4b1 | 301 | Summary(pl.UTF-8): Obsługa Subversion dla Gita |
2c0376c9 AM |
302 | Group: Development/Tools |
303 | Requires: %{name} = %{version}-%{release} | |
daccfb39 | 304 | Requires: perl-Encode |
4ea37765 | 305 | Requires: perl-Term-ReadKey |
2c0376c9 AM |
306 | |
307 | %description svn | |
308 | Subversion support for Git. | |
309 | ||
310 | %description svn -l pl.UTF-8 | |
41b5f4b1 | 311 | Obsługa Subversion dla Gita. |
2c0376c9 AM |
312 | |
313 | %package cvs | |
314 | Summary: CVS support for Git | |
41b5f4b1 | 315 | Summary(pl.UTF-8): Obsługa CVS dla Gita |
2c0376c9 AM |
316 | Group: Development/Tools |
317 | Requires: %{name} = %{version}-%{release} | |
318 | Requires: cvsps >= 2.1-2 | |
319 | Requires: rcs | |
320 | ||
321 | %description cvs | |
322 | CVS support for Git. | |
323 | ||
324 | %description cvs -l pl.UTF-8 | |
41b5f4b1 | 325 | Obsługa CVS dla Gita. |
2c0376c9 | 326 | |
d82521ea ER |
327 | %package arch |
328 | Summary: Git tools for importing Arch repositories | |
41b5f4b1 | 329 | Summary(pl.UTF-8): Narzędzia Gita do importowania repozytoriów Archa |
d82521ea ER |
330 | Group: Development/Tools |
331 | Requires: %{name} = %{version}-%{release} | |
332 | Requires: tla | |
333 | ||
334 | %description arch | |
335 | Git tools for importing Arch repositories. | |
336 | ||
41b5f4b1 JB |
337 | %description arch -l pl.UTF-8 |
338 | Narzędzia Gita do importowania repozytoriów Archa. | |
339 | ||
d82521ea ER |
340 | %package email |
341 | Summary: Git tools for sending email | |
41b5f4b1 | 342 | Summary(pl.UTF-8): Narzędzia Gita do wysyłania poczty |
d82521ea ER |
343 | Group: Development/Tools |
344 | Requires: %{name} = %{version}-%{release} | |
345 | ||
346 | %description email | |
347 | Git tools for sending email. | |
348 | ||
41b5f4b1 JB |
349 | %description email -l pl.UTF-8 |
350 | Narzędzia Gita do wysyłania poczty. | |
351 | ||
f2c1983d AG |
352 | %package -n bash-completion-git |
353 | Summary: bash-completion for git | |
2712fe7b | 354 | Summary(pl.UTF-8): bashowe uzupełnianie nazw dla gita |
02059138 | 355 | Group: Applications/Shells |
cdeb0400 | 356 | Requires: %{name} = %{version}-%{release} |
3102984c | 357 | Requires: bash-completion >= 2.0 |
f2c1983d AG |
358 | |
359 | %description -n bash-completion-git | |
360 | This package provides bash-completion for git. | |
361 | ||
362 | %description -n bash-completion-git -l pl.UTF-8 | |
5383e3af | 363 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla gita. |
f2c1983d | 364 | |
3dc01deb | 365 | %package -n perl-Git |
5d7220ad | 366 | Summary: Perl interface to the Git version control system |
3f8032f4 | 367 | Summary(pl.UTF-8): Perlowy interfejs do systemu kontroli wersji Git |
5d7220ad | 368 | Group: Development/Languages/Perl |
27b79a12 | 369 | Obsoletes: perl-git-core |
5d7220ad | 370 | |
3dc01deb | 371 | %description -n perl-Git |
5d7220ad AM |
372 | This module provides Perl scripts easy way to interface the Git |
373 | version control system. The modules have an easy and well-tested way | |
374 | to call arbitrary Git commands; in the future, the interface will also | |
375 | provide specialized methods for doing easily operations which are not | |
376 | totally trivial to do over the generic command interface. | |
377 | ||
ea061c99 JR |
378 | %description -n perl-Git -l pl.UTF-8 |
379 | Ten moduł umożliwia skryptom Perla współpracę z systemem kontroli | |
08cc92d7 ER |
380 | wersji Git. W łatwy i dobrze przetestowany sposób pozwala wywoływać |
381 | dowolne polecenia Gita; w przyszłości interfejs udostępni także | |
382 | specjalne metody do łatwego wykonywania operacji nietrywialnych do | |
383 | wykonania przy użyciu ogólnego interfejsu poleceń. | |
7eef96e1 | 384 | |
f2c1983d AG |
385 | %package -n vim-syntax-gitcommit |
386 | Summary: Vim syntax: gitcommit | |
2712fe7b | 387 | Summary(pl.UTF-8): Składnia dla Vima: gitcommit |
f2c1983d | 388 | Group: Applications/Editors/Vim |
cdeb0400 | 389 | Requires: %{name} = %{version}-%{release} |
f2c1983d | 390 | # for _vimdatadir existence |
34bbdd69 | 391 | Requires: vim-rt >= 4:6.3.058-3 |
f2c1983d AG |
392 | |
393 | %description -n vim-syntax-gitcommit | |
394 | This plugin provides syntax highlighting for git's commit messages. | |
395 | ||
396 | %description -n vim-syntax-gitcommit -l pl.UTF-8 | |
2712fe7b | 397 | Ta wtyczka dostarcza podświetlanie składni dla treści commitów gita. |
f2c1983d | 398 | |
51c3b977 | 399 | %prep |
5013f7fc | 400 | %setup -q -n git-%{version} |
6b1e62ae | 401 | %patch0 -p1 |
b2c254f3 | 402 | %patch1 -p0 |
d12d8532 | 403 | %patch2 -p1 |
8ce45cec | 404 | %patch3 -p1 |
c64c444d | 405 | %patch4 -p1 |
a1036d06 | 406 | |
407 | %build | |
11856720 AM |
408 | %{__aclocal} |
409 | %{__autoconf} | |
410 | %configure \ | |
d12d8532 | 411 | --sysconfdir=%{_sysconfdir}/git-core \ |
202eeb4b | 412 | %{?with_pcre:--with-libpcre} \ |
11856720 | 413 | --with-openssl |
51c3b977 | 414 | |
7cfee1ba KK |
415 | echo "BLK_SHA1=1" >> config.mak |
416 | ||
b69112f7 | 417 | %{__make} \ |
be2ccf99 AG |
418 | INSTALLDIRS=vendor \ |
419 | GITWEB_CONFIG="%{webappdir}/gitweb.conf" \ | |
420 | GITWEB_PROJECTROOT="/var/lib/git" \ | |
421 | GITWEB_CSS="/gitweb/gitweb.css" \ | |
422 | GITWEB_LOGO="/gitweb/git-logo.png" \ | |
f74aede9 JB |
423 | GITWEB_FAVICON="/gitweb/git-favicon.png" \ |
424 | V=1 | |
27b79a12 | 425 | |
83b9a8cd ER |
426 | %if %{with doc} |
427 | %{__make} -C Documentation \ | |
428 | MAN_BASE_URL=file://%{_docdir}/%{name}-doc-%{version}/ \ | |
429 | V=1 | |
430 | %endif | |
7fdeb28c | 431 | |
db032591 AM |
432 | %if %{with tests} |
433 | %if %{without tests_cvs} | |
8bed7625 | 434 | %{__rm} t/t*cvs*.sh || : |
db032591 | 435 | %endif |
acc7b6c4 | 436 | %{!?with_tests_svn:GIT_SKIP_TESTS='t91??'} %{__make} test |
db032591 | 437 | %endif |
6c0d6e05 | 438 | |
51c3b977 | 439 | %install |
440 | rm -rf $RPM_BUILD_ROOT | |
5db07614 | 441 | install -d $RPM_BUILD_ROOT{%{_includedir}/%{name}/xdiff,%{_localstatedir}/lib/git} |
be2ccf99 | 442 | install -d $RPM_BUILD_ROOT{%{appdir},%{cgibindir},%{webappdir}} |
5db07614 | 443 | install -d $RPM_BUILD_ROOT/etc/{sysconfig/rc-inetd,rc.d/init.d} |
cdeb0400 | 444 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name} |
d12d8532 KK |
445 | cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/git-core/gitconfig |
446 | [init] | |
cdeb0400 | 447 | templatedir = %{_sysconfdir}/%{name}/templates |
d12d8532 | 448 | EOF |
c751087d | 449 | |
51c3b977 | 450 | %{__make} install \ |
d778c02c | 451 | INSTALLDIRS=vendor \ |
51c3b977 | 452 | DESTDIR=$RPM_BUILD_ROOT |
453 | ||
08cc92d7 | 454 | %if %{with doc} |
7fdeb28c | 455 | %{__make} -C Documentation install \ |
7fdeb28c | 456 | DESTDIR=$RPM_BUILD_ROOT |
08cc92d7 | 457 | %endif |
7fdeb28c | 458 | |
d12d8532 KK |
459 | # copy templates except sample hooks |
460 | cp -a $RPM_BUILD_ROOT%{_datadir}/%{name}/templates $RPM_BUILD_ROOT%{_sysconfdir}/%{name} | |
461 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/templates/hooks/*.sample | |
462 | ||
1f25da6d | 463 | # header files and lib |
cdeb0400 | 464 | cp -p *.h $RPM_BUILD_ROOT%{_includedir}/%{name} |
31b26a50 | 465 | cp -a compat $RPM_BUILD_ROOT%{_includedir}/%{name} |
cdeb0400 | 466 | cp -p xdiff/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/xdiff |
95341e74 KK |
467 | install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/block-sha1 |
468 | cp -p block-sha1/sha1.h $RPM_BUILD_ROOT%{_includedir}/%{name}/block-sha1 | |
cdeb0400 ER |
469 | cp -p libgit.a $RPM_BUILD_ROOT%{_libdir} |
470 | cp -p xdiff/lib.a $RPM_BUILD_ROOT%{_libdir}/libgit_xdiff.a | |
95341e74 | 471 | cp -p {Makefile,config.mak,config.mak.autogen,config.mak.uname} $RPM_BUILD_ROOT%{_includedir}/%{name} |
e3cefa79 | 472 | |
f2c1983d | 473 | # bash completion |
3102984c ER |
474 | install -d $RPM_BUILD_ROOT%{bash_compdir} |
475 | cp -p contrib/completion/git-completion.bash $RPM_BUILD_ROOT%{bash_compdir}/git | |
f2c1983d | 476 | |
0d2db069 ER |
477 | # Install bzr and hg remote helpers from contrib |
478 | install -p contrib/remote-helpers/git-remote-{bzr,hg} $RPM_BUILD_ROOT%{_libdir}/%{name} | |
479 | ||
f2c1983d | 480 | # vim syntax |
d82521ea ER |
481 | install -d $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax |
482 | cat > $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/syntax/gitcommit.vim << 'EOF' | |
670fe4d6 AG |
483 | autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit |
484 | autocmd BufNewFile,BufRead *.git/config,.gitconfig setf gitconfig | |
485 | autocmd BufNewFile,BufRead git-rebase-todo setf gitrebase | |
486 | autocmd BufNewFile,BufRead .msg.[0-9]* | |
487 | \ if getline(1) =~ '^From.*# This line is ignored.$' | | |
488 | \ setf gitsendemail | | |
489 | \ endif | |
490 | autocmd BufNewFile,BufRead *.git/** | |
491 | \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' | | |
492 | \ setf git | | |
493 | \ endif | |
494 | EOF | |
f2c1983d | 495 | |
be2ccf99 | 496 | # gitweb |
4f98dcd3 | 497 | mv $RPM_BUILD_ROOT{%{appdir},%{cgibindir}}/gitweb.cgi |
93a30d5e | 498 | ln -s %{cgibindir}/gitweb.cgi $RPM_BUILD_ROOT%{appdir}/gitweb.cgi |
cdeb0400 ER |
499 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{webappdir}/gitweb.conf |
500 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/apache.conf | |
814a047c | 501 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{webappdir}/httpd.conf |
cdeb0400 | 502 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{webappdir}/lighttpd.conf |
be2ccf99 | 503 | |
e1c8d79f | 504 | # gitview |
d82521ea | 505 | install -p contrib/gitview/gitview $RPM_BUILD_ROOT%{_bindir} |
e1c8d79f | 506 | |
b11ada2c | 507 | # git-daemon related files |
51ce768a KK |
508 | cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/git-daemon |
509 | cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon | |
510 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon | |
b11ada2c | 511 | |
bf7a9a54 | 512 | # paths cleanup |
2c0376c9 | 513 | sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/rc.d/init.d/git-daemon |
bf7a9a54 AG |
514 | sed -e 's,@libdir@,%{_libdir},g' -i $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/git-daemon |
515 | ||
4e9fd7a9 ER |
516 | # hardlink |
517 | ln -f $RPM_BUILD_ROOT%{_bindir}/{git,git-receive-pack} | |
518 | ln -f $RPM_BUILD_ROOT%{_bindir}/{git,git-upload-archive} | |
519 | ln -f $RPM_BUILD_ROOT{%{_libdir}/%{name},%{_bindir}}/git-shell | |
520 | ln -f $RPM_BUILD_ROOT{%{_libdir}/%{name},%{_bindir}}/git-upload-pack | |
521 | ||
be2ccf99 | 522 | # remove unneeded files |
cdeb0400 ER |
523 | %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod |
524 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Git/.packlist | |
44ee5525 | 525 | %py_postclean |
27b79a12 | 526 | |
815a92b1 | 527 | mv $RPM_BUILD_ROOT%{_localedir}/pt{_PT,} |
fdf2ed38 JB |
528 | %find_lang git |
529 | ||
51c3b977 | 530 | %clean |
531 | rm -rf $RPM_BUILD_ROOT | |
532 | ||
b11ada2c AG |
533 | %post daemon-inetd |
534 | %service -q rc-inetd reload | |
535 | ||
536 | %postun daemon-inetd | |
537 | if [ "$1" = "0" ]; then | |
538 | %service -q rc-inetd reload | |
539 | fi | |
540 | ||
541 | %post daemon-standalone | |
542 | /sbin/chkconfig --add git-daemon | |
543 | %service git-daemon restart "git-daemon" | |
544 | ||
545 | %preun daemon-standalone | |
546 | if [ "$1" = "0" ]; then | |
547 | %service git-daemon stop | |
548 | /sbin/chkconfig --del git-daemon | |
549 | fi | |
550 | ||
be2ccf99 AG |
551 | %triggerin gitweb -- apache1 < 1.3.37-3, apache1-base |
552 | %webapp_register apache %{webapp} | |
553 | ||
554 | %triggerun gitweb -- apache1 < 1.3.37-3, apache1-base | |
555 | %webapp_unregister apache %{webapp} | |
556 | ||
814a047c | 557 | %triggerin gitweb -- apache < 2.2.0, apache-base |
be2ccf99 AG |
558 | %webapp_register httpd %{webapp} |
559 | ||
814a047c | 560 | %triggerun gitweb -- apache < 2.2.0, apache-base |
be2ccf99 AG |
561 | %webapp_unregister httpd %{webapp} |
562 | ||
51ce768a KK |
563 | %triggerin gitweb -- lighttpd |
564 | %webapp_register lighttpd %{webapp} | |
565 | ||
566 | %triggerun gitweb -- lighttpd | |
567 | %webapp_unregister lighttpd %{webapp} | |
568 | ||
fdf2ed38 | 569 | %files -f git.lang |
51c3b977 | 570 | %defattr(644,root,root,755) |
08cc92d7 | 571 | %doc README contrib |
a8655d02 | 572 | %attr(755,root,root) %{_bindir}/git |
44ee5525 ER |
573 | %attr(755,root,root) %{_bindir}/git-receive-pack |
574 | %attr(755,root,root) %{_bindir}/git-shell | |
575 | %attr(755,root,root) %{_bindir}/git-upload-archive | |
576 | %attr(755,root,root) %{_bindir}/git-upload-pack | |
cdeb0400 | 577 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name} |
a8655d02 | 578 | |
08cc92d7 | 579 | %if %{with doc} |
0afd37aa | 580 | %{_mandir}/man1/git-*.1* |
dbde9893 | 581 | %exclude %{_mandir}/man1/git-archimport.1* |
2c0376c9 AM |
582 | %exclude %{_mandir}/man1/git-svn.1* |
583 | %exclude %{_mandir}/man1/git-cvs*.1* | |
858c27ef | 584 | %exclude %{_mandir}/man1/git-imap-send*.1* |
dbde9893 | 585 | %exclude %{_mandir}/man1/*email*.1* |
a48d28b8 | 586 | %{_mandir}/man1/git.1* |
a77c0aad | 587 | %{_mandir}/man1/gitremote-helpers.1* |
0afd37aa | 588 | %{_mandir}/man5/gitattributes.5* |
a48d28b8 | 589 | %{_mandir}/man5/githooks.5* |
0afd37aa | 590 | %{_mandir}/man5/gitignore.5* |
785b167d | 591 | %{_mandir}/man5/gitmodules.5* |
a48d28b8 AG |
592 | %{_mandir}/man5/gitrepository-layout.5* |
593 | %{_mandir}/man7/gitcli.7* | |
594 | %{_mandir}/man7/gitcore-tutorial.7* | |
fdf2ed38 | 595 | %{_mandir}/man7/gitcredentials.7* |
a48d28b8 AG |
596 | %{_mandir}/man7/gitdiffcore.7* |
597 | %{_mandir}/man7/gitglossary.7* | |
60b58680 | 598 | %{_mandir}/man7/gitnamespaces.7* |
f16e8911 | 599 | %{_mandir}/man7/gitrevisions.7* |
a48d28b8 AG |
600 | %{_mandir}/man7/gittutorial-2.7* |
601 | %{_mandir}/man7/gittutorial.7* | |
670fe4d6 | 602 | %{_mandir}/man7/gitworkflows.7* |
08cc92d7 | 603 | %endif |
a8655d02 | 604 | |
bf6fa63c AM |
605 | %dir %{_libdir}/%{name} |
606 | %attr(755,root,root) %{_libdir}/%{name}/*-* | |
39dc084d | 607 | %attr(755,root,root) %{_libdir}/%{name}/git |
0d2db069 ER |
608 | %dir %{_libdir}/%{name}/mergetools |
609 | %{_libdir}/%{name}/mergetools/* | |
a8655d02 | 610 | |
0d2db069 ER |
611 | %{_datadir}/%{name} |
612 | %{_localstatedir}/lib/git | |
613 | ||
614 | # subpackages | |
615 | %exclude %{_libdir}/%{name}/*email* | |
616 | %exclude %{_libdir}/%{name}/*p4* | |
d82521ea | 617 | %exclude %{_libdir}/%{name}/git-archimport |
2c0376c9 | 618 | %exclude %{_libdir}/%{name}/git-cvs* |
0d2db069 | 619 | %exclude %{_libdir}/%{name}/git-gui |
858c27ef | 620 | %exclude %{_libdir}/%{name}/git-imap-send |
93a30d5e | 621 | %exclude %{_libdir}/%{name}/git-instaweb |
0d2db069 ER |
622 | %exclude %{_libdir}/%{name}/git-remote-bzr |
623 | %exclude %{_libdir}/%{name}/git-remote-hg | |
a7233f01 | 624 | %exclude %{_libdir}/%{name}/git-remote-testsvn |
0d2db069 ER |
625 | %exclude %{_libdir}/%{name}/git-svn |
626 | %exclude %{_libdir}/%{name}/mergetools/p4merge | |
e3cefa79 | 627 | |
a8655d02 ER |
628 | %if %{with doc} |
629 | %files doc | |
778b89a7 | 630 | %defattr(644,root,root,755) |
a8655d02 ER |
631 | %doc Documentation/RelNotes* |
632 | %doc Documentation/*.html Documentation/howto Documentation/technical | |
633 | %endif | |
634 | ||
b11ada2c AG |
635 | %files daemon-inetd |
636 | %defattr(644,root,root,755) | |
637 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/git-daemon | |
638 | ||
639 | %files daemon-standalone | |
640 | %defattr(644,root,root,755) | |
641 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/git-daemon | |
642 | %attr(754,root, root) /etc/rc.d/init.d/git-daemon | |
643 | ||
e3cefa79 | 644 | %files devel |
3ff86e9e | 645 | %defattr(644,root,root,755) |
cdeb0400 | 646 | %{_includedir}/%{name} |
5db07614 | 647 | %{_libdir}/libgit.a |
eaf5c40c | 648 | %{_libdir}/libgit_xdiff.a |
5d7220ad | 649 | |
91396e2e AG |
650 | %files gitk |
651 | %defattr(644,root,root,755) | |
08cc92d7 | 652 | %if %{with doc} |
91396e2e | 653 | %{_mandir}/man1/gitk.1* |
08cc92d7 ER |
654 | %endif |
655 | %attr(755,root,root) %{_bindir}/gitk | |
9fa88d97 AM |
656 | %dir %{_datadir}/gitk |
657 | %dir %{_datadir}/gitk/lib | |
658 | %dir %{_datadir}/gitk/lib/msgs | |
3b243bbe | 659 | %lang(de) %{_datadir}/gitk/lib/msgs/de.msg |
f9871074 | 660 | %lang(es) %{_datadir}/gitk/lib/msgs/es.msg |
778b89a7 AM |
661 | %lang(fr) %{_datadir}/gitk/lib/msgs/fr.msg |
662 | %lang(hu) %{_datadir}/gitk/lib/msgs/hu.msg | |
3b243bbe | 663 | %lang(it) %{_datadir}/gitk/lib/msgs/it.msg |
469258c9 | 664 | %lang(ja) %{_datadir}/gitk/lib/msgs/ja.msg |
3ed82b68 | 665 | %lang(pt_BR) %{_datadir}/gitk/lib/msgs/pt_br.msg |
95998f97 | 666 | %lang(ru) %{_datadir}/gitk/lib/msgs/ru.msg |
f9871074 | 667 | %lang(sv) %{_datadir}/gitk/lib/msgs/sv.msg |
91396e2e | 668 | |
be2ccf99 AG |
669 | %files gitweb |
670 | %defattr(644,root,root,755) | |
671 | %doc gitweb/{README,INSTALL} | |
672 | %dir %{webappdir} | |
673 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,http) %{webappdir}/gitweb.conf | |
674 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/apache.conf | |
675 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/httpd.conf | |
51ce768a | 676 | %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{webappdir}/lighttpd.conf |
be2ccf99 AG |
677 | %attr(755,root,root) %{cgibindir}/gitweb.cgi |
678 | %{appdir} | |
93a30d5e KK |
679 | %attr(755,root,root) %{_libdir}/%{name}/git-instaweb |
680 | %if %{with doc} | |
0c582eb3 AM |
681 | %{_mandir}/man1/gitweb.1* |
682 | %{_mandir}/man5/gitweb.conf.5* | |
93a30d5e | 683 | %endif |
be2ccf99 | 684 | |
e1c8d79f | 685 | %files gitview |
686 | %defattr(644,root,root,755) | |
687 | %doc contrib/gitview/gitview.txt | |
688 | %attr(755,root,root) %{_bindir}/gitview | |
689 | ||
f9871074 AG |
690 | %files gui |
691 | %defattr(644,root,root,755) | |
bf6fa63c | 692 | %attr(755,root,root) %{_libdir}/%{name}/git-gui |
f9871074 AG |
693 | %dir %{_datadir}/git-gui |
694 | %dir %{_datadir}/git-gui/lib | |
695 | %dir %{_datadir}/git-gui/lib/msgs | |
696 | %{_datadir}/git-gui/lib/git-gui.ico | |
697 | %{_datadir}/git-gui/lib/tclIndex | |
698 | %{_datadir}/git-gui/lib/*.js | |
699 | %{_datadir}/git-gui/lib/*.tcl | |
700 | %lang(de) %{_datadir}/git-gui/lib/msgs/de.msg | |
469258c9 | 701 | %lang(el) %{_datadir}/git-gui/lib/msgs/el.msg |
f9871074 AG |
702 | %lang(fr) %{_datadir}/git-gui/lib/msgs/fr.msg |
703 | %lang(hu) %{_datadir}/git-gui/lib/msgs/hu.msg | |
704 | %lang(it) %{_datadir}/git-gui/lib/msgs/it.msg | |
705 | %lang(ja) %{_datadir}/git-gui/lib/msgs/ja.msg | |
670fe4d6 | 706 | %lang(nb) %{_datadir}/git-gui/lib/msgs/nb.msg |
e21aea75 | 707 | %lang(pt_br) %{_datadir}/git-gui/lib/msgs/pt_br.msg |
f9871074 AG |
708 | %lang(ru) %{_datadir}/git-gui/lib/msgs/ru.msg |
709 | %lang(sv) %{_datadir}/git-gui/lib/msgs/sv.msg | |
35cbc54f | 710 | %lang(zh_CN) %{_datadir}/git-gui/lib/msgs/zh_cn.msg |
f9871074 | 711 | |
0d2db069 ER |
712 | %files bzr |
713 | %defattr(644,root,root,755) | |
714 | %attr(755,root,root) %{_libdir}/%{name}/git-remote-bzr | |
715 | ||
716 | %files hg | |
717 | %defattr(644,root,root,755) | |
718 | %attr(755,root,root) %{_libdir}/%{name}/git-remote-hg | |
719 | ||
720 | %files p4 | |
721 | %defattr(644,root,root,755) | |
722 | %attr(755,root,root) %{_libdir}/%{name}/git-p4 | |
723 | %attr(755,root,root) %{_libdir}/%{name}/mergetools/p4merge | |
724 | ||
2c0376c9 AM |
725 | %files svn |
726 | %defattr(644,root,root,755) | |
727 | %attr(755,root,root) %{_libdir}/%{name}/git-svn | |
a7233f01 | 728 | %attr(755,root,root) %{_libdir}/%{name}/git-remote-testsvn |
b5884c73 | 729 | %{perl_vendorlib}/Git/SVN |
bbceff2c | 730 | %{perl_vendorlib}/Git/SVN.pm |
2c0376c9 AM |
731 | %if %{with doc} |
732 | %{_mandir}/man1/git-svn.1* | |
733 | %endif | |
734 | ||
735 | %files cvs | |
736 | %defattr(644,root,root,755) | |
44ee5525 | 737 | %attr(755,root,root) %{_bindir}/git-cvsserver |
2c0376c9 AM |
738 | %attr(755,root,root) %{_libdir}/%{name}/git-cvs* |
739 | %if %{with doc} | |
740 | %{_mandir}/man1/git-cvs*.1* | |
741 | %{_mandir}/man7/gitcvs-migration.7* | |
742 | %endif | |
743 | ||
d82521ea ER |
744 | %files arch |
745 | %defattr(644,root,root,755) | |
d82521ea ER |
746 | %attr(755,root,root) %{_libdir}/%{name}/git-archimport |
747 | %if %{with doc} | |
d82521ea ER |
748 | %{_mandir}/man1/git-archimport.1* |
749 | %endif | |
750 | ||
751 | %files email | |
752 | %defattr(644,root,root,755) | |
858c27ef | 753 | %attr(755,root,root) %{_libdir}/%{name}/git-imap-send |
d82521ea ER |
754 | %attr(755,root,root) %{_libdir}/%{name}/*email* |
755 | %if %{with doc} | |
d82521ea | 756 | %{_mandir}/man1/*email*.1* |
858c27ef | 757 | %{_mandir}/man1/*imap-send*.1* |
d82521ea ER |
758 | %endif |
759 | ||
f2c1983d AG |
760 | %files -n bash-completion-git |
761 | %defattr(644,root,root,755) | |
3102984c | 762 | %{bash_compdir}/git |
f2c1983d | 763 | |
3dc01deb | 764 | %files -n perl-Git |
5d7220ad | 765 | %defattr(644,root,root,755) |
3dc01deb | 766 | %{perl_vendorlib}/Git.pm |
b5884c73 KK |
767 | %dir %{perl_vendorlib}/Git |
768 | %{perl_vendorlib}/Git/I18N.pm | |
bbceff2c | 769 | %{perl_vendorlib}/Git/IndexInfo.pm |
fdf2ed38 | 770 | %{_mandir}/man3/Git*.3pm* |
f2c1983d AG |
771 | |
772 | %files -n vim-syntax-gitcommit | |
773 | %defattr(644,root,root,755) | |
774 | %doc contrib/vim/README | |
7baeed33 | 775 | %{_datadir}/vim/vimfiles/syntax/gitcommit.vim |