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