1 # Add --without docs rpmbuild option, i.e. docs are enabled by default
5 Summary: Build packages from git
8 Group: Development/Tools/Building
11 URL: https://honk.sigxcpu.org/piki/projects/git-buildpackage/
12 Source0: %{name}_%{version}.tar.gz
14 # Conditional package names for requirements
15 %if 0%{?fedora} || 0%{?centos_ver}
16 %define dpkg_pkg_name dpkg-devel
18 %define dpkg_pkg_name dpkg
21 %if 0%{?suse_version} && 0%{?suse_version} < 1230
22 %define devscripts_pkg_name devscripts-fixes
24 %define devscripts_pkg_name devscripts
28 %define man_pkg_name man-db
30 %define man_pkg_name man
33 %if 0%{?fedora} || 0%{?centos_ver} || 0%{?tizen_version:1}
34 %define python_pkg_name python
36 %define python_pkg_name python-base
39 %if 0%{?tizen_version:1}
40 %define rpm_python_pkg_name python-rpm
42 %define rpm_python_pkg_name rpm-python
45 Requires: %{name}-common = %{version}-%{release}
46 Requires: %{dpkg_pkg_name}
47 Requires: %{devscripts_pkg_name}
49 BuildRequires: python-setuptools
52 BuildRequires: docbook-utils
53 BuildRequires: gtk-doc
56 BuildRequires: perl-podlators
61 BuildRequires: python-coverage
62 BuildRequires: python-nose
63 BuildRequires: git-core
64 BuildRequires: %{man_pkg_name}
65 BuildRequires: %{dpkg_pkg_name}
66 BuildRequires: %{rpm_python_pkg_name}
67 BuildRequires: pristine-tar
71 # Missing dep of dpkg in openSUSE
73 BuildRequires: perl-TimeDate
78 Set of tools from Debian that integrate the package build system with Git.
79 This package contains the original Debian tools.
83 Summary: Common files for git-buildpackage debian and rpm tools
84 Group: Development/Tools/Building
86 Requires: %{man_pkg_name}
87 Requires: %{python_pkg_name}
88 %if 0%{?suse_version} || 0%{?tizen_version:1}
89 Recommends: pristine-tar
93 Requires: pristine-tar
99 Common files and documentation, used by both git-buildpackage debian and rpm tools
103 Summary: Build RPM packages from git
104 Group: Development/Tools/Building
105 Requires: %{name}-common = %{version}-%{release}
107 Requires: %{rpm_python_pkg_name}
108 %if 0%{?suse_version} || 0%{?tizen_version:1}
109 Recommends: rpm-build
113 Provides: tizen-gbp-rpm = 20130902
116 Set of tools from Debian that integrate the package build system with Git.
117 This package contains the tools for building RPM packages.
122 Summary: Documentation for the git-buildpackage suite
123 Group: Development/Tools/Building
126 This package contains documentation for the git-buildpackage suite - both the
127 Debian and the RPM tool set.
132 %setup -q -n %{name}-%{version}
137 WITHOUT_NOSETESTS=1 %{__python} ./setup.py build
141 epydoc -n git-buildpackage --no-sourcecode -o docs/apidocs/ \
145 HAVE_SGML2X=0 make -C docs/
149 %if 0%{?do_unittests}
151 GIT_CEILING_DIRECTORIES=%{_builddir} \
152 GIT_AUTHOR_EMAIL=rpmbuild@example.com GIT_AUTHOR_NAME=rpmbuild \
153 GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL \
154 %{__python} setup.py nosetests
160 WITHOUT_NOSETESTS=1 %{__python} ./setup.py install --root=%{buildroot} --prefix=/usr
161 rm -rf %{buildroot}%{python_sitelib}/*info
165 install -d %{buildroot}%{_mandir}/man1 %{buildroot}%{_mandir}/man5
166 install docs/*.1 %{buildroot}%{_mandir}/man1/
167 install docs/*.5 %{buildroot}%{_mandir}/man5/
169 # Install html documentation
170 mkdir -p %{buildroot}%{_docdir}/%{name}
171 cp -r docs/manual-html %{buildroot}%{_docdir}/%{name}
172 cp -r docs/apidocs %{buildroot}%{_docdir}/%{name}
175 cat > files.list << EOF
177 %{_bindir}/git-buildpackage
179 %{_bindir}/git-import-dsc
180 %{_bindir}/git-import-dscs
181 %{_bindir}/git-import-orig
182 %{_bindir}/git-pbuilder
183 %{_bindir}/gbp-create-remote-repo
184 %{python_sitelib}/gbp/deb
185 %{python_sitelib}/gbp/scripts/pq.py*
186 %{python_sitelib}/gbp/scripts/buildpackage.py*
187 %{python_sitelib}/gbp/scripts/dch.py*
188 %{python_sitelib}/gbp/scripts/import_dsc.py*
189 %{python_sitelib}/gbp/scripts/import_dscs.py*
190 %{python_sitelib}/gbp/scripts/import_orig.py*
191 %{python_sitelib}/gbp/scripts/create_remote_repo.py*
195 cat >> files.list << EOF
196 %{_mandir}/man1/gbp-buildpackage.1*
197 %{_mandir}/man1/gbp-create-remote-repo.1*
198 %{_mandir}/man1/gbp-dch.1*
199 %{_mandir}/man1/gbp-import-dsc.1*
200 %{_mandir}/man1/gbp-import-dscs.1*
201 %{_mandir}/man1/gbp-import-orig.1*
202 %{_mandir}/man1/gbp-pq.1*
203 %{_mandir}/man1/git-pbuilder.1*
207 # Disable the debian tools for CentOS
208 %if 0%{?centos_version}
209 for f in `cat files.list`; do
210 rm -rfv %{buildroot}/$f
216 %defattr(-,root,root,-)
220 %defattr(-,root,root,-)
224 %dir %{python_sitelib}/gbp
225 %dir %{python_sitelib}/gbp/git
226 %dir %{python_sitelib}/gbp/pkg
227 %dir %{python_sitelib}/gbp/scripts
228 %dir %{python_sitelib}/gbp/scripts/common
229 %{python_sitelib}/gbp/*.py*
230 %{python_sitelib}/gbp/scripts/__init__.py*
231 %{python_sitelib}/gbp/scripts/clone.py*
232 %{python_sitelib}/gbp/scripts/config.py*
233 %{python_sitelib}/gbp/scripts/pull.py*
234 %{python_sitelib}/gbp/scripts/supercommand.py*
235 %{python_sitelib}/gbp/scripts/common/*.py*
236 %{python_sitelib}/gbp/git/*.py*
237 %{python_sitelib}/gbp/pkg/*.py*
238 %config %{_sysconfdir}/git-buildpackage
240 %{_mandir}/man1/gbp.1*
241 %{_mandir}/man1/gbp-clone.1*
242 %{_mandir}/man1/gbp-config.1*
243 %{_mandir}/man1/gbp-pull.1*
249 %defattr(-,root,root,-)
250 %dir %{python_sitelib}/gbp/rpm
251 %{python_sitelib}/gbp/scripts/*rpm*.py*
252 %{python_sitelib}/gbp/rpm/*py*
257 %defattr(-,root,root,-)