[libvirt] [libvirt-php] Merge rpm spec files

Jim Fehlig jfehlig at novell.com
Wed Feb 16 15:17:34 UTC 2011


Lyre wrote:
> Merge php-libvirt.spec & libvirt-php.obs.spec to libvirt-php.spec,
> which will pack libvirt-php into two packages:
> 	libvirt-php: the extension itself with the configuration file.
> 	libvirt-php-doc: document package for libvirt-php
>
> This spec file should works for Fedora 14, RHEL 6, openSuSE 11.3
> and SLES 11 SP1.
>
> * renamed:    libvirt-php.obs.spec -> libvirt-php.spec
> * deleted:    php-libvirt.spec
>
> * libvirt-php.spec: Added %dir for libvirt-php-doc to satisfy SLES.
> * Makefile.am: changed the spec file name for distting.
>   
[...]
> diff --git a/libvirt-php.spec b/libvirt-php.spec
> new file mode 100644
> index 0000000..5ac61b0
> --- /dev/null
> +++ b/libvirt-php.spec
> @@ -0,0 +1,82 @@
> +%define		req_libvirt_version 0.6.2
> +
> +%if 0%{?suse_version} || 0%{?sles_version} 
> +%define		php_confdir %{_sysconfdir}/php5/conf.d
> +%define		php_extdir 	%{_libdir}/php5/extensions
> +%else
> +%define		php_confdir %{_sysconfdir}/php.d 
> +%define		php_extdir  %{_libdir}/php/modules
> +%endif
> +
> +Name:		libvirt-php
> +Version:	0.4
> +Release:	1%{?dist}%{?extra_release}
> +Summary:	PHP language binding for Libvirt
> +
> +%if 0%{?suse_version} || 0%{?sles_version} 
>   

I think you only need the 0%{?suse_version} since sles is a subset. 
There's some tips on cross distro building in OBS here

http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto

Regards,
Jim




More information about the libvir-list mailing list