using fc macros to achieve noarchness

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=26
This commit is contained in:
Jan Matejek 2009-07-31 21:49:32 +00:00 committed by Git OBS Bridge
parent 23bdafba4b
commit 0fa32cfc73
2 changed files with 16 additions and 13 deletions

View File

@ -1,5 +1,5 @@
-------------------------------------------------------------------
Thu Jul 30 18:02:32 CEST 2009 - matejcik@suse.cz
Fri Jul 31 23:48:25 CEST 2009 - matejcik@suse.cz
- added noarch for suse > 11.1

View File

@ -29,10 +29,12 @@ BuildRequires: python-devel
Requires: python-devel
%endif
# %if 0%{?suse_version} <= 1110
# %else
# BuildArch: noarch
# %endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%if 0%{?suse_version} <= 1110
%else
BuildArch: noarch
%endif
Version: 0.6c9
Release: 10
@ -74,23 +76,24 @@ export CFLAGS="$RPM_OPT_FLAGS"
%{__python} setup.py install -O1 --skip-build \
--prefix=%{_prefix} \
--root $RPM_BUILD_ROOT \
--single-version-externally-managed
--single-version-externally-managed \
--record-rpm=INSTALLED_FILES
install -p -m 0644 %{SOURCE1} %{SOURCE2} .
find $RPM_BUILD_ROOT%{py_sitedir} -name '*.exe' | xargs rm -f
find $RPM_BUILD_ROOT%{py_sitedir} -name '*.txt' | xargs chmod -x
chmod +x $RPM_BUILD_ROOT%{py_sitedir}/setuptools/command/easy_install.py
find $RPM_BUILD_ROOT%{python_sitelib} -name '*.txt' -exec chmod -x {} ";"
chmod +x $RPM_BUILD_ROOT%{python_sitelib}/setuptools/command/easy_install.py
%if 0%{?suse_version} > 1020
%fdupes $RPM_BUILD_ROOT%{py_sitedir}
%fdupes $RPM_BUILD_ROOT%{python_sitelib}
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%files -f INSTALLED_FILES
%defattr(-,root,root,-)
%doc *.txt
%{_bindir}/*
%{py_sitedir}/*
#%{_bindir}/*
#%{python_sitelib}/*
%changelog
* Wed Oct 22 2008 skh@suse.de