[php-aws-sdk] remove the aws.phar file in the %%install section

Joseph Marrero jmarrero at fedoraproject.org
Fri Jan 3 05:17:04 UTC 2014


commit 4170a59e4b6dfa3fd9c71fbea4fd792d50fe4f99
Author: Joseph Marrero <jmarrero at fedoraproject.org>
Date:   Fri Jan 3 01:16:33 2014 -0400

    remove the aws.phar file in the %%install section

 php-aws-sdk.spec |   66 ++++++++++++++++++++++++++---------------------------
 1 files changed, 32 insertions(+), 34 deletions(-)
---
diff --git a/php-aws-sdk.spec b/php-aws-sdk.spec
index e7cc6dd..46001e7 100644
--- a/php-aws-sdk.spec
+++ b/php-aws-sdk.spec
@@ -1,24 +1,22 @@
-%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
 %global pear_name %(echo %{name} | sed -e 's/^php-aws-//' -e 's/-/_/g')
 %global channelname pear.amazonwebservices.com
 
-Name:           php-aws-sdk
-Version:        2.5.0
-Release:        4%{?dist}
-Summary:        Amazon Web Services framework for PHP
+Name:		php-aws-sdk
+Version:	2.5.0
+Release:	5%{?dist}
+Summary:	Amazon Web Services framework for PHP
 
-License:        ASL 2.0
-URL:            http://aws.amazon.com/sdkforphp
-Source0:        http://pear.amazonwebservices.com/get/%{pear_name}-%{version}.tgz
+License:	ASL 2.0
+URL:		http://aws.amazon.com/sdkforphp/
+Source0:	http://pear.amazonwebservices.com/get/sdk-%{version}.tgz
 
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch:      noarch
-BuildRequires:  php-pear(PEAR)
-BuildRequires:  php-channel(%{channelname})
+BuildArch:	noarch
+BuildRequires:	php-pear(PEAR)
+BuildRequires:	php-channel(%{channelname})
 
-Requires(post):  %{__pear}
-Requires(postun): %{__pear}
+Requires(post):		%{__pear}
+Requires(postun):	%{__pear}
 
 Requires:	php-common >= 5.2
 Requires:	php-pear(PEAR)
@@ -40,7 +38,7 @@ Requires:	php-pcre
 Requires:	php-session
 Requires:	php-sqlite3
 Requires:	php-Monolog
-Requires:       php-Monolog-dynamo
+Requires:	php-Monolog-dynamo
 Requires:	php-symfony-yaml
 Requires:	php-guzzle-Guzzle >= 3.7.0
 Requires:	php-guzzle-Guzzle < 3.9.0
@@ -48,48 +46,45 @@ Provides:	php-pear(%{pear_name}) = %{version}
 Provides:	php-pear(%{channelname}/%{pear_name}) = %{version}
 
 %description
-Amazon Web Services SDK for PHP enables developers to build solutions for
-Amazon Simple Storage Service (Amazon S3), Amazon Elastic Compute Cloud
+Amazon Web Services SDK for PHP enables developers to build solutions for 
+Amazon Simple Storage Service (Amazon S3), Amazon Elastic Compute Cloud 
 (Amazon EC2), Amazon SimpleDB, and more.
 
 %prep
 %setup -q -c
 [ -f package2.xml ] || mv package.xml package2.xml
 
+# fix doc roles
 sed -e '/_samples/s/role="php"/role="doc"/' \
-       	-e '/sdk.class.php/s/md5sum="[0-9,a-z]\{32\}"//' \
+        -e '/sdk.class.php/s/md5sum="[0-9,a-z]\{32\}"//' \
         -e '/_docs/s/role="php"/role="doc"/' \
-       	-e '/_compatibility_test/s/role="php"/role="doc"/' \
-       	-e '/_sql/s/role="php"/role="doc"/' \
-       	-e '/LICENSE/s/role="php"/role="doc"/' \
+        -e '/_compatibility_test/s/role="php"/role="doc"/' \
+        -e '/_sql/s/role="php"/role="doc"/' \
+        -e '/LICENSE/s/role="php"/role="doc"/' \
         -e '/README/s/role="php"/role="doc"/' \
-       	package2.xml >%{pear_name}-%{version}/%{name}.xml
-
-#remove aws.phar
-#rm %{pear_name}-%{version}/aws.phar
+        package2.xml >%{pear_name}-%{version}/%{name}.xml
 
 %build
-cd %{pear_name}-%{version}
 # Empty build section, most likely nothing required.
 
-
 %install
+
 cd %{pear_name}-%{version}
-rm -rf $RPM_BUILD_ROOT
 %{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
 
 # Clean up unnecessary files
+rm $RPM_BUILD_ROOT%{pear_phpdir}/AWSSDKforPHP/aws.phar
+%if 0%{?rhel}
+rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
+%else
 rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
+%endif
 
 # Install XML package description
 mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
 install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %post
 %{__pear} install --nodeps --soft --force --register-only \
     %{pear_xmldir}/%{name}.xml >/dev/null || :
@@ -97,7 +92,7 @@ rm -rf $RPM_BUILD_ROOT
 %postun
 if [ $1 -eq 0 ] ; then
     %{__pear} uninstall --nodeps --ignore-errors --register-only \
-        %{channelname}%{pear_name} >/dev/null || :
+	%{pear_name} >/dev/null || :
 fi
 
 
@@ -105,9 +100,12 @@ fi
 %{pear_xmldir}/%{name}.xml
 %{pear_phpdir}/AWSSDKforPHP/
 
+
 %changelog
+* Fri Jan 03 2014 Joseph Marrero <jmarrero at fedoraproject.org> - 2.5.0-5
+- Remove the aws.phar with other uneaded files on %%install
 * Fri Jan 03 2014 Joseph Marrero <jmarrero at fedoraproject.org> - 2.5.0-4
-- keep the aws.phar file for workaround on install
+- Keep the aws.phar file for workaround on install
 * Thu Jan 02 2014 Joseph Marrero <jmarrero at fedoraproject.org> - 2.5.0-3
 - Fix file installation
 * Mon Dec 30 2013 Joseph Marrero <jmarrero at fedoraproject.org> - 2.5.0-2


More information about the scm-commits mailing list