Conditional Perl & Python module build
By default disabled - seem to be unused. Debian has them disabled too. Related: rhbz#2245793
This commit is contained in:
parent
c88325940a
commit
a2170f0b38
@ -1,5 +1,8 @@
|
|||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
|
%bcond_with python
|
||||||
|
%bcond_with perl
|
||||||
|
|
||||||
Summary: IPMI (Intelligent Platform Management Interface) library and tools
|
Summary: IPMI (Intelligent Platform Management Interface) library and tools
|
||||||
Name: OpenIPMI
|
Name: OpenIPMI
|
||||||
|
|
||||||
@ -17,8 +20,17 @@ Patch4: OpenIPMI-c99.patch
|
|||||||
Patch5: OpenIPMI-py313compat.patch
|
Patch5: OpenIPMI-py313compat.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gdbm-devel swig glib2-devel net-snmp-devel ncurses-devel
|
BuildRequires: gdbm-devel glib2-devel net-snmp-devel ncurses-devel
|
||||||
BuildRequires: openssl-devel python3-devel perl-devel perl-generators
|
%if %{with python} || %{with perl}
|
||||||
|
BuildRequires: swig
|
||||||
|
%endif
|
||||||
|
BuildRequires: openssl-devel
|
||||||
|
%if %{with python}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
%endif
|
||||||
|
%if %{with perl}
|
||||||
|
BuildRequires: perl-devel perl-generators
|
||||||
|
%endif
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -44,13 +56,16 @@ Summary: The OpenIPMI runtime libraries
|
|||||||
The OpenIPMI-libs package contains the runtime libraries for shared binaries
|
The OpenIPMI-libs package contains the runtime libraries for shared binaries
|
||||||
and applications.
|
and applications.
|
||||||
|
|
||||||
|
%if %{with perl}
|
||||||
%package perl
|
%package perl
|
||||||
Summary: IPMI Perl language bindings
|
Summary: IPMI Perl language bindings
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description perl
|
%description perl
|
||||||
The OpenIPMI-perl package contains the Perl language bindings for OpenIPMI.
|
The OpenIPMI-perl package contains the Perl language bindings for OpenIPMI.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python}
|
||||||
%package -n python3-openipmi
|
%package -n python3-openipmi
|
||||||
%{?python_provide:%python_provide python3-openipmi}
|
%{?python_provide:%python_provide python3-openipmi}
|
||||||
%{?python_provide:%python_provide python3-OpenIPMI}
|
%{?python_provide:%python_provide python3-OpenIPMI}
|
||||||
@ -63,6 +78,7 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
%description -n python3-openipmi
|
%description -n python3-openipmi
|
||||||
The OpenIPMI-python package contains the Python language bindings for OpenIPMI.
|
The OpenIPMI-python package contains the Python language bindings for OpenIPMI.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: The development environment for the OpenIPMI project
|
Summary: The development environment for the OpenIPMI project
|
||||||
@ -94,8 +110,15 @@ This package contains a network IPMI listener.
|
|||||||
LDFLAGS="%{__global_ldflags} -Wl,--as-needed" \
|
LDFLAGS="%{__global_ldflags} -Wl,--as-needed" \
|
||||||
--disable-dependency-tracking \
|
--disable-dependency-tracking \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
|
%if %{with python}
|
||||||
--with-pythoninstall=%{python3_sitearch} \
|
--with-pythoninstall=%{python3_sitearch} \
|
||||||
--with-python=%{__python3} \
|
--with-python=%{__python3} \
|
||||||
|
%else
|
||||||
|
--with-python=no \
|
||||||
|
%endif
|
||||||
|
%if %{without perl}
|
||||||
|
--with-perl=no \
|
||||||
|
%endif
|
||||||
--with-tcl=no \
|
--with-tcl=no \
|
||||||
--with-tkinter=no
|
--with-tkinter=no
|
||||||
|
|
||||||
@ -172,13 +195,17 @@ echo ".so man1/openipmish.1" > %{buildroot}%{_mandir}/man1/ipmish.1
|
|||||||
%{_mandir}/man7/ipmi_cmdlang*
|
%{_mandir}/man7/ipmi_cmdlang*
|
||||||
%{_mandir}/man7/openipmi_conparms*
|
%{_mandir}/man7/openipmi_conparms*
|
||||||
|
|
||||||
|
%if %{with perl}
|
||||||
%files perl
|
%files perl
|
||||||
%attr(644,root,root) %{perl_vendorarch}/OpenIPMI.pm
|
%attr(644,root,root) %{perl_vendorarch}/OpenIPMI.pm
|
||||||
%{perl_vendorarch}/auto/OpenIPMI
|
%{perl_vendorarch}/auto/OpenIPMI
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python}
|
||||||
%files -n python3-openipmi
|
%files -n python3-openipmi
|
||||||
%{python3_sitearch}/*OpenIPMI*
|
%{python3_sitearch}/*OpenIPMI*
|
||||||
%{python3_sitearch}/__pycache__/OpenIPMI.*.pyc
|
%{python3_sitearch}/__pycache__/OpenIPMI.*.pyc
|
||||||
|
%endif
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%{_libdir}/libOpenIPMI*.so.*
|
%{_libdir}/libOpenIPMI*.so.*
|
||||||
|
Loading…
Reference in New Issue
Block a user