summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/mic.manifest5
-rw-r--r--packaging/mic.spec43
2 files changed, 40 insertions, 8 deletions
diff --git a/packaging/mic.manifest b/packaging/mic.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/mic.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/mic.spec b/packaging/mic.spec
index 8243337..d78e67b 100644
--- a/packaging/mic.spec
+++ b/packaging/mic.spec
@@ -10,12 +10,15 @@
Name: mic
Summary: Image Creator for Linux Distributions
Version: 0.27.4
-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: python >= 2.6
Requires: python-urlgrabber >= 3.9.0
@@ -38,14 +41,20 @@ Requires: cpio
Requires: gzip
Requires: bzip2
+%if 0%{?tizen_version:1}
+Requires: qemu-linux-user
+%else
+Requires: qemu-arm-static
+%endif
+
BuildRequires: python-devel
%if ! 0%{?tizen_version:1}
BuildRequires: python-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.
@@ -56,22 +65,29 @@ an image.
%prep
%setup -q -n %{name}-%{version}
+%if 0%{?tizen_version:1}
+cp %{SOURCE1001} .
+%endif
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+%if ! 0%{?tizen_version:1}
make man
+%endif
%install
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%if 0%{?suse_version}
-%{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
+%{__python} setup.py install --root=%{buildroot} --prefix=%{_prefix}
%else
-%{__python} setup.py install --root=$RPM_BUILD_ROOT -O1
+%{__python} 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/
@@ -81,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