summaryrefslogtreecommitdiff
path: root/packaging/mic.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/mic.spec')
-rw-r--r--packaging/mic.spec43
1 files changed, 27 insertions, 16 deletions
diff --git a/packaging/mic.spec b/packaging/mic.spec
index 7ea48ed..11733ac 100644
--- a/packaging/mic.spec
+++ b/packaging/mic.spec
@@ -1,15 +1,15 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-
Name: mic
Summary: Image Creator for Linux Distributions
Version: 0.19
-Release: 1
+Release: 0
Group: System/Utilities
License: GPL-2.0
BuildArch: noarch
URL: http://www.tizen.org
-Source0: %{name}_%{version}.tar.gz
-Source1001: mic.manifest
+Source0: %{name}-%{version}.tar.gz
+%if 0%{?tizen_version:1}
+Source1001: mic.manifest
+%endif
Requires: python-rpm
Requires: util-linux
Requires: coreutils
@@ -60,9 +60,9 @@ BuildRequires: python-devel
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.
@@ -73,33 +73,45 @@ 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
+%__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
+mkdir -p %{buildroot}%{_mandir}/man1
%if ! 0%{?tizen_version:1}
-install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
+install -m644 doc/mic.1 %{buildroot}%{_mandir}/man1
%endif
+%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
@@ -109,4 +121,3 @@ install -m644 doc/mic.1 %{buildroot}/%{_prefix}/share/man/man1
%dir %{_prefix}/lib/%{name}
%{_prefix}/lib/%{name}/*
%{_bindir}/*
-