[php-PhpCollection] Added %{name}-strip.sh as Source1

Shawn Iwinski siwinski at fedoraproject.org
Mon Mar 18 18:08:40 UTC 2013


commit f9d1e76b8dc20eaf621976cde152e31f79b25de5
Author: Shawn Iwinski <siwinski at redhat.com>
Date:   Mon Mar 18 14:08:18 2013 -0400

    Added %{name}-strip.sh as Source1

 php-PhpCollection-strip.sh |   26 ++++++++++++++++++++++++++
 php-PhpCollection.spec     |    8 ++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)
---
diff --git a/php-PhpCollection-strip.sh b/php-PhpCollection-strip.sh
new file mode 100755
index 0000000..e0a65f5
--- /dev/null
+++ b/php-PhpCollection-strip.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+if [ $# != 2 ]; then
+	echo "Usage: $0 VERSION GITHUB_COMMIT" 1>&2
+	exit 1
+fi
+
+VERSION=$1
+GITHUB_COMMIT=$2
+
+ORIGINAL_SOURCE_FILE="${GITHUB_COMMIT}.tar.gz"
+NEW_SOURCE_FILE="php-PhpCollection-${VERSION}-${GITHUB_COMMIT}.tar.gz"
+
+if [ ! -f "$ORIGINAL_SOURCE_FILE" ]; then
+	echo "ERROR: Original source file '${ORIGINAL_SOURCE_FILE}' not found" 1>&2
+	exit 1
+fi
+
+TAR=`which tar`
+
+$TAR -xzf "$ORIGINAL_SOURCE_FILE"
+rm -rf "php-collection-${GITHUB_COMMIT}/doc" "$NEW_SOURCE_FILE"
+$TAR -czf "$NEW_SOURCE_FILE" "php-collection-${GITHUB_COMMIT}"
+
+echo "${NEW_SOURCE_FILE} created"
+exit 0
diff --git a/php-PhpCollection.spec b/php-PhpCollection.spec
index 4a440f3..8d00708 100644
--- a/php-PhpCollection.spec
+++ b/php-PhpCollection.spec
@@ -11,7 +11,7 @@
 
 Name:          php-%{lib_name}
 Version:       %{github_version}
-Release:       1%{?dist}
+Release:       2%{?dist}
 Summary:       General purpose collection library for PHP
 
 Group:         Development/Libraries
@@ -21,6 +21,7 @@ URL:           http://jmsyst.com/libs/%{github_name}
 # wget https://github.com/schmittjoh/php-collection/archive/%%{github_commit}.tar.gz
 # php-PhpCollection-strip.sh %%{github_version} %%{github_commit}
 Source0:       %{name}-%{github_version}-%{github_commit}.tar.gz
+Source1:       %{name}-strip.sh
 
 BuildArch:     noarch
 # Test build requires
@@ -103,7 +104,10 @@ cp -rp src/%{lib_name} %{buildroot}%{_datadir}/php/
 
 
 %changelog
-* Wed Jan 23 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 0.2.0-1
+* Mon Mar 18 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 0.2.0-2
+- Added %%{name}-strip.sh as Source1
+
+* Sat Mar 16 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 0.2.0-1
 - Updated to version 0.2.0
 - Added phpoption_max_ver global
 - Bad licensed files stripped from source


More information about the scm-commits mailing list