4 %define release_prefix 0.rc%{rc_version}.
8 Summary: Image Creator for Linux Distributions
10 Release: %{?release_prefix}%{?opensuse_bs:<CI_CNT>.<B_CNT>}%{!?opensuse_bs:0}
11 Group: Development/Tools
14 URL: http://www.tizen.org
15 Source0: %{name}_%{version}.tar.gz
17 Requires: python3 >= 3.2
19 #Have integrated urlgrabber requests packages to mic source code.
20 #But urlgrabber depends python3-pycurl, requests depends python3-py
21 #Requires: python3-urlgrabber >= 3.9.0
23 #Requires: python3-requests
26 Requires: python3-pycurl
27 Requires: python3-distro
34 BuildRequires: python3-setuptools
35 BuildRequires: python3-devel
36 %if ! 0%{?tizen_version:1}
37 BuildRequires: python3-docutils
42 BuildRoot: %{_tmppath}/%{name}_%{version}-build
45 The tool mic is used to create and manipulate images for Linux distributions.
46 It is composed of three subcommand\: create, convert, chroot. Subcommand create
47 is used to create images with different types; subcommand convert is used to
48 convert an image to a specified type; subcommand chroot is used to chroot into
52 %setup -q -n %{name}-%{version}
55 CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build
59 rm -rf $RPM_BUILD_ROOT
61 python3 setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
63 python3 setup.py install --root=$RPM_BUILD_ROOT -O1
67 mkdir -p %{buildroot}/%{_prefix}/share/man/man1
68 install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
70 # install bash completion
71 install -d -m0755 %{buildroot}/%{_sysconfdir}/bash_completion.d/
72 install -Dp -m0755 etc/bash_completion.d/%{name}.sh %{buildroot}/%{_sysconfdir}/bash_completion.d/
74 # install zsh completion
75 install -d -m0755 %{buildroot}/%{_sysconfdir}/zsh_completion.d/
76 install -Dp -m0755 etc/zsh_completion.d/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/
79 %defattr(-,root,root,-)
81 %doc README.rst AUTHORS COPYING ChangeLog
82 %if ! 0%{?tizen_version:1}
85 %dir %{_sysconfdir}/%{name}
86 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
88 %dir %{_prefix}/lib/%{name}
89 %{_prefix}/lib/%{name}/*
91 %{_sysconfdir}/bash_completion.d
92 %{_sysconfdir}/zsh_completion.d