From 19eee03205fb11ea9e8b5767019394834f94cce5ee62b829d3affe82a6b90d2b Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 20 Nov 2012 19:24:35 +0000 Subject: [PATCH] - Cleanup excessive macro usage - Fix SLE_11_SP2 build (not noarch there) - No need for dos2unix, sed is enough OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pefile?expand=0&rev=3 --- python-pefile.changes | 7 +++++++ python-pefile.spec | 20 +++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/python-pefile.changes b/python-pefile.changes index 3dbec08..445412c 100644 --- a/python-pefile.changes +++ b/python-pefile.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 20 19:25:06 UTC 2012 - saschpe@suse.de + +- Cleanup excessive macro usage +- Fix SLE_11_SP2 build (not noarch there) +- No need for dos2unix, sed is enough + ------------------------------------------------------------------- Fri Sep 21 20:49:38 UTC 2012 - Greg.Freemyer@gmail.com diff --git a/python-pefile.spec b/python-pefile.spec index 2de3856..395925e 100644 --- a/python-pefile.spec +++ b/python-pefile.spec @@ -25,12 +25,11 @@ Group: Development/Libraries/Python Source0: pefile-1.2.10-121.tar.gz Source1: http://reverse-engineering-scripts.googlecode.com/files/UserDB.TXT BuildRequires: python-devel -BuildRequires: dos2unix BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch - %if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%else +BuildArch: noarch %endif %description @@ -39,18 +38,17 @@ PEFILE is a python module that is often used in malware analysis. (Replace this %prep %setup -q -n pefile-1.2.10-121 cp %{SOURCE1} . -dos2unix COPYING -dos2unix %{SOURCE1} - +sed -i "s|\r||" COPYING UserDB.TXT %build -CFLAGS="%{optflags}" python setup.py build +python setup.py build %install -python setup.py install --root=%{buildroot} --prefix=%{_prefix} --record-rpm=INSTALLED_FILES +python setup.py install --root=%{buildroot} --prefix=%{_prefix} -%files -f INSTALLED_FILES +%files %defattr(-,root,root) -%doc UserDB.TXT COPYING README PKG-INFO +%doc UserDB.TXT COPYING README +%{python_sitelib}/* %changelog