summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-05-25 10:35:29 +0200
committerRemi Collet <fedora@famillecollet.com>2016-05-25 10:35:29 +0200
commitc236e57930053b26bd2f8b3c085d6a5d0eab3d04 (patch)
treed2913f8b8c0679212728c9f865ab49694a8a6860
parent2e4cb3035e5a117a4b2d56ac14de7a3bbdb0cfc1 (diff)
php-true-punycode: 2.0.3
-rwxr-xr-xmakesrc.sh28
-rw-r--r--php-true-punycode.spec13
2 files changed, 37 insertions, 4 deletions
diff --git a/makesrc.sh b/makesrc.sh
new file mode 100755
index 0000000..e9a1ec5
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+NAME=$(basename $PWD)
+OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
+PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
+VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec)
+COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
+SHORT=${COMMIT:0:7}
+
+echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n"
+
+echo "Cloning..."
+rm -rf $PROJECT-$COMMIT
+git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
+
+echo "Getting commit..."
+pushd $PROJECT-$COMMIT
+git checkout $COMMIT
+cp composer.json ../composer-$VERSION.json
+popd
+
+echo "Archiving..."
+tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
+
+echo "Cleaning..."
+rm -rf $PROJECT-$COMMIT
+
+echo "Done."
diff --git a/php-true-punycode.spec b/php-true-punycode.spec
index 80a5920..7d57d22 100644
--- a/php-true-punycode.spec
+++ b/php-true-punycode.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 74fa01d4de396c40e239794123b3874cb594a30c
+%global gh_commit 6853ce218b6115ec749607e14ac51338920c9d81
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner true
%global gh_project php-punycode
@@ -15,14 +15,15 @@
# Notice: single file / class, so no need to provide an autoloader for now
Name: php-true-punycode
-Version: 2.0.2
+Version: 2.0.3
Release: 1%{?dist}
Summary: A Bootstring encoding of Unicode for IDNA
Group: Development/Libraries
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
-Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
+Source0: %{name}-%{version}-%{gh_short}.tgz
+Source1: makesrc.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -85,6 +86,10 @@ rm -rf %{buildroot}
%changelog
+* Wed May 25 2016 Remi Collet <remi@fedoraproject.org> - 2.0.3-1
+- update to version 2.0.3 (no change)
+- use git snapshot for sources with tests
+
* Fri Jan 8 2016 Remi Collet <remi@fedoraproject.org> - 2.0.2-1
- update to version 2.0.2
- run test suite with both PHP 5 and 7 when available
@@ -99,4 +104,4 @@ rm -rf %{buildroot}
- update to version 1.1.0
* Wed Jan 7 2015 Remi Collet <remi@fedoraproject.org> - 1.0.1-1
-- initial package \ No newline at end of file
+- initial package