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