Dominique Leuenberger 2019-10-23 13:32:45 +00:00 committed by Git OBS Bridge
commit e95eb8e93c
2 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Oct 15 14:22:21 UTC 2019 - Johannes Thumshirn <jthumshirn@suse.com>
- Enable build of python-bindings for libbtrfsutil
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 17 10:01:18 UTC 2019 - Frederic Crozat <fcrozat@suse.com> Tue Sep 17 10:01:18 UTC 2019 - Frederic Crozat <fcrozat@suse.com>

View File

@ -19,6 +19,7 @@
%define udev_with_btrfs_builtin 190 %define udev_with_btrfs_builtin 190
%define udev_version %(rpm -q --queryformat %%{VERSION} udev) %define udev_version %(rpm -q --queryformat %%{VERSION} udev)
%define package_udev_rules %{udev_version} >= %{udev_with_btrfs_builtin} %define package_udev_rules %{udev_version} >= %{udev_with_btrfs_builtin}
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# enable building of btrfsprogs-static # enable building of btrfsprogs-static
%if 0%{?suse_version} <= 1310 || 0%{?suse_version} == 1315 %if 0%{?suse_version} <= 1310 || 0%{?suse_version} == 1315
@ -173,6 +174,19 @@ Requires: libbtrfsutil1 = %{version}
This package contains the libraries and headers files for developers to This package contains the libraries and headers files for developers to
build applications to interface with Btrfs using libbtrfsutil. build applications to interface with Btrfs using libbtrfsutil.
%package -n python-btrfsutil
Summary: Python bindings for developing with libbtrfsutil
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
Requires: libbtrfsutil1 = %{version}
Requires: python3
BuildRequires: %{python_module setuptools}
BuildRequires: pkgconfig(python3)
%description -n python-btrfsutil
This package contains the python bindings to build applications to interface
with Btrfs using libbtrfsutil.
%prep %prep
%setup -q -n btrfs-progs-v%{version} %setup -q -n btrfs-progs-v%{version}
%patch1 -p1 %patch1 -p1
@ -185,7 +199,7 @@ export CFLAGS="%{optflags} -include sles11-defaults.h"
%endif %endif
%configure \ %configure \
--disable-python \ --enable-python \
%if !%{build_docs} %if !%{build_docs}
--disable-documentation \ --disable-documentation \
%endif %endif
@ -203,7 +217,8 @@ make install \
%if %{build_static} %if %{build_static}
install-static \ install-static \
%endif %endif
DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_sbindir} mandir=%{_mandir} libdir=%{_libdir} \
install_python
%if !%{build_docs} %if !%{build_docs}
cd Documentation cd Documentation
@ -398,4 +413,7 @@ done
%{_udevrulesdir}/64-btrfs-dm.rules %{_udevrulesdir}/64-btrfs-dm.rules
%endif %endif
%files -n python-btrfsutil
%{python3_sitearch}/*
%changelog %changelog