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>
Thu, 5 Jun 2014 11:20:07 +0000 (14:20 +0300)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
packaging/git-buildpackage.spec

index 3a193fd..26f1f43 100644 (file)
@@ -149,9 +149,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
@@ -168,7 +166,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*
@@ -177,6 +178,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