File sw-tools.spec of Package sw-tools

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name:		sw-tools
Version:	0.1
Release:	1
Summary:	Generate binary update packs

Group:		Development/Tools
License:	GPL V2
URL:		http://www.tizen.org
Source0:	%{name}-%{version}-tizen.tar.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:	python-devel
Requires:	yum
Requires:	deltarpm
Requires:       python-deltarpm

%description
This is a tool to help genearting binary update packs


%prep
%setup -q -n %{name}-%{version}


%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%if 0%{?suse_version}
%{__python} setup.py install --root=$RPM_BUILD_ROOT --prefix=%{_prefix}
%else
%{__python} setup.py install --root=$RPM_BUILD_ROOT -O1 --prefix=%{_prefix}
%endif


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README
%{python_sitelib}/*
%{_bindir}/*