1 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
4 Summary: Image Creator for Linux Distributions
10 URL: http://www.tizen.org
11 Source0: %{name}_%{version}.tar.gz
12 %if 0%{?tizen_version:1}
19 Requires: python >= 2.5
21 Requires: dosfstools >= 2.11
22 Requires: syslinux >= 4.05
25 Requires: device-mapper
26 Requires: /usr/bin/genisoimage
28 %if ! 0%{?tizen_version:1}
33 Requires: python-urlgrabber
34 Requires: yum >= 3.2.24
36 %if ! 0%{?centos_version}
44 %if 0%{?suse_version} || 0%{?tizen_version:1}
45 Requires: squashfs >= 4.0
46 Requires: python-m2crypto
48 Requires: squashfs-tools >= 4.0
52 %if 0%{?fedora_version} || 0%{?centos_version}
53 Requires: syslinux-extlinux
56 %if 0%{?suse_version} || 0%{?tizen_version:1}
57 Requires: /usr/bin/qemu-arm
59 Requires: qemu-arm-static
62 Requires: tizen-python-zypp
64 BuildRequires: python-devel
65 %if ! 0%{?tizen_version:1}
66 BuildRequires: python-docutils
71 BuildRoot: %{_tmppath}/%{name}_%{version}-build
74 The tool mic is used to create and manipulate images for Linux distributions.
75 It is composed of three subcommand\: create, convert, chroot. Subcommand create
76 is used to create images with different types; subcommand convert is used to
77 convert an image to a specified type; subcommand chroot is used to chroot into
81 %setup -q -n %{name}-%{version}
84 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
85 %if ! 0%{?tizen_version:1}
90 rm -rf $RPM_BUILD_ROOT
92 %{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
94 %{__python} setup.py install --root=$RPM_BUILD_ROOT -O1
98 mkdir -p %{buildroot}/%{_prefix}/share/man/man1
99 %if ! 0%{?tizen_version:1}
100 install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
104 %defattr(-,root,root,-)
106 %doc README.rst AUTHORS COPYING ChangeLog
107 %if ! 0%{?tizen_version:1}
110 %dir %{_sysconfdir}/%{name}
111 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
113 %dir %{_prefix}/lib/%{name}
114 %{_prefix}/lib/%{name}/*