packaging: Add contrib installation
[platform/upstream/git.git] / packaging / git.spec
1 %define gitexecdir %{_libexecdir}/git
2
3 Name:           git
4 Version:        2.30.1
5 Release:        0
6 License:        GPL-2.0
7 Summary:        Fast, scalable, distributed revision control system
8 Url:            http://git-scm.com
9 Group:          Platform Development/Utilities
10 Source:         %{name}-%{version}.tar.gz
11 Source1001:     git.manifest
12 BuildRequires:  asciidoc
13 BuildRequires:  curl
14 BuildRequires:  expat-devel
15 BuildRequires:  fdupes
16 BuildRequires:  gettext-tools
17 BuildRequires:  libcurl-devel
18 BuildRequires:  pkgconfig(openssl1.1)
19 BuildRequires:  perl-Error
20 BuildRequires:  python
21 BuildRequires:  xmlto
22 BuildRequires:  libcares-devel
23 BuildRequires:  ca-certificates
24
25 Requires:       git-core = %{version}
26 Requires:       ca-certificates
27
28 %description
29 Git is a fast, scalable, distributed revision control system with an
30 unusually rich command set that provides both high-level operations and
31 full access to internals.
32
33 This package itself only provides the README of git but with the
34 packages it requires, it brings you a complete Git environment
35 including GTK and email interfaces and tools for importing source code
36 repositories from other revision control systems such as subversion,
37 CVS, and GNU arch.
38
39 %package core
40 Summary:        Core git tools
41 Group:          Platform Development/Utilities
42 Requires:       less
43 Requires:       openssh
44 Requires:       perl-Error
45 Requires:       perl = %{perl_version}
46 Requires:       rsync
47
48 %description core
49 Git is a fast, scalable, distributed revision control system with an
50 unusually rich command set that provides both high-level operations and
51 full access to internals.
52
53 These are the core tools with minimal dependencies.
54
55 %package svn
56 Summary:        Git tools for importing Subversion repositories
57 Group:          Platform Development/Utilities
58 Requires:       git-core = %{version}
59 Requires:       subversion
60 Requires:       subversion-perl
61
62 %description svn
63 Tools for importing Subversion repositories to the Git version control
64 system.
65
66 %package cvs
67 Summary:        Git tools for importing CVS repositories
68 Group:          Platform Development/Utilities
69 Requires:       cvs
70 Requires:       cvsps
71 Requires:       git-core = %{version}
72 Requires:       perl-DBD-SQLite
73
74 %description cvs
75 Tools for importing CVS repositories to the Git version control system.
76
77 %package arch
78 Summary:        Git tools for importing Arch repositories
79 Group:          Platform Development/Utilities
80 Requires:       git-core = %{version}
81 # Requires:       tla
82
83 %description arch
84 Tools for importing GNU Arch repositories to the GIT version control
85 system.
86
87 %package email
88 Summary:        Git tools for sending email
89 Group:          Platform Development/Utilities
90 Requires:       git-core = %{version}
91 # For sending mails over secure SMTP:
92 Recommends:     perl-Authen-SASL
93 Recommends:     perl-Net-SMTP-SSL
94
95 %description email
96 Email interface for the GIT version control system.
97
98 %package daemon
99 Summary:        Simple Server for Git Repositories
100 Group:          Platform Development/Utilities
101 Requires(pre):  /usr/sbin/useradd
102 Requires:       git-core = %{version}
103
104 %description daemon
105 A really simple TCP git daemon. In the default configuration it allows
106 read only access to repositories in /srv/git/ that contain the
107 'git-daemon-export-ok' file.
108 %package -n gitk
109 Summary:        Git revision tree visualiser
110 Group:          Platform Development/Utilities
111 Requires:       git-core = %{version}
112 Requires:       tk >= 8.4
113 Supplements:    packageand(git-core:tk)
114
115 %description -n gitk
116 Grapical tool for visualization of revision trees of projects
117 maintained in the Git version control system. It name gitk indicates
118 that it's written using the Tk Widget set.
119
120 A simple Tk based graphical interface for common Git operations is
121 found in the package git-gui.
122
123 %package gui
124 Summary:        Grapical tool for common git operations
125 Group:          Platform Development/Utilities
126 Requires:       git-core = %{version}
127 Requires:       tk >= 8.4
128 Supplements:    packageand(git-core:tk)
129
130 %description gui
131 A Tcl/Tk based graphical user interface to Git. git-gui focuses on
132 allowing users to make changes to their repository by making new
133 commits, amending existing ones, creating branches, performing local
134 merges, and fetching/pushing to remote repositories.
135
136 Unlike gitk, git-gui focuses on commit generation and single file
137 annotation, and does not show project history. It does however supply
138 menu actions to start a gitk session from within git-gui.
139
140 %package web
141 Summary:        Git Web Interface
142 Group:          Platform Development/Utilities
143 Requires:       git-core = %{version}
144 Supplements:    packageand(git-core:apache2)
145
146 %description web
147 CGI script that allows browsing git repositories via web interface.
148
149 The apache2 configuration contained in this package installs a virtual
150 directory /git/ that calls the cgi script.
151
152
153 %prep
154 %setup -q
155 cp %{SOURCE1001} .
156
157
158 %build
159 cat > .make <<'EOF'
160 #!/bin/bash
161 make %{?_smp_mflags} CFLAGS="%{optflags}" \
162        GITWEB_CONFIG="/etc/gitweb.conf" \
163        GITWEB_PROJECTROOT="/srv/git" \
164        WITH_OWN_SUBPROCESS_PY=YesPlease \
165        DESTDIR=%{buildroot} \
166        NO_CROSS_DIRECTORY_HARDLINKS=1 \
167        V=1 \
168        prefix=%{_prefix} mandir=%{_mandir} \
169        gitexecdir=%{gitexecdir} \
170        htmldir=%{_docdir}/git-core \
171        "$@"
172 EOF
173 #
174 chmod 755 .make
175 ./.make %{?_smp_mflags}
176
177 %check
178 # make %{?_smp_mflags} test
179
180
181 %install
182 ./.make install
183
184 %remove_docs
185
186 mkdir -p %{buildroot}%{_datadir}/doc/%{name}
187 cp -r contrib %{buildroot}%{_datadir}/doc/%{name}
188 install -m0755 -D contrib/workdir/git-new-workdir %{buildroot}%{_bindir}/git-new-workdir
189
190 %files
191 %manifest %{name}.manifest
192 %{_datadir}/doc/%{name}/contrib
193 %{_bindir}/git-new-workdir
194
195 %files svn
196 %manifest %{name}.manifest
197 %{gitexecdir}/*svn*
198
199 %files cvs
200 %manifest %{name}.manifest
201 %{_bindir}/git-cvs*
202 %{gitexecdir}/*cvs*
203
204 %files arch
205 %manifest %{name}.manifest
206 %{gitexecdir}/git-archimport
207
208 %files email
209 %manifest %{name}.manifest
210 %{gitexecdir}/*email*
211
212 %files daemon
213 %manifest %{name}.manifest
214 %{gitexecdir}/*daemon*
215
216 %files -n gitk
217 %manifest %{name}.manifest
218 %{_bindir}/gitk
219 %{_datadir}/gitk
220
221 %files gui
222 %manifest %{name}.manifest
223 %{gitexecdir}/git-gui*
224 %{_datadir}/git-gui
225
226 %files core
227 %manifest %{name}.manifest
228 %license COPYING
229 %{_bindir}/git
230 %{_bindir}/git-receive-pack
231 %{_bindir}/git-shell
232 %{_bindir}/git-upload-archive
233 %{_bindir}/git-upload-pack
234 %{_datadir}/git-core/
235 %{gitexecdir}/*
236
237 %{_datadir}/gitweb/gitweb.cgi
238 %{_datadir}/gitweb/static/git-favicon.png
239 %{_datadir}/gitweb/static/git-logo.png
240 %{_datadir}/gitweb/static/gitweb.css
241 %{_datadir}/gitweb/static/gitweb.js
242
243 %{_datadir}/locale/*/LC_MESSAGES/git.mo
244
245 %{_datadir}/perl5/FromCPAN/*.pm
246 %{_datadir}/perl5/FromCPAN/Mail/*.pm
247 %{_datadir}/perl5/*.pm
248 %{_datadir}/perl5/Git/*.pm
249 %{_datadir}/perl5/Git/LoadCPAN/*.pm
250 %{_datadir}/perl5/Git/LoadCPAN/Mail/*.pm
251 %{_datadir}/perl5/Git/*.pm
252 %{_datadir}/perl5/Git/SVN/*.pm
253 %{_datadir}/perl5/Git/SVN/Memoize/*.pm
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269