clean spec file 43/27843/3 tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/common/20150317.155307 accepted/tizen/ivi/20160218.025222 accepted/tizen/mobile/20150326.005124 accepted/tizen/tv/20150324.014556 accepted/tizen/wearable/20150323.005720 submit/tizen_common/20150317.151734 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000006 submit/tizen_mobile/20150325.000000 submit/tizen_tv/20150320.000002 submit/tizen_tv/20150323.050640 submit/tizen_wearable/20150320.000000 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
authorRonan Le Martret <ronan@fridu.net>
Fri, 19 Sep 2014 16:12:50 +0000 (18:12 +0200)
committerRonan Le Martret <ronan@fridu.net>
Tue, 23 Sep 2014 09:33:09 +0000 (11:33 +0200)
 - improve rpmlint score
 - remove duplicate files

Change-Id: Ia647d4b3010cab5f85e002cfdbd7cbdcc338d02b
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
packaging/mic.spec

index 7ea48ed..11733ac 100644 (file)
@@ -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}/*
-