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 %if 0%{?centos_version}
23 Requires: syslinux >= 3.82
25 Requires: syslinux >= 4.05
29 Requires: device-mapper
30 Requires: /usr/bin/genisoimage
32 %if ! 0%{?tizen_version:1}
37 Requires: python-urlgrabber
38 Requires: yum >= 3.2.24
40 %if ! 0%{?centos_version}
48 %if 0%{?suse_version} || 0%{?tizen_version:1}
49 Requires: squashfs >= 4.0
50 Requires: python-m2crypto
52 Requires: squashfs-tools >= 4.0
56 %if 0%{?fedora_version} || 0%{?centos_version}
57 Requires: syslinux-extlinux
60 %if 0%{?suse_version} || 0%{?tizen_version:1}
61 Requires: /usr/bin/qemu-arm
63 Requires: qemu-arm-static
66 Requires: tizen-python-zypp
68 BuildRequires: python-devel
69 %if ! 0%{?tizen_version:1}
70 BuildRequires: python-docutils
75 BuildRoot: %{_tmppath}/%{name}_%{version}-build
78 The tool mic is used to create and manipulate images for Linux distributions.
79 It is composed of three subcommand\: create, convert, chroot. Subcommand create
80 is used to create images with different types; subcommand convert is used to
81 convert an image to a specified type; subcommand chroot is used to chroot into
85 %setup -q -n %{name}-%{version}
88 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
89 %if ! 0%{?tizen_version:1}
94 rm -rf $RPM_BUILD_ROOT
96 %{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
98 %{__python} setup.py install --root=$RPM_BUILD_ROOT -O1
102 mkdir -p %{buildroot}/%{_prefix}/share/man/man1
103 %if ! 0%{?tizen_version:1}
104 install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
108 %defattr(-,root,root,-)
110 %doc README.rst AUTHORS COPYING ChangeLog
111 %if ! 0%{?tizen_version:1}
114 %dir %{_sysconfdir}/%{name}
115 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
117 %dir %{_prefix}/lib/%{name}
118 %{_prefix}/lib/%{name}/*