mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
spec: Add python bindings
This commit is contained in:
parent
7831a65091
commit
89574055f7
@ -1,3 +1,22 @@
|
|||||||
|
%with default-dm-run-dir %{_default_dm_run_dir}
|
||||||
|
%with default-run-dir %{_default_run_dir}
|
||||||
|
%with default-pid-dir %{_default_pid_dir}
|
||||||
|
%with default-locking-dir %{_default_locking_dir}
|
||||||
|
%with usrlibdir %{_libdir}
|
||||||
|
%enableif 1 lvm1_fallback
|
||||||
|
%enableif 1 fsadm
|
||||||
|
%with pool internal
|
||||||
|
%with user
|
||||||
|
%with group
|
||||||
|
%with device-uid 0
|
||||||
|
%with device-gid 6
|
||||||
|
%with device-mode 0660
|
||||||
|
%enableif 1 pkgconfig
|
||||||
|
%enableif 1 applib
|
||||||
|
%enableif 1 cmdlib
|
||||||
|
%enableif 1 dmeventd
|
||||||
|
%enableif 1 write_install
|
||||||
|
|
||||||
%with udevdir %{_udevdir}
|
%with udevdir %{_udevdir}
|
||||||
%enableif %{enable_cmirror} cmirrord
|
%enableif %{enable_cmirror} cmirrord
|
||||||
%enableif %{enable_udev} udev_sync
|
%enableif %{enable_udev} udev_sync
|
||||||
@ -11,28 +30,22 @@
|
|||||||
%enableif %{enable_lockd_dlm} lockd-dlm
|
%enableif %{enable_lockd_dlm} lockd-dlm
|
||||||
%enableif %{enable_lockd_sanlock} lockd-sanlock
|
%enableif %{enable_lockd_sanlock} lockd-sanlock
|
||||||
%endif
|
%endif
|
||||||
|
%enableif %{enable_python} python-bindings
|
||||||
|
%enableif %{enable_python} applib
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
|
||||||
--with-default-dm-run-dir=%{_default_dm_run_dir} \
|
%if %{enable_python3}
|
||||||
--with-default-run-dir=%{_default_run_dir} \
|
rm -rf %{py3dir}
|
||||||
--with-default-pid-dir=%{_default_pid_dir} \
|
cp -a . %{py3dir}
|
||||||
--with-default-locking-dir=%{_default_locking_dir} \
|
pushd %{py3dir}
|
||||||
--with-usrlibdir=%{_libdir} \
|
%configure %{configure_flags} PYTHON=/usr/bin/python3 PYTHON_CONFIG=/usr/bin/python3-config
|
||||||
--enable-lvm1_fallback \
|
|
||||||
--enable-fsadm \
|
make %{?_smp_mflags}
|
||||||
--with-pool=internal \
|
popd
|
||||||
--with-user= \
|
%endif
|
||||||
--with-group= \
|
|
||||||
--with-device-uid=0 \
|
%configure %{configure_flags}
|
||||||
--with-device-gid=6 \
|
|
||||||
--with-device-mode=0660 \
|
|
||||||
--enable-pkgconfig \
|
|
||||||
--enable-applib \
|
|
||||||
--enable-cmdlib \
|
|
||||||
--enable-dmeventd \
|
|
||||||
--enable-write_install \
|
|
||||||
%{configure_flags}
|
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
%{?extra_build_commands}
|
%{?extra_build_commands}
|
||||||
@ -50,6 +63,11 @@ make install_initscripts DESTDIR=$RPM_BUILD_ROOT
|
|||||||
%if %{enable_testsuite}
|
%if %{enable_testsuite}
|
||||||
make -C test install DESTDIR=$RPM_BUILD_ROOT
|
make -C test install DESTDIR=$RPM_BUILD_ROOT
|
||||||
%endif
|
%endif
|
||||||
|
%if %{enable_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
make -C python install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
# when building an src.rpm from freestanding specfiles
|
# when building an src.rpm from freestanding specfiles
|
||||||
test -e %{_sourcedir}/source.inc || cp source.inc build.inc packages.inc macros.inc %{_sourcedir}
|
test -e %{_sourcedir}/source.inc || cp source.inc build.inc packages.inc macros.inc %{_sourcedir}
|
||||||
|
@ -410,6 +410,60 @@ fi
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Python bindings
|
||||||
|
##############################################################################
|
||||||
|
%if %{enable_python}
|
||||||
|
%package python-libs
|
||||||
|
Summary: Python module to access LVM
|
||||||
|
License: LGPLv2
|
||||||
|
Group: Development/Libraries
|
||||||
|
Provides: python-lvm = %{version}-%{release}
|
||||||
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
|
|
||||||
|
%description python-libs
|
||||||
|
Python module to allow the creation and use of LVM
|
||||||
|
logical volumes, physical volumes, and volume groups.
|
||||||
|
|
||||||
|
%files python-libs
|
||||||
|
%{python_sitearch}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{enable_python3}
|
||||||
|
%package python3-libs
|
||||||
|
Summary: Python 3 module to access LVM
|
||||||
|
License: LGPLv2
|
||||||
|
Group: Development/Libraries
|
||||||
|
Provides: python3-lvm = %{version}-%{release}
|
||||||
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
|
|
||||||
|
%description python3-libs
|
||||||
|
Python 3 module to allow the creation and use of LVM
|
||||||
|
logical volumes, physical volumes, and volume groups.
|
||||||
|
|
||||||
|
%files python3-libs
|
||||||
|
%{python3_sitearch}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Testsuite subpackage
|
||||||
|
##############################################################################
|
||||||
|
%if %{enable_testsuite}
|
||||||
|
%package testsuite
|
||||||
|
Summary: LVM2 Testsuite
|
||||||
|
License: LGPLv2
|
||||||
|
Group: Development
|
||||||
|
|
||||||
|
%description testsuite
|
||||||
|
An extensive functional testsuite for LVM2.
|
||||||
|
|
||||||
|
%files testsuite
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_datadir}/lvm2-testsuite/
|
||||||
|
%{_libexecdir}/lvm2-testsuite/
|
||||||
|
%{_bindir}/lvm2-testsuite
|
||||||
|
%endif
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Device-mapper subpackages
|
# Device-mapper subpackages
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -571,18 +625,3 @@ the device-mapper event library.
|
|||||||
%{_includedir}/libdevmapper-event.h
|
%{_includedir}/libdevmapper-event.h
|
||||||
%{_libdir}/pkgconfig/devmapper-event.pc
|
%{_libdir}/pkgconfig/devmapper-event.pc
|
||||||
|
|
||||||
%if %{enable_testsuite}
|
|
||||||
%package testsuite
|
|
||||||
Summary: LVM2 Testsuite
|
|
||||||
License: LGPLv2
|
|
||||||
Group: Development
|
|
||||||
|
|
||||||
%description testsuite
|
|
||||||
An extensive functional testsuite for LVM2.
|
|
||||||
|
|
||||||
%files testsuite
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_datadir}/lvm2-testsuite/
|
|
||||||
%{_libexecdir}/lvm2-testsuite/
|
|
||||||
%{_bindir}/lvm2-testsuite
|
|
||||||
%endif
|
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
%global enable_profiling 0
|
%global enable_profiling 0
|
||||||
%global enable_testsuite 1
|
%global enable_testsuite 1
|
||||||
|
%global enable_python 1
|
||||||
|
# Off by default - <= does not work well with or:
|
||||||
|
%global enable_python3 0
|
||||||
%global enable_udev 1
|
%global enable_udev 1
|
||||||
%global enable_systemd 1
|
%global enable_systemd 1
|
||||||
%global enable_cmirror 1
|
%global enable_cmirror 1
|
||||||
@ -65,6 +68,25 @@
|
|||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
|
%if %{rhel} == 5
|
||||||
|
%global enable_python 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{rhel} >= 8 || %{fedora} >= 20
|
||||||
|
%global enable_python3 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{enable_python}
|
||||||
|
%global buildreq_python2_devel python2-devel
|
||||||
|
%global buildreq_python_setuptools python-setuptools
|
||||||
|
%endif
|
||||||
|
%if %{enable_python3}
|
||||||
|
%global buildreq_python3_devel python3-devel
|
||||||
|
%global buildreq_python_setuptools python-setuptools
|
||||||
|
%endif
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
|
||||||
%if %{fedora} == 16 || %{rhel} == 6
|
%if %{fedora} == 16 || %{rhel} == 6
|
||||||
%global enable_systemd 0
|
%global enable_systemd 0
|
||||||
|
|
||||||
@ -143,6 +165,9 @@ BuildRequires: pkgconfig
|
|||||||
%maybe BuildRequires: %{?buildreq_cluster}
|
%maybe BuildRequires: %{?buildreq_cluster}
|
||||||
%maybe BuildRequires: %{?buildreq_lockd_dlm}
|
%maybe BuildRequires: %{?buildreq_lockd_dlm}
|
||||||
%maybe BuildRequires: %{?buildreq_lockd_sanlock}
|
%maybe BuildRequires: %{?buildreq_lockd_sanlock}
|
||||||
|
%maybe BuildRequires: %{?buildreq_python2_devel}
|
||||||
|
%maybe BuildRequires: %{?buildreq_python3_devel}
|
||||||
|
%maybe BuildRequires: %{?buildreq_python_setuptools}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
LVM2 includes all of the support for handling read/write operations on
|
LVM2 includes all of the support for handling read/write operations on
|
||||||
|
Loading…
Reference in New Issue
Block a user