cloud-utils/cloud-utils.spec

116 lines
2.7 KiB
RPMSpec
Raw Normal View History

2013-02-18 17:33:01 +00:00
Summary: Cloud image management utilities
Name: cloud-utils
Version: 0.31
Release: %autorelease
License: GPL-3.0-only
URL: https://launchpad.net/cloud-utils/
2013-02-18 17:33:01 +00:00
Source0: https://launchpad.net/%{name}/trunk/0.31/+download/%{name}-%{version}.tar.gz
2013-02-18 17:33:01 +00:00
# Don't build the cloud-utils main package on EPEL architectures that don't
# have qemu-img. Which means we need to make it a no-noarch package for EPEL
# for this to work properly.
%define BuildMainPackage 1
%if 0%{?rhel}
# don't build debuginfo packages
%global debug_package %{nil}
%ifarch i686 ppc64
%define BuildMainPackage 0
%endif
%else
2013-02-18 17:33:01 +00:00
BuildArch: noarch
%endif
2013-02-18 17:33:01 +00:00
Requires: %{name}-growpart
2013-02-18 17:33:01 +00:00
Requires: gawk
Requires: e2fsprogs
Requires: file
Requires: python3
2013-02-18 17:33:01 +00:00
Requires: qemu-img
Requires: util-linux
%description
This package provides a useful set of utilities for managing cloud images.
The tasks associated with image bundling are often tedious and repetitive. The
cloud-utils package provides several scripts that wrap the complicated tasks
with a much simpler interface.
%package growpart
Summary: Script for growing a partition
Requires: gawk
# gdisk is only required for resizing GPT partitions and depends on libicu
# (25MB). We don't make this a hard requirement to save some space in non-GPT
# systems.
Recommends: gdisk
Requires: util-linux
%description growpart
This package provides the growpart script for growing a partition. It is
primarily used in cloud images in conjunction with the dracut-modules-growroot
package to grow the root partition on first boot.
2013-02-18 17:33:01 +00:00
%prep
%setup -q
2013-02-18 17:33:01 +00:00
%build
%install
# Create the target directories
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/man1
%if %{BuildMainPackage}
# Install binaries and manpages
cp bin/* %{buildroot}%{_bindir}/
cp man/* %{buildroot}%{_mandir}/man1/
2013-02-18 17:33:01 +00:00
# Exclude Ubuntu-specific tools
rm %{buildroot}%{_bindir}/*ubuntu*
# Exclude the cloud-run-instances manpage
rm -f %{buildroot}%{_mandir}/man1/cloud-run-instances.*
# Exclude euca2ools wrappers and manpages
rm -f %{buildroot}%{_bindir}/cloud-publish-*
rm -f %{buildroot}%{_mandir}/man1/cloud-publish-*
%endif
2013-02-18 17:33:01 +00:00
# Install the growpart binary and man page
cp bin/growpart %{buildroot}%{_bindir}/
cp man/growpart.* %{buildroot}%{_mandir}/man1/
2013-02-18 17:33:01 +00:00
# Files for the main package
%if %{BuildMainPackage}
2013-02-18 17:33:01 +00:00
%files
2014-07-11 20:40:44 +00:00
%doc ChangeLog
%license LICENSE
%{_bindir}/cloud-localds
%{_bindir}/write-mime-multipart
%{_bindir}/ec2metadata
%{_bindir}/resize-part-image
%{_bindir}/mount-image-callback
%{_bindir}/vcs-run
%doc %{_mandir}/man1/resize-part-image.*
%doc %{_mandir}/man1/write-mime-multipart.*
%doc %{_mandir}/man1/cloud-localds.*
%endif
# Files for the growpart subpackage
%files growpart
2014-07-11 20:40:44 +00:00
%doc ChangeLog
%license LICENSE
%{_bindir}/growpart
%doc %{_mandir}/man1/growpart.*
2013-02-18 17:33:01 +00:00
%changelog
%autochangelog