summaryrefslogtreecommitdiff
path: root/python3-scapy.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-29 08:57:35 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-29 08:57:35 +0000
commit960df39a45cc52b10953162f3c514ff894c3eebe (patch)
tree11acdb8d2825f9642af735acff93530858851b1c /python3-scapy.spec
parent7bec646a817fb3223b5f17c6ce7ca5dce3d12a04 (diff)
automatic import of python-scapyopeneuler24.03_LTS_SP3
Diffstat (limited to 'python3-scapy.spec')
-rw-r--r--python3-scapy.spec71
1 files changed, 71 insertions, 0 deletions
diff --git a/python3-scapy.spec b/python3-scapy.spec
new file mode 100644
index 0000000..9ea700f
--- /dev/null
+++ b/python3-scapy.spec
@@ -0,0 +1,71 @@
+# 构建系统:setuptools.build_meta + setup.py(pyproject.toml 存在但 build-backend=setuptools.build_meta)
+# topdir: python-scapy-2.7.0(由 --transform 重命名,与 %%autosetup -n %%{name}-%%{version} 对齐)
+%global pypi_name scapy
+
+Name: python-%{pypi_name}
+Version: 2.7.0
+Release: 1%{?dist}
+Summary: Interactive packet manipulation tool
+License: GPL-2.0-only
+URL: https://github.com/secdev/scapy
+Source0: https://github.com/secdev/scapy/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools >= 62.0.0
+
+%description
+Scapy is a powerful Python-based interactive packet manipulation program and
+library. It is able to forge or decode packets of a wide number of protocols,
+send them on the wire, capture them, store or read them using pcap files,
+match requests and replies, and much more. It is designed to allow fast packet
+prototyping by using default values that work.
+
+%package -n python3-%{pypi_name}
+Summary: Interactive packet manipulation tool
+Provides: python-%{pypi_name}
+Provides: python3dist(%{pypi_name}) = %{version}
+
+%description -n python3-%{pypi_name}
+Scapy is a powerful Python-based interactive packet manipulation program and
+library. It is able to forge or decode packets of a wide number of protocols,
+send them on the wire, capture them, store or read them using pcap files,
+match requests and replies, and much more. It is designed to allow fast packet
+prototyping by using default values that work.
+
+%package help
+Summary: Development documents and examples for %{pypi_name}
+Requires: python3-%{pypi_name}
+Provides: python3-%{pypi_name}-doc
+
+%description help
+Scapy is a powerful Python-based interactive packet manipulation program and
+library. This package contains development documents and examples for Scapy.
+
+%prep
+%autosetup -n %{name}-%{version} -p1
+
+%build
+# scapy 版本通过 _version() 动态检测(SCAPY_VERSION 环境变量 > VERSION 文件 > git archive > git describe > 文件修改日期)。
+# tarball 无 .git 元数据也无 VERSION 文件,须通过 SCAPY_VERSION 环境变量强制指定版本,否则回退到文件修改日期导致版本号错误。
+export SCAPY_VERSION=%{version}
+%py3_build
+
+%install
+export SCAPY_VERSION=%{version}
+%py3_install
+
+%files -n python3-%{pypi_name}
+%license LICENSE
+%{python3_sitelib}/scapy/
+%{python3_sitelib}/scapy-%{version}*.egg-info/
+%{_bindir}/scapy
+%{_mandir}/man1/scapy.1*
+
+%files help
+%license LICENSE
+%doc README.md
+
+%changelog
+* Tue Sep 29 2026 Python_Bot <Python_Bot@openeuler.org> - 2.7.0-1
+- Initial package