From 7ca9d5c52183d1bf1ba78932164af0c751c95bd6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 18 Nov 2019 12:43:25 +0100 Subject: v1.9.0 from Fedora --- composer.json | 15 +++++++--- makesrc.sh | 1 + php-Faker-get-source.sh | 73 +++++++++++++++++++++++++++++++++++++++++++++++++ php-Faker.spec | 21 ++++++++------ 4 files changed, 98 insertions(+), 12 deletions(-) create mode 120000 makesrc.sh create mode 100755 php-Faker-get-source.sh diff --git a/composer.json b/composer.json index e52016e..2fd657b 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,11 @@ "name": "fzaninotto/faker", "type": "library", "description": "Faker is a PHP library that generates fake data for you.", - "keywords": ["faker", "fixtures", "data"], + "keywords": [ + "faker", + "fixtures", + "data" + ], "license": "MIT", "authors": [ { @@ -13,9 +17,9 @@ "php": "^5.3.3 || ^7.0" }, "require-dev": { + "ext-intl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^1.5", - "ext-intl": "*" + "squizlabs/php_codesniffer": "^2.9.2" }, "autoload": { "psr-4": { @@ -29,7 +33,10 @@ }, "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9" } + }, + "config": { + "sort-packages": true } } diff --git a/makesrc.sh b/makesrc.sh new file mode 120000 index 0000000..115e32a --- /dev/null +++ b/makesrc.sh @@ -0,0 +1 @@ +php-Faker-get-source.sh \ No newline at end of file diff --git a/php-Faker-get-source.sh b/php-Faker-get-source.sh new file mode 100755 index 0000000..b2ac62b --- /dev/null +++ b/php-Faker-get-source.sh @@ -0,0 +1,73 @@ +#/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" +} + +if [ -x "$1" ] +then + SPEC=$1 +else + SPEC=`ls *.spec | head -1` +fi + +SPEC_DIR=`pwd` + +print "SPEC_DIR = $SPEC_DIR" + +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=${SPEC_DIR}/${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 + chmod 0644 $TAR_FILE +popd + +rm -rf $TEMP_DIR diff --git a/php-Faker.spec b/php-Faker.spec index d9b5fc5..9837e87 100644 --- a/php-Faker.spec +++ b/php-Faker.spec @@ -12,8 +12,8 @@ %global github_owner fzaninotto %global github_name Faker -%global github_version 1.8.0 -%global github_commit f72816b43e74063c8b10357394b6bba8cb1c10de +%global github_version 1.9.0 +%global github_commit 27a216cbe72327b2d6369fab721a5843be71e57d %global composer_vendor fzaninotto %global composer_project faker @@ -33,7 +33,11 @@ Summary: A PHP library that generates fake data License: MIT URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz + +# GitHub export does not include tests. +# Run php-Faker-get-source.sh to create full source. +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh # remirepo:3 # For test build on all available arch @@ -46,12 +50,10 @@ BuildArch: noarch BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) BuildRequires: php-intl -## phpcompatinfo (computed from version 1.8.0) -BuildRequires: php-ctype +## phpcompatinfo (computed from version 1.9.0) BuildRequires: php-curl BuildRequires: php-date BuildRequires: php-dom -BuildRequires: php-filter BuildRequires: php-hash BuildRequires: php-iconv BuildRequires: php-json @@ -65,7 +67,7 @@ BuildRequires: php-fedora-autoloader-devel # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 1.8.0) +# phpcompatinfo (computed from version 1.9.0) Requires: php-curl Requires: php-date Requires: php-dom @@ -158,7 +160,7 @@ sed 's/function testFixedSeedWithMaximumTimestamp/function SKIP_testFixedSeedWit ret=0 for cmd in php php70 php71 php72 php73 php74; do if which $cmd; then - $cmd %{_bindir}/phpunit --verbose || ret=1 + $cmd -d memory_limit=1G %{_bindir}/phpunit --verbose || ret=1 fi done exit $ret @@ -176,6 +178,9 @@ exit $ret %changelog +* Sun Nov 17 2019 Shawn Iwinski - 1.9.0-1 +- Update to 1.9.0 (RHBZ #1772493) + * Sun Jun 16 2019 Shawn Iwinski - 1.8.0-1 - Update to 1.8.0 (RHBZ #1481901) -- cgit