1 %define is_tizen %(test -e /etc/tizen-release -o -e /etc/meego-release && echo 1 || echo 0)
2 %{!?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
15 Requires: python >= 2.5
17 Requires: dosfstools >= 2.11-8
18 Requires: syslinux >= 3.82
21 Requires: device-mapper
22 Requires: /usr/bin/genisoimage
27 Requires: squashfs-tools >= 4.0
28 Requires: qemu-arm-static
29 Requires: python-urlgrabber
31 Requires: yum >= 3.2.24
39 %if 0%{?fedora_version} || 0%{is_tizen} == 1
42 %if 0%{?suse_version} == 1210
43 Requires: python-M2Crypto
45 Requires: python-m2crypto
49 %if 0%{?fedora_version} > 13 || 0%{is_tizen} == 1
50 Requires: syslinux-extlinux
54 BuildRequires: python-devel
58 BuildRoot: %{_tmppath}/%{name}-%{version}-build
62 The tool mic is used to create and manipulate images for Linux distributions.
63 It is composed of three subcommand\: create, convert, chroot. Subcommand create
64 is used to create images with different types; subcommand convert is used to
65 convert an image to a specified type; subcommand chroot is used to chroot into
70 %setup -q -n %{name}-%{version}
73 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
77 rm -rf $RPM_BUILD_ROOT
79 %{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
81 %{__python} setup.py install --root=$RPM_BUILD_ROOT -O1
85 # remove yum backend for tizen
87 rm -rf %{buildroot}/%{_prefix}/lib/%{name}/plugins/backend/yumpkgmgr.py
88 rm -rf %{buildroot}/%{_sysconfdir}/%{name}/bootstrap.conf
90 mkdir -p %{buildroot}/%{_prefix}/share/man/man1
91 install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
94 %defattr(-,root,root,-)
97 %dir %{_sysconfdir}/%{name}
98 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
100 %config %{_sysconfdir}/%{name}/bootstrap.conf
103 %dir %{_prefix}/lib/%{name}
104 %{_prefix}/lib/%{name}/*