1 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
6 %define release_prefix 0.rc%{rc_version}.
10 Summary: Image Creator for Linux Distributions
12 Release: %{?release_prefix}%{?opensuse_bs:<CI_CNT>.<B_CNT>}%{!?opensuse_bs:0}
13 Group: Development/Tools
16 URL: http://www.tizen.org
17 Source0: %{name}_%{version}.tar.gz
19 Requires: python >= 2.6
20 Requires: python-urlgrabber >= 3.9.0
21 %if 0%{?suse_version} || 0%{?tizen_version:1}
25 %if 0%{?tizen_version:1}
36 BuildRequires: python-devel
37 %if ! 0%{?tizen_version:1}
38 BuildRequires: python-docutils
43 BuildRoot: %{_tmppath}/%{name}_%{version}-build
46 The tool mic is used to create and manipulate images for Linux distributions.
47 It is composed of three subcommand\: create, convert, chroot. Subcommand create
48 is used to create images with different types; subcommand convert is used to
49 convert an image to a specified type; subcommand chroot is used to chroot into
53 Summary: Native support for mic
58 Requires: dosfstools >= 2.11
61 Requires: device-mapper
62 Requires: syslinux >= 3.82
63 %if ! 0%{?suse_version}
64 Requires: syslinux-extlinux >= 3.82
67 %if 0%{?suse_version} || 0%{?tizen_version:1}
68 Requires: squashfs >= 4.0
69 Requires: python-m2crypto
72 Requires: squashfs-tools >= 4.0
76 %if 0%{?suse_version} || 0%{?tizen_version:1}
77 Requires: /usr/bin/qemu-arm
79 Requires: qemu-arm-static
82 %if ! 0%{?tizen_version:1}
84 Requires: /usr/bin/genisoimage
87 Requires: yum >= 3.2.24
88 %if 0%{?tizen_version:1}
91 Requires: python-zypp-tizen
96 #%if 0%{?suse_version}
99 #Requires: btrfs-progs
103 The native support package for mic, it includes all requirements
104 for mic native running.
107 %setup -q -n %{name}-%{version}
110 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
114 rm -rf $RPM_BUILD_ROOT
115 %if 0%{?suse_version}
116 %{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
118 %{__python} setup.py install --root=$RPM_BUILD_ROOT -O1
122 mkdir -p %{buildroot}/%{_prefix}/share/man/man1
123 install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
125 # install bash completion
126 install -d -m0755 %{buildroot}/%{_sysconfdir}/bash_completion.d/
127 install -Dp -m0755 etc/bash_completion.d/%{name}.sh %{buildroot}/%{_sysconfdir}/bash_completion.d/
129 # install zsh completion
130 install -d -m0755 %{buildroot}/%{_sysconfdir}/zsh_completion.d/
131 install -Dp -m0755 etc/zsh_completion.d/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/
133 install -Dp -m0755 tools/mic %{buildroot}/%{_bindir}/mic-native
136 %defattr(-,root,root,-)
138 %doc README.rst AUTHORS COPYING ChangeLog
139 %if ! 0%{?tizen_version:1}
142 %dir %{_sysconfdir}/%{name}
143 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
145 %dir %{_prefix}/lib/%{name}
146 %{_prefix}/lib/%{name}/*
148 %{_sysconfdir}/bash_completion.d
149 %{_sysconfdir}/zsh_completion.d
152 %{_bindir}/mic-native