[cloud-utils/el6] Build growpart subpackage on all EPEL architectures
Juerg Haefliger
juergh at fedoraproject.org
Tue Aug 6 11:12:37 UTC 2013
commit b54a90ec75467850dabf983b98b23db1a11fe629
Author: Juerg Haefliger <juergh at gmail.com>
Date: Tue Aug 6 07:11:28 2013 -0400
Build growpart subpackage on all EPEL architectures
Fixes bz #986809.
cloud-utils.spec | 39 +++++++++++++++++++++++++++++----------
1 files changed, 29 insertions(+), 10 deletions(-)
---
diff --git a/cloud-utils.spec b/cloud-utils.spec
index bd9fc1d..6f93327 100644
--- a/cloud-utils.spec
+++ b/cloud-utils.spec
@@ -1,7 +1,7 @@
Summary: Cloud image management utilities
Name: cloud-utils
Version: 0.27
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPLv3
Group: System Environment/Base
URL: https://launchpad.net/cloud-utils/trunk/0.27/+download/cloud-utils-0.27.tar.gz
@@ -11,11 +11,6 @@ Source1: LICENSE
BuildArch: noarch
-%if 0%{?rhel}
-# Exclude EPEL architectures that don't have qemu-img
-ExcludeArch: i386 ppc64
-%endif
-
Requires: cloud-utils-growpart
Requires: gawk
Requires: e2fsprogs
@@ -56,6 +51,16 @@ primarily used in cloud images in conjunction with the dracut-modules-growroot
package to grow the root partition on first boot.
+# Don't build the cloud-utils main package on EPEL architectures that don't
+# have qemu-img
+%define BuildMainPackage 1
+%if 0%{?rhel}
+%ifarch i386 ppc64
+%define BuildMainPackage 0
+%endif # %ifarch i386 ppc64
+%endif # %if 0%{?rhel}
+
+
%prep
%setup -q
@@ -66,17 +71,26 @@ package to grow the root partition on first boot.
%install
cp %{SOURCE1} LICENSE
-# Install binaries
+# Create the target directories
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
+mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
+
+%if %{BuildMainPackage}
+# Install binaries and manpages
cp bin/* $RPM_BUILD_ROOT/%{_bindir}/
+cp man/* $RPM_BUILD_ROOT/%{_mandir}/man1/
+
# Exclude Ubuntu-specific tools
rm $RPM_BUILD_ROOT/%{_bindir}/*ubuntu*
+%endif # %if %{BuildMainPackage}
-# Install man pages
-mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
-cp man/* $RPM_BUILD_ROOT/%{_mandir}/man1/
+# Install the growpart binary and man page
+cp bin/growpart $RPM_BUILD_ROOT/%{_bindir}/
+cp man/growpart.* $RPM_BUILD_ROOT/%{_mandir}/man1/
+# Files for the main package
+%if %{BuildMainPackage}
%files
%doc ChangeLog LICENSE
%{_bindir}/cloud-localds
@@ -91,8 +105,10 @@ cp man/* $RPM_BUILD_ROOT/%{_mandir}/man1/
%doc %{_mandir}/man1/cloud-run-instances.*
%doc %{_mandir}/man1/resize-part-image.*
%doc %{_mandir}/man1/write-mime-multipart.*
+%endif # %if %{BuildMainPackage}
+# Files for the growpart subpackage
%files growpart
%doc ChangeLog LICENSE
%{_bindir}/growpart
@@ -100,6 +116,9 @@ cp man/* $RPM_BUILD_ROOT/%{_mandir}/man1/
%changelog
+* Tue Aug 6 2013 Juerg Haefliger <juergh at gmail.com> - 0.27-6
+- Build the growpart subpackage on all EPEL architectures [bz#986809].
+
* Mon Jun 17 2013 Juerg Haefliger <juergh at gmail.com> - 0.27-5
- Don't make gdisk a hard requirement for cloud-utils-growpart to save some
space on systems that don't use GPT partitions.
More information about the scm-commits
mailing list