CentOS compatibility: disable Debian tools
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 24 Apr 2013 11:08:19 +0000 (14:08 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 14 Nov 2014 12:46:24 +0000 (14:46 +0200)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
packaging/git-buildpackage.spec

index ec019bc40e5aeb868317d76b7beafa2212741649..7ac503f357e682bb6891ed6a35bf8740074f2a14 100644 (file)
@@ -171,9 +171,7 @@ cp -r docs/manual-html %{buildroot}%{_docdir}/%{name}
 cp -r docs/apidocs %{buildroot}%{_docdir}/%{name}
 %endif
 
-
-%files
-%defattr(-,root,root,-)
+cat > files.list << EOF
 %{_bindir}/gbp-pq
 %{_bindir}/git-buildpackage
 %{_bindir}/git-dch
@@ -190,7 +188,10 @@ cp -r docs/apidocs %{buildroot}%{_docdir}/%{name}
 %{python_sitelib}/gbp/scripts/import_dscs.py*
 %{python_sitelib}/gbp/scripts/import_orig.py*
 %{python_sitelib}/gbp/scripts/create_remote_repo.py*
+EOF
+
 %if %{with docs}
+cat >> files.list << EOF
 %{_mandir}/man1/gbp-buildpackage.1*
 %{_mandir}/man1/gbp-create-remote-repo.1*
 %{_mandir}/man1/gbp-dch.1*
@@ -199,6 +200,19 @@ cp -r docs/apidocs %{buildroot}%{_docdir}/%{name}
 %{_mandir}/man1/gbp-import-orig.1*
 %{_mandir}/man1/gbp-pq.1*
 %{_mandir}/man1/git-pbuilder.1*
+EOF
+%endif
+
+# Disable the debian tools for CentOS
+%if 0%{?centos_version}
+for f in `cat files.list`; do
+    rm -rfv %{buildroot}/$f
+done
+
+%else
+
+%files -f files.list
+%defattr(-,root,root,-)
 %endif
 
 %files common