From f3c5c243acb69b01a32a869354cd63a40b36058f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Sun, 28 Mar 2021 10:53:33 +0200 Subject: [PATCH] Initial definition for python-adblock --- python-adblock/python-adblock.spec | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 python-adblock/python-adblock.spec diff --git a/python-adblock/python-adblock.spec b/python-adblock/python-adblock.spec new file mode 100644 index 0000000..b2e7cd3 --- /dev/null +++ b/python-adblock/python-adblock.spec @@ -0,0 +1,51 @@ +%global srcname adblock + +Name: python-%{srcname} +Version: 0.4.3 +Release: 1%{?dist} +Summary: Python wrapper for Brave's adblocking library + +License: MIT and ASL 2.0 +URL: https://pypi.org/project/adblock/ +Source0: %{pypi_source} + +BuildRequires: python3-devel +BuildRequires: rust-packaging +BuildRequires: maturin +BuildRequires: unzip + +%global _description Python wrapper for Brave's adblocking library, which is \ + written in Rust. + +%description +%{_description} + +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description -n python3-%{srcname} +%{_description} + +%prep +%autosetup -n %{srcname}-%{version} + +%build +maturin build --release +unzip -d target/wheels/ target/wheels/%{srcname}-%{version}-*.whl + +%install +mkdir -p %{buildroot}/%{python3_sitelib}/ +cp -r target/wheels/%{srcname} %{buildroot}/%{python3_sitelib}/ +cp -r target/wheels/%{srcname}-%{version}.dist-info %{buildroot}/%{python3_sitelib}/ + +%files -n python3-%{srcname} +%license LICENSE-MIT LICENSE-APACHE +%doc README.md CHANGELOG.md +%{python3_sitelib}/%{srcname}-%{version}.dist-info/ +%{python3_sitelib}/%{srcname}/ + +%changelog +* Sun Mar 28 2021 Timothée Floure - 0.4.3-1 +- Let there be package. -- 2.45.2