1 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2 %{!?python_version: %define python_version %(%{__python} -c "import sys; sys.stdout.write(sys.version[:3])")}
7 %define release_prefix 0.rc%{rc_version}.
11 Summary: Image Creator for Linux Distributions
14 Group: Development/Tools
17 URL: http://www.tizen.org
18 Source0: %{name}_%{version}.tar.gz
19 %if 0%{?tizen_version:1}
20 Source1001: mic.manifest
23 Requires: python >= 2.6
24 Requires: python-urlgrabber >= 3.9.0
25 %if 0%{?suse_version} || 0%{?tizen_version:1}
29 %if "%{?python_version}" < "2.7"
30 Requires: python-argparse
33 %if 0%{?tizen_version:1}
44 %if 0%{?tizen_version:1}
45 Requires: qemu-linux-user
47 Requires: qemu-arm-static
50 BuildRequires: python-devel
51 %if ! 0%{?tizen_version:1}
52 BuildRequires: python-docutils
55 %if ! 0%{?centos_version}
60 The tool mic is used to create and manipulate images for Linux distributions.
61 It is composed of three subcommand\: create, convert, chroot. Subcommand create
62 is used to create images with different types; subcommand convert is used to
63 convert an image to a specified type; subcommand chroot is used to chroot into
67 %setup -q -n %{name}-%{version}
68 %if 0%{?tizen_version:1}
73 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
74 %if ! 0%{?tizen_version:1}
81 %{__python} setup.py install --root=%{buildroot} --prefix=%{_prefix}
83 %{__python} setup.py install --root=%{buildroot} -O1
87 mkdir -p %{buildroot}/%{_prefix}/share/man/man1
88 %if ! 0%{?tizen_version:1}
89 install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
92 # install bash completion
93 install -d -m0755 %{buildroot}/%{_sysconfdir}/bash_completion.d/
94 install -Dp -m0755 etc/bash_completion.d/%{name}.sh %{buildroot}/%{_sysconfdir}/bash_completion.d/
96 # install zsh completion
97 install -d -m0755 %{buildroot}/%{_sysconfdir}/zsh_completion.d/
98 install -Dp -m0755 etc/zsh_completion.d/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/
100 %if ! 0%{?centos_version}
106 %if 0%{?tizen_version:1}
107 %manifest %{name}.manifest
109 %defattr(-,root,root,-)
110 %if ! (0%{?suse_version} || 0%{?centos_version})
114 %doc README.rst AUTHORS ChangeLog
115 %if ! 0%{?tizen_version:1}
118 %dir %{_sysconfdir}/%{name}
119 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
121 %dir %{_prefix}/lib/%{name}
122 %{_prefix}/lib/%{name}/*
124 %{_sysconfdir}/bash_completion.d
125 %{_sysconfdir}/zsh_completion.d