From e690b4ec9bc8790cf4fc99a6add2267d3fbca7e22e61d0edc707e3dca9cc0ea5 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 21 Jun 2018 12:41:25 +0000 Subject: [PATCH] Accepting request 618310 from devel:languages:python:singlespec-staging Clean SPEC file OBS-URL: https://build.opensuse.org/request/show/618310 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-distorm3?expand=0&rev=17 --- 0001-don-t-stutter-static-on-BigEndian.patch | 11 +---- distorm3-3.3.4.zip | 3 ++ distorm3-3.3.zip | 3 -- python-distorm3.changes | 11 +++++ python-distorm3.spec | 47 ++++++++++++-------- 5 files changed, 44 insertions(+), 31 deletions(-) create mode 100644 distorm3-3.3.4.zip delete mode 100644 distorm3-3.3.zip diff --git a/0001-don-t-stutter-static-on-BigEndian.patch b/0001-don-t-stutter-static-on-BigEndian.patch index c5ce956..355a312 100644 --- a/0001-don-t-stutter-static-on-BigEndian.patch +++ b/0001-don-t-stutter-static-on-BigEndian.patch @@ -8,11 +8,9 @@ Subject: [PATCH] don't stutter static on BigEndian src/prefix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/src/config.h b/src/config.h -index 7727168..3184cd4 100644 --- a/src/config.h +++ b/src/config.h -@@ -58,7 +58,7 @@ along with this program. If not, see +@@ -57,7 +57,7 @@ This library is licensed under the BSD l #define _DLLEXPORT_ #define _FASTCALL_ @@ -21,11 +19,9 @@ index 7727168..3184cd4 100644 /* GCC ignores this directive... */ /*#define _FASTCALL_ __attribute__((__fastcall__))*/ -diff --git a/src/prefix.c b/src/prefix.c -index 12bfb11..fff5d76 100644 --- a/src/prefix.c +++ b/src/prefix.c -@@ -128,7 +128,7 @@ uint16_t prefixes_set_unused_mask(_PrefixState* ps) +@@ -116,7 +116,7 @@ uint16_t prefixes_set_unused_mask(_Prefi * Mark a prefix as unused, and bookkeep where we last saw this same type, * because in the future we might want to disable it too. */ @@ -34,6 +30,3 @@ index 12bfb11..fff5d76 100644 { prefixes_ignore(ps, pi); /* Book-keep the current index for this type. */ --- -1.6.0.2 - diff --git a/distorm3-3.3.4.zip b/distorm3-3.3.4.zip new file mode 100644 index 0000000..cfa9e53 --- /dev/null +++ b/distorm3-3.3.4.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4dddc2d3cf4fe3e1f8b35507e3c30b082f6e0b0ae46e71c4d6ed6f463eb09ae +size 129202 diff --git a/distorm3-3.3.zip b/distorm3-3.3.zip deleted file mode 100644 index a289075..0000000 --- a/distorm3-3.3.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d311d232e108def8acac0d4f6514e7bc070e37d7aa123ab9a9a05b9322321582 -size 239738 diff --git a/python-distorm3.changes b/python-distorm3.changes index 7cff826..d795709 100644 --- a/python-distorm3.changes +++ b/python-distorm3.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Jun 21 12:40:12 UTC 2018 - mcepl@suse.com + +- Clean SPEC file + +------------------------------------------------------------------- +Thu Aug 24 13:36:13 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Mon Jul 24 06:14:18 UTC 2017 - bwiedemann@suse.com @@ -63,3 +73,4 @@ Mon Feb 6 23:20:54 UTC 2012 - Greg.Freemyer@gmail.com distorm is a powerful disassembler library for x86/AMD64. It is used by volatility for memory (RAM) forensics. + diff --git a/python-distorm3.spec b/python-distorm3.spec index add6c3e..a5899e9 100644 --- a/python-distorm3.spec +++ b/python-distorm3.spec @@ -1,7 +1,7 @@ # # spec file for package python-distorm3 # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,45 +16,54 @@ # -Name: python-distorm3 -Version: 3.3 +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define modname distorm3 + +Name: python-%{modname} +Version: 3.3.4 Release: 0 Summary: Powerful Disassembler Library For x86/AMD64 -License: GPL-3.0 +# TODO Is it so? +License: GPL-3.0-only Group: Development/Libraries/Python -Url: http://code.google.com/p/distorm/ -Source: distorm3-%{version}.zip +URL: https://github.com/gdabah/distorm +Source: https://files.pythonhosted.org/packages/source/d/%{modname}/%{modname}-%{version}.zip +# Issue filed upstream https://github.com/gdabah/distorm/issues/123 Patch0: 0001-don-t-stutter-static-on-BigEndian.patch # PATCH-FIX-UPSTREAM https://github.com/gdabah/distorm/pull/116 Patch1: reproducible.patch +BuildRequires: %{python_module devel} BuildRequires: fdupes -BuildRequires: python-devel +BuildRequires: python-rpm-macros BuildRequires: unzip -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%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)")} -%endif +%python_subpackages %description No more parsing strings! - diStorm3 is really a decomposer, which means it takes an instruction and returns a binary structure which describes it rather -than static text. +than static text. %prep -%setup -q -n distorm3 +%setup -q -n %{modname}-%{version} %patch0 -p1 %patch1 -p1 %build -CFLAGS="%{optflags}" python setup.py build +export CFLAGS="%{optflags}" +%python_build %install -python setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python_sitearch} -%fdupes -s %{buildroot} +%python_install +# setup.py install puts files into wrong directory +# https://github.com/gdabah/distorm/issues/124 +%python_expand mkdir -p %{buildroot}%{$python_sitearch} +%python_expand mv -v %{buildroot}%{$python_sitelib}/%{modname}* %{buildroot}%{$python_sitearch} +%python_expand %fdupes %{buildroot}%{$python_sitearch} -%files -%defattr(-,root,root) -%doc COPYING +# tests are not packaged in the upstream tarball + +%files %{python_files} +%license COPYING %{python_sitearch}/* %changelog