[php-pear-Image-Color/el6/master] - Upstream relicensing under LGPL 2.1. - add %%check - rename Image_Color.xml to php-pear-Image-Colo

Remi Collet remi at fedoraproject.org
Sun Aug 15 11:40:32 UTC 2010


commit a007d45595bb776e6a628f50085d6c4ddd3681e3
Author: remi <fedora at famillecollet.com>
Date:   Sun Aug 15 13:32:41 2010 +0200

    - Upstream relicensing under LGPL 2.1.
    - add %%check
    - rename Image_Color.xml to php-pear-Image-Color.xml
    - set date.timezone during build

 php-pear-Image-Color.spec |   43 +++++++++++++++++++++++++++++++------------
 1 files changed, 31 insertions(+), 12 deletions(-)
---
diff --git a/php-pear-Image-Color.spec b/php-pear-Image-Color.spec
index 1cb218d..89d3f30 100644
--- a/php-pear-Image-Color.spec
+++ b/php-pear-Image-Color.spec
@@ -1,20 +1,24 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define pear_name Image_Color
+%global pear_name Image_Color
 
 Name:           php-pear-Image-Color
-Version:        1.0.3
+Version:        1.0.4
 Release:        1%{?dist}
 Summary:        Manage and handles color data and conversions
 
 Group:          Development/Libraries
-License:        PHP
+License:        LGPLv2
+
 URL:            http://pear.php.net/package/Image_Color
 Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
-Source1:        PHP-LICENSE-3.01
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
 BuildRequires:  php-pear >= 1:1.4.9-1.2
+# For test suite
+BuildRequires:  php-pear(pear.phpunit.de/PHPUnit)
+
 Requires:       php-pear(PEAR)
 Requires:       php-gd
 Requires(post): %{__pear}
@@ -27,10 +31,15 @@ Provides:       php-pear(%{pear_name}) = %{version}
 
 %prep
 %setup -qc
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
-install -pm 644 -c %{SOURCE1} LICENSE
+
+# Create a "localized" php.ini to avoid build warning
+cp /etc/php.ini .
+echo "date.timezone=UTC" >>php.ini
+
+
 cd %{pear_name}-%{version}
+# Package.xml is V2
+mv ../package.xml %{name}.xml
 
 
 %build
@@ -41,14 +50,19 @@ cd %{pear_name}-%{version}
 %install
 cd %{pear_name}-%{version}
 rm -rf $RPM_BUILD_ROOT docdir
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
+PHPRC=../php.ini %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
 
 # Clean up unnecessary files
 rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
 
 # Install XML package description
 install -d $RPM_BUILD_ROOT%{pear_xmldir}
-install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+
+
+%check
+cd %{pear_name}-%{version}
+phpunit Tests
 
 
 %clean
@@ -57,7 +71,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 %{__pear} install --nodeps --soft --force --register-only \
-    %{pear_xmldir}/%{pear_name}.xml >/dev/null || :
+    %{pear_xmldir}/%{name}.xml >/dev/null || :
 
 %postun
 if [ $1 -eq 0 ] ; then
@@ -68,12 +82,17 @@ fi
 
 %files
 %defattr(-,root,root,-)
-%doc LICENSE
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
 %{pear_phpdir}/Image
 
 
 %changelog
+* Sun Aug 15 2010 Remi Collet <Fedora at FamilleCollet.com> - 1.0.4-1
+- Upstream relicensing under LGPL 2.1.
+- add %%check
+- rename Image_Color.xml to php-pear-Image-Color.xml
+- set date.timezone during build
+
 * Mon Sep 07 2009 Christopher Stone <chris.stone at gmail.com> 1.0.3-1
 - Upstream sync
 


More information about the scm-commits mailing list