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