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%{?tizen_version:1}
32 BuildRequires: python-devel
33 %if ! 0%{?tizen_version:1}
34 BuildRequires: python-docutils
39 BuildRoot: %{_tmppath}/%{name}_%{version}-build
42 The tool mic is used to create and manipulate images for Linux distributions.
43 It is composed of three subcommand\: create, convert, chroot. Subcommand create
44 is used to create images with different types; subcommand convert is used to
45 convert an image to a specified type; subcommand chroot is used to chroot into
49 Summary: Native support for mic
54 Requires: dosfstools >= 2.11
57 Requires: device-mapper
58 Requires: syslinux >= 3.82
59 %if ! 0%{?suse_version}
60 Requires: syslinux-extlinux >= 3.82
63 %if 0%{?suse_version} || 0%{?tizen_version:1}
64 Requires: squashfs >= 4.0
65 Requires: python-m2crypto
67 Requires: squashfs-tools >= 4.0
71 %if 0%{?suse_version} || 0%{?tizen_version:1}
72 Requires: /usr/bin/qemu-arm
74 Requires: qemu-arm-static
77 %if ! 0%{?tizen_version:1}
79 Requires: /usr/bin/genisoimage
82 Requires: yum >= 3.2.24
83 %if 0%{?tizen_version:1}
86 Requires: python-zypp-tizen
91 #%if 0%{?suse_version}
94 #Requires: btrfs-progs
98 The native support package for mic, it includes all requirements
99 for mic native running.
102 %setup -q -n %{name}-%{version}
105 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
109 rm -rf $RPM_BUILD_ROOT
110 %if 0%{?suse_version}
111 %{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
113 %{__python} setup.py install --root=$RPM_BUILD_ROOT -O1
117 mkdir -p %{buildroot}/%{_prefix}/share/man/man1
118 install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
120 # install bash completion
121 install -d -m0755 %{buildroot}/%{_sysconfdir}/bash_completion.d/
122 install -Dp -m0755 etc/bash_completion.d/%{name}.sh %{buildroot}/%{_sysconfdir}/bash_completion.d/
124 # install zsh completion
125 install -d -m0755 %{buildroot}/%{_sysconfdir}/zsh_completion.d/
126 install -Dp -m0755 etc/zsh_completion.d/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/
128 install -Dp -m0755 tools/mic %{buildroot}/%{_bindir}/mic-native
131 %defattr(-,root,root,-)
133 %doc README.rst AUTHORS COPYING ChangeLog
134 %if ! 0%{?tizen_version:1}
137 %dir %{_sysconfdir}/%{name}
138 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
140 %dir %{_prefix}/lib/%{name}
141 %{_prefix}/lib/%{name}/*
143 %{_sysconfdir}/bash_completion.d
144 %{_sysconfdir}/zsh_completion.d
147 %{_bindir}/mic-native