summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwang biao <biao716.wang@samsung.com>2023-06-21 05:32:02 +0000
committerGerrit Code Review <gerrit@review>2023-06-21 05:32:02 +0000
commita841ad323610dc89c088113f2103828160d086b6 (patch)
tree8f54141cdb127fd4dbf3123f5cfff051bf5c8b35
parent822f1ef791210181ad9a6837a3db4fd90576e59d (diff)
parent382504be5df16ec942301594ab6bd146613d1f66 (diff)
downloadmic-a841ad323610dc89c088113f2103828160d086b6.tar.gz
mic-a841ad323610dc89c088113f2103828160d086b6.tar.bz2
mic-a841ad323610dc89c088113f2103828160d086b6.zip
Merge "fix build error" into sandbox/wangbiao/py3_version
-rwxr-xr-xpackaging/mic.spec54
1 files changed, 40 insertions, 14 deletions
diff --git a/packaging/mic.spec b/packaging/mic.spec
index 4a30006..f59dd4e 100755
--- a/packaging/mic.spec
+++ b/packaging/mic.spec
@@ -1,4 +1,3 @@
-
%define rc_version 0
%if 0%{?rc_version}
@@ -8,14 +7,17 @@
Name: mic
Summary: Image Creator for Linux Distributions
Version: 0.28.19
-Release: %{?release_prefix}%{?opensuse_bs:<CI_CNT>.<B_CNT>}%{!?opensuse_bs:0}
+Release: 0
Group: Development/Tools
License: GPLv2
BuildArch: noarch
URL: http://www.tizen.org
Source0: %{name}_%{version}.tar.gz
+%if 0%{?tizen_version:1}
+Source1001: mic.manifest
+%endif
-Requires: python3 >= 3.1
+Requires: python3 >= 3.2
#for mic in mic-bootstrap, we don't need the below three dependency packages.
#what is more, thre is no python3.x version currently in tizne platform.
@@ -24,29 +26,35 @@ Requires: python3 >= 3.1
#Requires: python3-requests
#xml module has been exist in python3 path once installing python3 package.
-%if 0%{?suse_version}
+%if 0%{?suse_version}
Requires: python3-xml
%endif
%if 0%{?tizen_version:1}
Requires: python3-rpm
%else
-Requires: rpm-python
+Requires: rpm-python3
%endif
-Requires: python3-distro
+
Requires: cpio
# not neccessary
Requires: gzip
Requires: bzip2
+%if 0%{?tizen_version:1}
+Requires: qemu-linux-user
+%else
+Requires: qemu-arm-static
+%endif
+
BuildRequires: python3-devel
%if ! 0%{?tizen_version:1}
BuildRequires: python3-docutils
%endif
-Obsoletes: mic2
-
-BuildRoot: %{_tmppath}/%{name}_%{version}-build
+%if ! 0%{?centos_version}
+BuildRequires:fdupes
+%endif
%description
The tool mic is used to create and manipulate images for Linux distributions.
@@ -57,22 +65,29 @@ an image.
%prep
%setup -q -n %{name}-%{version}
+%if 0%{?tizen_version:1}
+cp %{SOURCE1001} .
+%endif
%build
CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build
-make man
+%if ! 0%{?tizen_version:1}
+ make man
+%endif
%install
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%if 0%{?suse_version}
-python3 setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
+python3 setup.py install --root=%{buildroot} --prefix=%{_prefix}
%else
-python3 setup.py install --root=$RPM_BUILD_ROOT -O1
+python3 setup.py install --root=%{buildroot} -O1
%endif
# install man page
mkdir -p %{buildroot}/%{_prefix}/share/man/man1
+%if ! 0%{?tizen_version:1}
install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
+%endif
# install bash completion
install -d -m0755 %{buildroot}/%{_sysconfdir}/bash_completion.d/
@@ -82,10 +97,21 @@ install -Dp -m0755 etc/bash_completion.d/%{name}.sh %{buildroot}/%{_sysconfdir}/
install -d -m0755 %{buildroot}/%{_sysconfdir}/zsh_completion.d/
install -Dp -m0755 etc/zsh_completion.d/_%{name} %{buildroot}/%{_sysconfdir}/zsh_completion.d/
+%if ! 0%{?centos_version}
+%fdupes %{buildroot}
+%endif
+
+
%files
+%if 0%{?tizen_version:1}
+%manifest %{name}.manifest
+%endif
%defattr(-,root,root,-)
+%if ! (0%{?suse_version} || 0%{?centos_version})
+%license COPYING
+%endif
%doc doc/*
-%doc README.rst AUTHORS COPYING ChangeLog
+%doc README.rst AUTHORS ChangeLog
%if ! 0%{?tizen_version:1}
%{_mandir}/man1/*
%endif