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