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

Michal Novotny minovotn at redhat.com
Wed Feb 16 11:20:25 UTC 2011


On 02/16/2011 04:33 AM, 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.
> ---
>   Makefile.am          |    2 +-
>   libvirt-php.obs.spec |   81 -------------------------------------------------
>   libvirt-php.spec     |   82 ++++++++++++++++++++++++++++++++++++++++++++++++++
>   php-libvirt.spec     |   43 --------------------------
>   4 files changed, 83 insertions(+), 125 deletions(-)
>   delete mode 100644 libvirt-php.obs.spec
>   create mode 100644 libvirt-php.spec
>   delete mode 100644 php-libvirt.spec
>
> diff --git a/Makefile.am b/Makefile.am
> index eac6726..aa19b88 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,3 +1,3 @@
>   SUBDIRS = src docs
>
> -EXTRA_DIST = libvirt-php.obs.spec
> +EXTRA_DIST = libvirt-php.spec
> diff --git a/libvirt-php.obs.spec b/libvirt-php.obs.spec
> deleted file mode 100644
> index da59676..0000000
> --- a/libvirt-php.obs.spec
> +++ /dev/null
> @@ -1,81 +0,0 @@
> -%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}
> -Group:		Development/Libraries/PHP
> -%else
> -Group:		Development/Libraries
> -%endif
> -License:	PHP
> -URL:		http://libvirt.org/
> -Source0:	http://libvirt.org/sources/libvirt-php-%{version}.tar.gz
> -BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
> -
> -BuildRequires:	php-devel
> -BuildRequires:	libvirt-devel>= %{req_libvirt_version}
> -BuildRequires:	libxml2-devel
> -%if 0%{?suse_version} || 0%{?sles_version}
> -BuildRequires:	xhtml-dtd
> -%else
> -BuildRequires:	xhtml1-dtds
> -%endif
> -Requires:	libvirt>= %{req_libvirt_version}
> -%if 0%{?suse_version} || 0%{?sles_version}
> -Requires:	php5
> -%else
> -Requires:	php
> -%endif
> -
> -%description
> -PHP language bindings for Libvirt API.
> -For more details see: http://phplibvirt.cybersales.cz/ http://www.libvirt.org/ http://www.php.net/
> -
> -%package -n libvirt-php-doc
> -Summary:	Document of libvirt-php
> -Group:		Development/Libraries/PHP
> -Requires:	libvirt-php = %{version}
> -
> -%description -n libvirt-php-doc
> -PHP language bindings for Libvirt API.
> -For more details see: http://phplibvirt.cybersales.cz/ http://www.libvirt.org/ http://www.php.net/
> -
> -This package contain the document for libvirt-php.
> -
> -%prep
> -%setup -q -n libvirt-php-%{version}
> -
> -%build
> -%configure
> -./configure --with-html-dir=%{_datadir}/doc --with-html-subdir=%{name}-%{version}/html
> -make %{?_smp_mflags}
> -
> -%install
> -make install DESTDIR=%{buildroot}
> -
> -%clean
> -rm -rf %{buildroot}
> -
> -%files
> -%defattr(-,root,root,-)
> -%{php_extdir}/libvirt-php.so
> -%config(noreplace) %{php_confdir}/libvirt-php.ini
> -
> -%files -n libvirt-php-doc
> -%defattr(-,root,root,-)
> -%doc
> -%{_datadir}/doc/%{name}-%{version}/html
> -
> -%changelog
> -
> 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}
> +Group:		Development/Libraries/PHP
> +%else
> +Group:		Development/Libraries
> +%endif
> +License:	PHP
> +URL:		http://libvirt.org/
> +Source0:	http://libvirt.org/sources/libvirt-php-%{version}.tar.gz
> +BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
> +
> +BuildRequires:	php-devel
> +BuildRequires:	libvirt-devel>= %{req_libvirt_version}
> +BuildRequires:	libxml2-devel
> +%if 0%{?suse_version} || 0%{?sles_version}
> +BuildRequires:	xhtml-dtd
> +%else
> +BuildRequires:	xhtml1-dtds
> +%endif
> +Requires:	libvirt>= %{req_libvirt_version}
> +%if 0%{?suse_version} || 0%{?sles_version}
> +Requires:	php5
> +%else
> +Requires:	php
> +%endif
> +
> +%description
> +PHP language bindings for Libvirt API.
> +For more details see: http://phplibvirt.cybersales.cz/ http://www.libvirt.org/ http://www.php.net/
> +
> +%package -n libvirt-php-doc
> +Summary:	Document of libvirt-php
> +Group:		Development/Libraries/PHP
> +Requires:	libvirt-php = %{version}
> +
> +%description -n libvirt-php-doc
> +PHP language bindings for Libvirt API.
> +For more details see: http://phplibvirt.cybersales.cz/ http://www.libvirt.org/ http://www.php.net/
> +
> +This package contain the document for libvirt-php.
> +
> +%prep
> +%setup -q -n libvirt-php-%{version}
> +
> +%build
> +%configure
> +./configure --with-html-dir=%{_datadir}/doc --with-html-subdir=%{name}-%{version}/html
> +make %{?_smp_mflags}
> +
> +%install
> +make install DESTDIR=%{buildroot}
> +
> +%clean
> +rm -rf %{buildroot}
> +
> +%files
> +%defattr(-,root,root,-)
> +%{php_extdir}/libvirt-php.so
> +%config(noreplace) %{php_confdir}/libvirt-php.ini
> +
> +%files -n libvirt-php-doc
> +%defattr(-,root,root,-)
> +%doc
> +%dir %{_datadir}/doc/%{name}-%{version}
> +%{_datadir}/doc/%{name}-%{version}/html
> +
> +%changelog
> +
> diff --git a/php-libvirt.spec b/php-libvirt.spec
> deleted file mode 100644
> index b7bc92d..0000000
> --- a/php-libvirt.spec
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -Name:		php-libvirt
> -Version:	0.4
> -Release:	1%{?dist}%{?extra_release}
> -Summary:	PHP language binding for Libvirt
> -Group:		Development/Libraries
> -License:	PHP
> -URL:		http://libvirt.org/
> -Source0:	http://libvirt.org/sources/libvirt-php-%{version}.tar.gz
> -BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
> -
> -BuildRequires:	php-devel
> -BuildRequires:	libvirt-devel
> -BuildRequires:	libxml2-devel
> -Requires:	libvirt
> -Requires:	php(zend-abi) = %{php_zend_api}
> -Requires:	php(api) = %{php_core_api}
> -
> -
> -%description
> -PHP language bindings for Libvirt API.
> -For more details see: http://phplibvirt.cybersales.cz/ http://www.libvirt.org/ http://www.php.net/
> -
> -%prep
> -%setup -q -n libvirt-php-%{version}
> -
> -%build
> -%configure --with-html-dir=%{_datadir}/doc --with-html-subdir=%{name}-%{version}/html
> -make %{?_smp_mflags}
> -
> -%install
> -rm -rf %{buildroot}
> -make install DESTDIR=%{buildroot}
> -
> -%clean
> -rm -rf %{buildroot}
> -
> -%files
> -%defattr(-,root,root,-)
> -%{_libdir}/php/modules/libvirt-php.so
> -%{_sysconfdir}/php.d/libvirt-php.ini
> -%doc %{_datadir}/doc/%{name}-%{version}/html
> -
> -%changelog
Thanks! Pushed.

Michal

-- 
Michal Novotny<minovotn at redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat




More information about the libvir-list mailing list