From 43711c1d56fd3161cf9f0feabf5a96c1284c181aa60ceaafae0368878cc55d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Sun, 14 Aug 2022 21:01:32 +0000 Subject: [PATCH] - Initial packaging for openSUSE. OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/python-drgn?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++++ .gitignore | 1 + drgn-0.0.20.tar.gz | 3 ++ python-drgn.changes | 4 +++ python-drgn.spec | 72 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 103 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 drgn-0.0.20.tar.gz create mode 100644 python-drgn.changes create mode 100644 python-drgn.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/drgn-0.0.20.tar.gz b/drgn-0.0.20.tar.gz new file mode 100644 index 0000000..654e881 --- /dev/null +++ b/drgn-0.0.20.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92f9a6b7327091d4d86a8a0f2b564ccff082869dae0471b1f9b6220a7fe2a13a +size 1010574 diff --git a/python-drgn.changes b/python-drgn.changes new file mode 100644 index 0000000..4b574c7 --- /dev/null +++ b/python-drgn.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sun Aug 14 20:51:07 UTC 2022 - Petr Tesařík + +- Initial packaging for openSUSE. diff --git a/python-drgn.spec b/python-drgn.spec new file mode 100644 index 0000000..4b155bc --- /dev/null +++ b/python-drgn.spec @@ -0,0 +1,72 @@ +# +# spec file for package python-drgn +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define skip_python2 1 + +%{?!python_module:%define python_module() python3-%{**}} + +Name: python-drgn +Version: 0.0.20 +Release: 0 +Summary: Scriptable debugger library +License: GPL-3.0-or-later +Group: Development/Tools/Debuggers +URL: https://github.com/osandov/drgn +Source: https://files.pythonhosted.org/packages/source/d/drgn/drgn-%{version}.tar.gz +BuildRequires: libdw-devel +BuildRequires: libelf-devel +BuildRequires: libkdumpfile-devel +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +%python_subpackages + +%description +drgn (pronounced “dragon”) is a debugger with an emphasis on +programmability. drgn exposes the types and variables in a program +for easy, expressive scripting in Python. + +%prep +%setup -q -n drgn-%{version} + +%build +export CFLAGS="%{optflags}" +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/drgn +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +%python_exec setup.py test + +%post +%python_install_alternative drgn + +%postun +%python_uninstall_alternative drgn + +%files %{python_files} +%doc README.rst +%license COPYING +%python_alternative %{_bindir}/drgn +%{python_sitearch}/* + +%changelog