summaryrefslogtreecommitdiff
path: root/packaging/mic.spec
diff options
context:
space:
mode:
authorGui Chen <gui.chen@intel.com>2013-11-26 01:52:26 -0500
committerGui Chen <gui.chen@intel.com>2013-12-03 21:24:20 -0500
commitba653fc818eda8aeefc2604f07332cbe72d083fb (patch)
treeed48880845561ed8098902feee19208be68a06db /packaging/mic.spec
parentc0dff6dd4bd3087cceada997df97abf596efd6ef (diff)
downloadmic-ba653fc818eda8aeefc2604f07332cbe72d083fb.tar.gz
mic-ba653fc818eda8aeefc2604f07332cbe72d083fb.tar.bz2
mic-ba653fc818eda8aeefc2604f07332cbe72d083fb.zip
split native requirements to native-mic package
Change-Id: I3dda824ac750573b4403e087fff31bc78a3ad29a Signed-off-by: Gui Chen <gui.chen@intel.com>
Diffstat (limited to 'packaging/mic.spec')
-rw-r--r--packaging/mic.spec100
1 files changed, 56 insertions, 44 deletions
diff --git a/packaging/mic.spec b/packaging/mic.spec
index 0cda6da..f43208e 100644
--- a/packaging/mic.spec
+++ b/packaging/mic.spec
@@ -4,45 +4,54 @@ Name: mic
Summary: Image Creator for Linux Distributions
Version: 0.22
Release: 1
-Group: System/Base
+Group: Development/Tools
License: GPLv2
BuildArch: noarch
URL: http://www.tizen.org
Source0: %{name}_%{version}.tar.gz
+
+Requires: python >= 2.6
+Requires: python-urlgrabber >= 3.9.0
%if 0%{?tizen_version:1}
Requires: python-rpm
%else
Requires: rpm-python
%endif
+
+Requires: cpio
+# not neccessary
+Requires: gzip
+Requires: bzip2
+
+BuildRequires: python-devel
+%if ! 0%{?tizen_version:1}
+BuildRequires: python-docutils
+%endif
+
+Obsoletes: mic2
+
+BuildRoot: %{_tmppath}/%{name}_%{version}-build
+
+%description
+The tool mic is used to create and manipulate images for Linux distributions.
+It is composed of three subcommand\: create, convert, chroot. Subcommand create
+is used to create images with different types; subcommand convert is used to
+convert an image to a specified type; subcommand chroot is used to chroot into
+an image.
+
+%package native
+Summary: Native support for mic
Requires: util-linux
Requires: coreutils
-Requires: python >= 2.5
+Requires: psmisc
Requires: e2fsprogs
Requires: dosfstools >= 2.11
-%if 0%{?centos_version}
-Requires: syslinux >= 3.82
-%else
-Requires: syslinux >= 4.05
-%endif
Requires: kpartx
Requires: parted
Requires: device-mapper
-Requires: /usr/bin/genisoimage
-Requires: cpio
-%if ! 0%{?tizen_version:1}
-Requires: isomd5sum
-%endif
-Requires: gzip
-Requires: bzip2
-Requires: python-urlgrabber >= 3.9.0
-Requires: yum >= 3.2.24
-Requires: psmisc
-%if ! 0%{?centos_version}
-%if 0%{?suse_version}
-Requires: btrfsprogs
-%else
-Requires: btrfs-progs
-%endif
+Requires: syslinux >= 3.82
+%if ! 0%{?suse_version}
+Requires: syslinux-extlinux >= 3.82
%endif
%if 0%{?suse_version} || 0%{?tizen_version:1}
@@ -53,42 +62,42 @@ Requires: squashfs-tools >= 4.0
Requires: m2crypto
%endif
-%if 0%{?fedora_version} || 0%{?centos_version}
-Requires: syslinux-extlinux
-%endif
-
%if 0%{?suse_version} || 0%{?tizen_version:1}
Requires: /usr/bin/qemu-arm
%else
Requires: qemu-arm-static
%endif
-Requires: tizen-python-zypp
-
-BuildRequires: python-devel
%if ! 0%{?tizen_version:1}
-BuildRequires: python-docutils
+Requires: isomd5sum
+Requires: /usr/bin/genisoimage
%endif
-Obsoletes: mic2
+Requires: yum >= 3.2.24
+%if 0%{?tizen_version:1}
+Requires: python-zypp
+%else
+Requires: tizen-python-zypp
+%endif
-BuildRoot: %{_tmppath}/%{name}_%{version}-build
+Requires: mic
-%description
-The tool mic is used to create and manipulate images for Linux distributions.
-It is composed of three subcommand\: create, convert, chroot. Subcommand create
-is used to create images with different types; subcommand convert is used to
-convert an image to a specified type; subcommand chroot is used to chroot into
-an image.
+#%if 0%{?suse_version}
+#Requires: btrfsprogs
+#%else
+#Requires: btrfs-progs
+#%endif
+
+%description native
+The native support package for mic, it includes all requirements
+for mic native running.
%prep
%setup -q -n %{name}-%{version}
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
-%if ! 0%{?tizen_version:1}
make man
-%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -100,9 +109,7 @@ rm -rf $RPM_BUILD_ROOT
# install man page
mkdir -p %{buildroot}/%{_prefix}/share/man/man1
-%if ! 0%{?tizen_version:1}
install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
-%endif
# install bash completion
install -d -m0755 %{buildroot}/%{_sysconfdir}/bash_completion.d/
@@ -112,6 +119,8 @@ install -Dp -m0755 etc/%{name}.bash %{buildroot}/%{_sysconfdir}/bash_completion.
install -d -m0755 %{buildroot}/%{_sysconfdir}/zsh_completion.d/
install -Dp -m0755 etc/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/_%{name}
+install -Dp -m0755 tools/mic %{buildroot}/%{_bindir}/mic-native
+
%files
%defattr(-,root,root,-)
%doc doc/*
@@ -124,6 +133,9 @@ install -Dp -m0755 etc/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/_%{
%{python_sitelib}/*
%dir %{_prefix}/lib/%{name}
%{_prefix}/lib/%{name}/*
-%{_bindir}/*
+%{_bindir}/mic
%{_sysconfdir}/bash_completion.d
%{_sysconfdir}/zsh_completion.d
+
+%files native
+%{_bindir}/mic-native