summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-12-28 08:54:22 +0100
committerRemi Collet <fedora@famillecollet.com>2014-12-28 08:54:22 +0100
commitdda11e5662e331b93e73c3788a5867e4d0afce8f (patch)
tree2f8109ab11c12bebb93e0537b1699ab49010a237
parentbce949128c851657b625255bc08516897d979bc9 (diff)
php-doctrine-annotations: 1.2.3 (backport)
-rwxr-xr-xphp-doctrine-annotations-get-source.sh62
-rw-r--r--php-doctrine-annotations.spec20
2 files changed, 74 insertions, 8 deletions
diff --git a/php-doctrine-annotations-get-source.sh b/php-doctrine-annotations-get-source.sh
new file mode 100755
index 0000000..e283587
--- /dev/null
+++ b/php-doctrine-annotations-get-source.sh
@@ -0,0 +1,62 @@
+#/bin/sh
+
+GIT=`which git`
+RPM=`which rpm`
+
+if [ -z "$GIT" ]
+then
+ echo "ERROR: 'git' command not found" 1>&2
+ exit 1
+elif [ -z "$RPM" ]
+then
+ echo "ERROR: 'rpm' command not found" 1>&2
+ exit 1
+fi
+
+function print {
+ echo -e "\e[0;33m>>>>> ${1}\e[0m"
+}
+
+SPEC=`ls *.spec`
+NAME=`echo $SPEC | sed 's#\.spec##'`
+VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
+
+print "SPEC = $SPEC"
+print "NAME = $NAME"
+
+GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'`
+GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'`
+GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'`
+GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME}
+GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'`
+
+print "GIT_OWNER = $GIT_OWNER"
+print "GIT_NAME = $GIT_NAME"
+print "GIT_COMMIT = $GIT_COMMIT"
+print "GIT_REPO = $GIT_REPO"
+print "GIT_DIR = $GIT_DIR"
+
+TEMP_DIR=$(mktemp --dir)
+
+pushd $TEMP_DIR
+ print "Cloning git repo..."
+ $GIT clone $GIT_REPO
+
+ pushd $GIT_DIR
+ print "Checking out commit..."
+ $GIT checkout $GIT_COMMIT
+ popd
+
+ TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
+ print "TAR_DIR = $TAR_DIR"
+
+ mv $GIT_DIR $TAR_DIR
+
+ TAR_FILE=`$RPM --eval='%{_sourcedir}'`/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
+ print "TAR_FILE = $TAR_FILE"
+
+ [ -e $TAR_FILE ] && rm -f $TAR_FILE
+ tar --exclude-vcs -czf $TAR_FILE $TAR_DIR
+popd
+
+rm -rf $TEMP_DIR
diff --git a/php-doctrine-annotations.spec b/php-doctrine-annotations.spec
index e1c0d47..a396597 100644
--- a/php-doctrine-annotations.spec
+++ b/php-doctrine-annotations.spec
@@ -11,8 +11,8 @@
%global github_owner doctrine
%global github_name annotations
-%global github_version 1.2.1
-%global github_commit 6a6bec0670bb6e71a263b08bc1b98ea242928633
+%global github_version 1.2.3
+%global github_commit eeda578cbe24a170331a1cfdf78be723412df7a4
%global composer_vendor doctrine
%global composer_project annotations
@@ -37,7 +37,10 @@ Summary: PHP docblock annotations parser library
Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
-Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+
+# Run "php-doctrine-annotations-get-source.sh" to create source
+Source0: %{name}-%{version}-%{github_commit}.tar.gz
+Source1: %{name}-get-source.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -49,7 +52,7 @@ BuildRequires: php-composer(doctrine/cache) < %{cache_max_ver}
BuildRequires: php-composer(doctrine/lexer) >= %{lexer_min_ver}
BuildRequires: php-composer(doctrine/lexer) < %{lexer_max_ver}
BuildRequires: php-phpunit-PHPUnit
-# phpcompatinfo (computed from version 1.2.1)
+# phpcompatinfo (computed from version 1.2.3)
BuildRequires: php-ctype
BuildRequires: php-date
BuildRequires: php-json
@@ -63,7 +66,7 @@ BuildRequires: php-tokenizer
Requires: php(language) >= %{php_min_ver}
Requires: php-composer(doctrine/lexer) >= %{lexer_min_ver}
Requires: php-composer(doctrine/lexer) < %{lexer_max_ver}
-# phpcompatinfo (computed from version 1.2.1)
+# phpcompatinfo (computed from version 1.2.3)
Requires: php-ctype
Requires: php-date
Requires: php-json
@@ -109,9 +112,7 @@ spl_autoload_register(function ($class) {
});
AUTOLOAD
-%{_bindir}/phpunit \
- --include-path %{buildroot}/%{_datadir}/php \
- -d date.timezone="UTC"
+%{_bindir}/phpunit --include-path %{buildroot}/%{_datadir}/php
%else
: Tests skipped
%endif
@@ -130,6 +131,9 @@ rm -rf %{buildroot}
%changelog
+* Sun Dec 28 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.2.3-1
+- Updated to 1.2.3 (BZ #1176942)
+
* Sun Oct 19 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.2.1-1
- Updated to 1.2.1 (BZ #1146910)
- %%license usage