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
7 Group: Development/Tools
10 URL: http://www.tizen.org
11 Source0: %{name}_%{version}.tar.gz
13 Requires: python >= 2.6
14 Requires: python-urlgrabber >= 3.9.0
15 %if 0%{?tizen_version:1}
26 BuildRequires: python-devel
27 %if ! 0%{?tizen_version:1}
28 BuildRequires: python-docutils
33 BuildRoot: %{_tmppath}/%{name}_%{version}-build
36 The tool mic is used to create and manipulate images for Linux distributions.
37 It is composed of three subcommand\: create, convert, chroot. Subcommand create
38 is used to create images with different types; subcommand convert is used to
39 convert an image to a specified type; subcommand chroot is used to chroot into
43 Summary: Native support for mic
48 Requires: dosfstools >= 2.11
51 Requires: device-mapper
52 Requires: syslinux >= 3.82
53 %if ! 0%{?suse_version}
54 Requires: syslinux-extlinux >= 3.82
57 %if 0%{?suse_version} || 0%{?tizen_version:1}
58 Requires: squashfs >= 4.0
59 Requires: python-m2crypto
61 Requires: squashfs-tools >= 4.0
65 %if 0%{?suse_version} || 0%{?tizen_version:1}
66 Requires: /usr/bin/qemu-arm
68 Requires: qemu-arm-static
71 %if ! 0%{?tizen_version:1}
73 Requires: /usr/bin/genisoimage
76 Requires: yum >= 3.2.24
77 %if 0%{?tizen_version:1}
80 Requires: tizen-python-zypp
85 #%if 0%{?suse_version}
88 #Requires: btrfs-progs
92 The native support package for mic, it includes all requirements
93 for mic native running.
96 %setup -q -n %{name}-%{version}
99 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
103 rm -rf $RPM_BUILD_ROOT
104 %if 0%{?suse_version}
105 %{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
107 %{__python} setup.py install --root=$RPM_BUILD_ROOT -O1
111 mkdir -p %{buildroot}/%{_prefix}/share/man/man1
112 install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
114 # install bash completion
115 install -d -m0755 %{buildroot}/%{_sysconfdir}/bash_completion.d/
116 install -Dp -m0755 etc/%{name}.bash %{buildroot}/%{_sysconfdir}/bash_completion.d/%{name}.sh
118 # install zsh completion
119 install -d -m0755 %{buildroot}/%{_sysconfdir}/zsh_completion.d/
120 install -Dp -m0755 etc/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/_%{name}
122 install -Dp -m0755 tools/mic %{buildroot}/%{_bindir}/mic-native
125 %defattr(-,root,root,-)
127 %doc README.rst AUTHORS COPYING ChangeLog
128 %if ! 0%{?tizen_version:1}
131 %dir %{_sysconfdir}/%{name}
132 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
134 %dir %{_prefix}/lib/%{name}
135 %{_prefix}/lib/%{name}/*
137 %{_sysconfdir}/bash_completion.d
138 %{_sysconfdir}/zsh_completion.d
141 %{_bindir}/mic-native