[php-pear-HTTP-Request/el6/master] clean spec

Remi Collet remi at fedoraproject.org
Wed Aug 18 17:16:45 UTC 2010


commit e3a41d2eac7d17ff8cdb205395c6f773e397c601
Author: remi <fedora at famillecollet.com>
Date:   Wed Aug 18 19:08:46 2010 +0200

    clean spec

 .gitignore                 |    1 +
 php-pear-HTTP-Request.spec |   25 +++++++++++++++++--------
 2 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7e1a7b9..e223f50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 HTTP_Request-1.4.4.tgz
+package.xml
diff --git a/php-pear-HTTP-Request.spec b/php-pear-HTTP-Request.spec
index db7e9f5..1883483 100644
--- a/php-pear-HTTP-Request.spec
+++ b/php-pear-HTTP-Request.spec
@@ -1,9 +1,9 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%define pear_name HTTP_Request
+%global pear_name HTTP_Request
 
 Name:           php-pear-HTTP-Request
 Version:        1.4.4
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Provides an easy way to perform HTTP requests
 
 Group:          Development/Libraries
@@ -28,9 +28,13 @@ Proxy Authentication, SSL, file uploads etc.
 
 %prep
 %setup -qc
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
+# 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,7 +45,7 @@ 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
 
 # Move documentation
 mkdir -p docdir
@@ -52,7 +56,7 @@ 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}
 
 # Fix rpmlint warnings
 sed -i 's/\r//' docdir/%{pear_name}/docs/example.php
@@ -65,7 +69,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
@@ -77,11 +81,16 @@ fi
 %files
 %defattr(-,root,root,-)
 %doc %{pear_name}-%{version}/docdir/%{pear_name}/docs/*
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
 %{pear_phpdir}/HTTP
 
 
 %changelog
+* Wed Aug 18 2010 Remi Collet <Fedora at FamilleCollet.com> - 1.4.4-2
+- rename HTTP_Request.xml to php-pear-HTTP-Request.xml
+- set date.timezone during build
+- clean define
+
 * Mon Sep 07 2009 Christopher Stone <chris.stone at gmail.com> 1.4.4-1
 - Upstream sync
 


More information about the scm-commits mailing list