SHA256
1
0
forked from pool/libguestfs

- make perl-bindings optional, disabled for sles11

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=165
This commit is contained in:
Olaf Hering 2012-11-29 19:17:06 +00:00 committed by Git OBS Bridge
parent 48bec672c0
commit f38ba01f5e
2 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Nov 29 20:15:11 CET 2012 - ohering@suse.de
- make perl-bindings optional, disabled for sles11
-------------------------------------------------------------------
Sun Nov 25 18:17:02 CET 2012 - ohering@suse.de

View File

@ -21,7 +21,7 @@
%define with_ocaml_bindings 1
%define with_lua_bindings 1
%define with_python_bindings 1
%define with_perl 1
%define with_perl_bindings 1
%define with_ruby_bindings 1
%define with_fuse 1
%define with_hivex 1
@ -33,6 +33,7 @@
%else
%define with_ocaml_bindings 0
%define with_lua_bindings 0
%define with_perl_bindings 0
%define with_python_bindings 0
%define with_ruby_bindings 0
%define with_hivex 0
@ -72,6 +73,7 @@ BuildRequires: libconfig-devel
BuildRequires: libtool
BuildRequires: libvirt-devel >= 0.10.2
BuildRequires: ncurses-devel
BuildRequires: perl-macros
BuildRequires: pcre-devel
BuildRequires: pkg-config
BuildRequires: readline-devel
@ -135,6 +137,7 @@ Group: System/Filesystems
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
Requires: kvm >= 1.1
%if %{with_perl_bindings}
Requires: perl(Data::Dumper)
Requires: perl(File::Basename)
Requires: perl(File::Temp)
@ -148,6 +151,7 @@ Requires: perl(Sys::Guestfs::Lib)
Requires: perl(Win::Hivex)
Requires: perl(Win::Hivex::Regedit)
%endif
%endif
%{perl_requires}
Recommends: guestfs-data
@ -194,12 +198,11 @@ Group: Development/Libraries/Other
Allows OCaml scripts to directly use libguestfs.
%endif
#
%if %{with_perl}
%if %{with_perl_bindings}
%package -n perl-Sys-Guestfs
Summary: Provides Perl support for libguestfs
Group: System/Filesystems
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(Locale::TextDomain)
@ -214,6 +217,8 @@ BuildRequires: perl(Win::Hivex::Regedit)
#
Provides: libguestfs-perl = %{version}
Obsoletes: libguestfs-perl < %{version}
Requires: perl(File::Temp)
Requires: perl(Locale::TextDomain)
%perl_requires
%description -n perl-Sys-Guestfs
@ -439,7 +444,7 @@ find $RPM_BUILD_ROOT -type f \( \
-name "virt-list-partitions" -o -name "virt-list-partitions.*" -o \
-name "virt-tar" -o -name "virt-tar.*" \
\) -print -delete
%if %{with_perl}
%if %{with_perl_bindings}
# Delete empty perl bootstrap files
find $RPM_BUILD_ROOT -name "*.bs" -size 0c -print -delete
# Delete unused perl script without executable permissions
@ -630,7 +635,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lua
%endif
#
%if %{with_perl}
%if %{with_perl_bindings}
%post -n perl-Sys-Guestfs -p /sbin/ldconfig
%postun -n perl-Sys-Guestfs -p /sbin/ldconfig