1# Pass --without docs to rpmbuild if you don't want the documentation
2
3%define python_path /usr/bin/python
4
5Name: git
6Version: @@VERSION@@
7Release: 1%{?dist}
8Summary: Git core and tools
9License: GPL
10Group: Development/Tools
11URL: http://kernel.org/pub/software/scm/git/
12Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz
13BuildRequires: zlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3}
14BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15Requires: git-core, git-svn, git-cvs, git-arch, git-email, gitk, git-gui, git-p4, perl-Git
16
17%description
18Git is a fast, scalable, distributed revision control system with an
19unusually rich command set that provides both high-level operations
20and full access to internals.
21
22This is a dummy package which brings in all subpackages.
23
24%package core
25Summary: Core git tools
26Group: Development/Tools
27Requires: zlib >= 1.2, rsync, curl, less, openssh-clients, expat
28%description core
29Git is a fast, scalable, distributed revision control system with an
30unusually rich command set that provides both high-level operations
31and full access to internals.
32
33These are the core tools with minimal dependencies.
34
35%package svn
36Summary: Git tools for importing Subversion repositories
37Group: Development/Tools
38Requires: git-core = %{version}-%{release}, subversion
39%description svn
40Git tools for importing Subversion repositories.
41
42%package cvs
43Summary: Git tools for importing CVS repositories
44Group: Development/Tools
45Requires: git-core = %{version}-%{release}, cvs, cvsps
46%description cvs
47Git tools for importing CVS repositories.
48
49%package arch
50Summary: Git tools for importing Arch repositories
51Group: Development/Tools
52Requires: git-core = %{version}-%{release}, tla
53%description arch
54Git tools for importing Arch repositories.
55
56%package p4
57Summary: Git tools for importing Perforce repositories
58Group: Development/Tools
59Requires: git-core = %{version}-%{release}, python
60%description p4
61Git tools for importing Perforce repositories.
62
63%package email
64Summary: Git tools for sending email
65Group: Development/Tools
66Requires: git-core = %{version}-%{release}
67%description email
68Git tools for sending email.
69
70%package gui
71Summary: Git GUI tool
72Group: Development/Tools
73Requires: git-core = %{version}-%{release}, tk >= 8.4
74%description gui
75Git GUI tool
76
77%package -n gitk
78Summary: Git revision tree visualiser ('gitk')
79Group: Development/Tools
80Requires: git-core = %{version}-%{release}, tk >= 8.4
81%description -n gitk
82Git revision tree visualiser ('gitk')
83
84%package -n perl-Git
85Summary: Perl interface to Git
86Group: Development/Libraries
87Requires: git-core = %{version}-%{release}
88Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
89BuildRequires: perl(Error)
90
91%description -n perl-Git
92Perl interface to Git
93
94%prep
95%setup -q
96
97%build
98make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" WITH_P4IMPORT=YesPlease \
99 ETC_GITCONFIG=/etc/gitconfig \
100 prefix=%{_prefix} PYTHON_PATH=%{python_path} all %{!?_without_docs: doc}
101
102%install
103rm -rf $RPM_BUILD_ROOT
104make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \
105 WITH_P4IMPORT=YesPlease prefix=%{_prefix} mandir=%{_mandir} \
106 ETC_GITCONFIG=/etc/gitconfig \
107 PYTHON_PATH=%{python_path} \
108 INSTALLDIRS=vendor install %{!?_without_docs: install-doc}
109find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
110find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
111find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'
112
113(find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE "p4import|archimport|svn|cvs|email|gitk|git-gui|git-citool" | sed -e s@^$RPM_BUILD_ROOT@@) > bin-man-doc-files
114(find $RPM_BUILD_ROOT%{perl_vendorlib} -type f | sed -e s@^$RPM_BUILD_ROOT@@) >> perl-files
115%if %{!?_without_docs:1}0
116(find $RPM_BUILD_ROOT%{_mandir} $RPM_BUILD_ROOT/Documentation -type f | grep -vE "p4import|archimport|svn|git-cvs|email|gitk|git-gui|git-citool" | sed -e s@^$RPM_BUILD_ROOT@@ -e 's/$/*/' ) >> bin-man-doc-files
117%else
118rm -rf $RPM_BUILD_ROOT%{_mandir}
119%endif
120
121%clean
122rm -rf $RPM_BUILD_ROOT
123
124%files
125# These are no files in the root package
126
127%files svn
128%defattr(-,root,root)
129%{_bindir}/*svn*
130%doc Documentation/*svn*.txt
131%{!?_without_docs: %{_mandir}/man1/*svn*.1*}
132%{!?_without_docs: %doc Documentation/*svn*.html }
133
134%files cvs
135%defattr(-,root,root)
136%doc Documentation/*git-cvs*.txt
137%{_bindir}/*cvs*
138%{!?_without_docs: %{_mandir}/man1/*cvs*.1*}
139%{!?_without_docs: %doc Documentation/*git-cvs*.html }
140
141%files arch
142%defattr(-,root,root)
143%doc Documentation/git-archimport.txt
144%{_bindir}/git-archimport
145%{!?_without_docs: %{_mandir}/man1/git-archimport.1*}
146%{!?_without_docs: %doc Documentation/git-archimport.html }
147
148%files p4
149%defattr(-,root,root)
150%doc Documentation/git-p4import.txt
151%{_bindir}/git-p4import
152%{!?_without_docs: %{_mandir}/man1/git-p4import.1*}
153%{!?_without_docs: %doc Documentation/git-p4import.html }
154
155%files email
156%defattr(-,root,root)
157%doc Documentation/*email*.txt
158%{_bindir}/*email*
159%{!?_without_docs: %{_mandir}/man1/*email*.1*}
160%{!?_without_docs: %doc Documentation/*email*.html }
161
162%files gui
163%defattr(-,root,root)
164%{_bindir}/git-gui
165%{_bindir}/git-citool
166# Not Yet...
167# %{!?_without_docs: %{_mandir}/man1/git-gui.1}
168# %{!?_without_docs: %doc Documentation/git-gui.html}
169# %{!?_without_docs: %{_mandir}/man1/git-citool.1}
170# %{!?_without_docs: %doc Documentation/git-citool.html}
171
172%files -n gitk
173%defattr(-,root,root)
174%doc Documentation/*gitk*.txt
175%{_bindir}/*gitk*
176%{!?_without_docs: %{_mandir}/man1/*gitk*.1*}
177%{!?_without_docs: %doc Documentation/*gitk*.html }
178
179%files -n perl-Git -f perl-files
180%defattr(-,root,root)
181
182%files core -f bin-man-doc-files
183%defattr(-,root,root)
184%{_datadir}/git-core/
185%doc README COPYING Documentation/*.txt
186%{!?_without_docs: %doc Documentation/*.html Documentation/howto}
187
188%changelog
189* Tue May 8 2007 Quy Tonthat <qtonthat@gmail.com>
190- Added howto files
191
192* Tue Mar 27 2007 Eygene Ryabinkin <rea-git@codelabs.ru>
193- Added the git-p4 package: Perforce import stuff.
194
195* Mon Feb 13 2007 Nicolas Pitre <nico@cam.org>
196- Update core package description (Git isn't as stupid as it used to be)
197
198* Mon Feb 12 2007 Junio C Hamano <junkio@cox.net>
199- Add git-gui and git-citool.
200
201* Mon Nov 14 2005 H. Peter Anvin <hpa@zytor.com> 0.99.9j-1
202- Change subpackage names to git-<name> instead of git-core-<name>
203- Create empty root package which brings in all subpackages
204- Rename git-tk -> gitk
205
206* Thu Nov 10 2005 Chris Wright <chrisw@osdl.org> 0.99.9g-1
207- zlib dependency fix
208- Minor cleanups from split
209- Move arch import to separate package as well
210
211* Tue Sep 27 2005 Jim Radford <radford@blackbean.org>
212- Move programs with non-standard dependencies (svn, cvs, email)
213 into separate packages
214
215* Tue Sep 27 2005 H. Peter Anvin <hpa@zytor.com>
216- parallelize build
217- COPTS -> CFLAGS
218
219* Fri Sep 16 2005 Chris Wright <chrisw@osdl.org> 0.99.6-1
220- update to 0.99.6
221
222* Fri Sep 16 2005 Horst H. von Brand <vonbrand@inf.utfsm.cl>
223- Linus noticed that less is required, added to the dependencies
224
225* Sun Sep 11 2005 Horst H. von Brand <vonbrand@inf.utfsm.cl>
226- Updated dependencies
227- Don't assume manpages are gzipped
228
229* Thu Aug 18 2005 Chris Wright <chrisw@osdl.org> 0.99.4-4
230- drop sh_utils, sh-utils, diffutils, mktemp, and openssl Requires
231- use RPM_OPT_FLAGS in spec file, drop patch0
232
233* Wed Aug 17 2005 Tom "spot" Callaway <tcallawa@redhat.com> 0.99.4-3
234- use dist tag to differentiate between branches
235- use rpm optflags by default (patch0)
236- own %{_datadir}/git-core/
237
238* Mon Aug 15 2005 Chris Wright <chrisw@osdl.org>
239- update spec file to fix Buildroot, Requires, and drop Vendor
240
241* Sun Aug 07 2005 Horst H. von Brand <vonbrand@inf.utfsm.cl>
242- Redid the description
243- Cut overlong make line, loosened changelog a bit
244- I think Junio (or perhaps OSDL?) should be vendor...
245
246* Thu Jul 14 2005 Eric Biederman <ebiederm@xmission.com>
247- Add the man pages, and the --without docs build option
248
249* Wed Jul 7 2005 Chris Wright <chris@osdl.org>
250- initial git spec file