2012-01-09 17:12:23 +01:00
|
|
|
#
|
2017-11-30 16:33:55 +01:00
|
|
|
# spec file for package python-rpm
|
2012-01-09 17:12:23 +01:00
|
|
|
#
|
2024-02-01 13:00:07 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2017-11-30 16:33:55 +01:00
|
|
|
# Copyright (c) 2017 Neal Gompa <ngompa13@gmail.com>.
|
2012-01-09 17:12:23 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2020-04-14 12:13:22 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-01-09 17:12:23 +01:00
|
|
|
#
|
|
|
|
|
2012-08-30 18:55:27 +02:00
|
|
|
|
2018-03-28 11:23:52 +02:00
|
|
|
# Enable Python build sourced from rpm spec
|
|
|
|
%global with_python 1
|
2017-11-30 16:33:55 +01:00
|
|
|
Name: python-rpm
|
2024-02-09 11:39:24 +01:00
|
|
|
Version: 4.19.1.1
|
2012-01-18 15:30:38 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Python Bindings for Manipulating RPM Packages
|
2018-03-28 11:23:52 +02:00
|
|
|
License: GPL-2.0-or-later
|
2017-12-19 11:34:07 +01:00
|
|
|
Group: Development/Libraries/Python
|
2019-06-13 16:33:20 +02:00
|
|
|
URL: https://rpm.org/
|
|
|
|
#Git-Clone: https://github.com/rpm-software-management/rpm
|
2018-03-28 11:23:52 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
2023-10-11 17:13:46 +02:00
|
|
|
BuildRequires: cmake
|
2023-11-07 11:56:06 +01:00
|
|
|
BuildRequires: fdupes
|
2012-01-09 17:12:23 +01:00
|
|
|
BuildRequires: file-devel
|
|
|
|
BuildRequires: libacl-devel
|
|
|
|
BuildRequires: libbz2-devel
|
|
|
|
BuildRequires: libcap-devel
|
2023-10-11 17:13:46 +02:00
|
|
|
BuildRequires: libdw-devel
|
2012-01-09 17:12:23 +01:00
|
|
|
BuildRequires: libelf-devel
|
2020-01-17 11:28:50 +01:00
|
|
|
BuildRequires: libgcrypt-devel
|
2012-01-09 17:12:23 +01:00
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: libsemanage-devel
|
|
|
|
BuildRequires: libtool
|
2015-08-10 15:16:09 +02:00
|
|
|
BuildRequires: lua-devel
|
2012-01-09 17:12:23 +01:00
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: popt-devel
|
2017-11-30 16:33:55 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2012-01-09 17:12:23 +01:00
|
|
|
BuildRequires: xz-devel
|
|
|
|
BuildRequires: zlib-devel
|
2019-06-13 16:34:11 +02:00
|
|
|
BuildRequires: pkgconfig(libzstd)
|
2012-01-09 17:12:23 +01:00
|
|
|
Requires: rpm = %{version}
|
2018-03-28 11:23:52 +02:00
|
|
|
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%{_sourcedir}/rpm.spec)}
|
2019-10-02 16:39:02 +02:00
|
|
|
Source99: rpm.spec
|
2017-11-30 16:33:55 +01:00
|
|
|
%if "%{python_flavor}" == "python2"
|
|
|
|
Obsoletes: rpm-python < %{version}-%{release}
|
|
|
|
Provides: rpm-python = %{version}-%{release}
|
|
|
|
%endif
|
|
|
|
%python_subpackages
|
2012-01-09 17:12:23 +01:00
|
|
|
|
|
|
|
%description
|
2017-11-30 16:33:55 +01:00
|
|
|
This package contains a module that permits applications written in
|
|
|
|
the Python programming language to use the interface supplied by
|
|
|
|
RPM Package Manager libraries.
|
2012-01-09 17:12:23 +01:00
|
|
|
|
|
|
|
This package should be installed if you want to develop Python programs
|
|
|
|
that will manipulate RPM packages and databases.
|
|
|
|
|
|
|
|
%prep
|
2018-03-28 11:23:52 +02:00
|
|
|
%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%{_sourcedir}/rpm.spec | sed -e '1d' -e '$d')}
|
2012-01-09 17:12:23 +01:00
|
|
|
|
|
|
|
%install
|
2024-02-01 15:07:57 +01:00
|
|
|
cd _build
|
|
|
|
%{python_expand #
|
|
|
|
cmake .. -U\*Python3\* -DWITH_PYTHON_VERSION=%{$python_version}
|
|
|
|
make DESTDIR=%{buildroot} -C python clean
|
|
|
|
make DESTDIR=%{buildroot} -C python install
|
|
|
|
}
|
|
|
|
|
|
|
|
%python_compileall
|
|
|
|
rm -rf %{buildroot}/%{_defaultdocdir}/%{NAME}
|
2012-01-09 17:12:23 +01:00
|
|
|
|
2017-11-30 16:33:55 +01:00
|
|
|
%files %{python_files}
|
2023-11-07 11:56:06 +01:00
|
|
|
%{python_sitearch}/rpm
|
|
|
|
%{python_sitearch}/rpm-%{version}*-info
|
2012-01-09 17:12:23 +01:00
|
|
|
|
|
|
|
%changelog
|