Compare commits
No commits in common. "rawhide" and "f21" have entirely different histories.
5 changed files with 43 additions and 231 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,6 +1,2 @@
|
||||||
/php-mtdowling-jmespath-php-2.1.0-88b6d646de963396dd227d028cce114fe85f9857.tar.gz
|
/php-mtdowling-jmespath-php-2.1.0-88b6d646de963396dd227d028cce114fe85f9857.tar.gz
|
||||||
/php-mtdowling-jmespath-php-2.2.0-a7d99d0c836e69d27b7bfca1d33ca2759fba3289.tar.gz
|
/php-mtdowling-jmespath-php-2.2.0-a7d99d0c836e69d27b7bfca1d33ca2759fba3289.tar.gz
|
||||||
/php-mtdowling-jmespath-php-2.3.0-192f93e43c2c97acde7694993ab171b3de284093.tar.gz
|
|
||||||
/php-mtdowling-jmespath-php-2.4.0-adcc9531682cf87dfda21e1fd5d0e7a41d292fac.tar.gz
|
|
||||||
/php-mtdowling-jmespath-php-2.5.0-52168cb9472de06979613d365c7f1ab8798be895.tar.gz
|
|
||||||
/php-mtdowling-jmespath-php-2.6.0-42dae2cbd13154083ca6d70099692fef8ca84bfb.tar.gz
|
|
||||||
|
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
{
|
|
||||||
"name": "mtdowling/jmespath.php",
|
|
||||||
"description": "Declaratively specify how to extract elements from a JSON document",
|
|
||||||
"keywords": ["json", "jsonpath"],
|
|
||||||
"license": "MIT",
|
|
||||||
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Michael Dowling",
|
|
||||||
"email": "mtdowling@gmail.com",
|
|
||||||
"homepage": "https://github.com/mtdowling"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.4.0",
|
|
||||||
"symfony/polyfill-mbstring": "^1.4"
|
|
||||||
},
|
|
||||||
|
|
||||||
"require-dev": {
|
|
||||||
"composer/xdebug-handler": "^1.2",
|
|
||||||
"phpunit/phpunit": "^4.8.36|^7.5.15"
|
|
||||||
},
|
|
||||||
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"JmesPath\\": "src/"
|
|
||||||
},
|
|
||||||
"files": ["src/JmesPath.php"]
|
|
||||||
},
|
|
||||||
|
|
||||||
"bin": ["bin/jp.php"],
|
|
||||||
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "2.5-dev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
#/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
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# Fedora spec file for php-mtdowling-jmespath-php
|
# Fedora spec file for php-mtdowling-jmespath-php
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015-2021 Shawn Iwinski <shawn.iwinski@gmail.com>
|
# Copyright (c) 2015 Shawn Iwinski <shawn.iwinski@gmail.com>
|
||||||
#
|
#
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# http://opensource.org/licenses/MIT
|
# http://opensource.org/licenses/MIT
|
||||||
|
|
@ -9,58 +9,54 @@
|
||||||
# Please preserve changelog entries
|
# Please preserve changelog entries
|
||||||
#
|
#
|
||||||
|
|
||||||
%bcond_without tests
|
|
||||||
|
|
||||||
%global github_owner jmespath
|
%global github_owner jmespath
|
||||||
%global github_name jmespath.php
|
%global github_name jmespath.php
|
||||||
%global github_version 2.6.0
|
%global github_version 2.2.0
|
||||||
%global github_commit 42dae2cbd13154083ca6d70099692fef8ca84bfb
|
%global github_commit a7d99d0c836e69d27b7bfca1d33ca2759fba3289
|
||||||
|
|
||||||
%global composer_vendor mtdowling
|
%global composer_vendor mtdowling
|
||||||
%global composer_project jmespath.php
|
%global composer_project jmespath.php
|
||||||
|
|
||||||
# "php": "^5.4 || ^7.0 || ^8.0"
|
# "php": ">=5.4.0"
|
||||||
%global php_min_ver 5.4
|
%global php_min_ver 5.4.0
|
||||||
|
|
||||||
|
# Build using "--without tests" to disable tests
|
||||||
|
%global with_tests 0%{!?_without_tests:1}
|
||||||
|
|
||||||
%{!?phpdir: %global phpdir %{_datadir}/php}
|
%{!?phpdir: %global phpdir %{_datadir}/php}
|
||||||
|
|
||||||
Name: php-%{composer_vendor}-jmespath-php
|
Name: php-%{composer_vendor}-jmespath-php
|
||||||
Version: %{github_version}
|
Version: %{github_version}
|
||||||
Release: 11%{?github_release}%{?dist}
|
Release: 1%{?github_release}%{?dist}
|
||||||
Summary: Declaratively specify how to extract elements from a JSON document
|
Summary: Declaratively specify how to extract elements from a JSON document
|
||||||
|
|
||||||
|
Group: Development/Libraries
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/%{github_owner}/%{github_name}
|
URL: https://github.com/%{github_owner}/%{github_name}
|
||||||
# GitHub export does not include tests.
|
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
|
||||||
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
|
|
||||||
Source1: %{name}-get-source.sh
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# Tests
|
# Tests
|
||||||
%if %{with tests}
|
%if %{with_tests}
|
||||||
## composer.json
|
## composer.json
|
||||||
|
BuildRequires: %{_bindir}/phpunit
|
||||||
BuildRequires: php(language) >= %{php_min_ver}
|
BuildRequires: php(language) >= %{php_min_ver}
|
||||||
BuildRequires: phpunit7 >= 7.5.15
|
## phpcompatinfo (computed from version 2.2.0)
|
||||||
## phpcompatinfo (computed from version 2.5.0)
|
|
||||||
BuildRequires: php-json
|
BuildRequires: php-json
|
||||||
BuildRequires: php-mbstring
|
|
||||||
BuildRequires: php-spl
|
BuildRequires: php-spl
|
||||||
%endif
|
|
||||||
## Autoloader
|
## Autoloader
|
||||||
BuildRequires: php-composer(fedora/autoloader)
|
BuildRequires: php-composer(symfony/class-loader)
|
||||||
|
%endif
|
||||||
|
|
||||||
Requires: php-cli
|
Requires: php-cli
|
||||||
# composer.json
|
# composer.json
|
||||||
Requires: php(language) >= %{php_min_ver}
|
Requires: php(language) >= %{php_min_ver}
|
||||||
# phpcompatinfo (computed from version 2.5.0)
|
# phpcompatinfo (computed from version 2.1.0)
|
||||||
Requires: php-json
|
Requires: php-json
|
||||||
Requires: php-mbstring
|
|
||||||
Requires: php-spl
|
Requires: php-spl
|
||||||
# Autoloader
|
# Autoloader
|
||||||
Requires: php-composer(fedora/autoloader)
|
Requires: php-composer(symfony/class-loader)
|
||||||
|
|
||||||
# php-{COMPOSER_VENDOR}-{COMPOSER_PROJECT}
|
|
||||||
Provides: php-%{composer_vendor}-%{composer_project} = %{version}-%{release}
|
|
||||||
# Composer
|
# Composer
|
||||||
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
|
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
|
||||||
|
|
||||||
|
|
@ -74,18 +70,30 @@ in PHP applications with PHP data structures.
|
||||||
%setup -qn %{github_name}-%{github_commit}
|
%setup -qn %{github_name}-%{github_commit}
|
||||||
|
|
||||||
: Create autoloader
|
: Create autoloader
|
||||||
cat <<'AUTOLOAD' | tee src/autoload.php
|
(cat <<'AUTOLOAD'
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Autoloader for %{name} and its' dependencies
|
* Autoloader created by %{name}-%{version}-%{release}
|
||||||
* (created by %{name}-%{version}-%{release}).
|
*
|
||||||
|
* @return \Symfony\Component\ClassLoader\ClassLoader
|
||||||
*/
|
*/
|
||||||
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
|
|
||||||
|
|
||||||
\Fedora\Autoloader\Autoload::addPsr4('JmesPath\\', __DIR__);
|
if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
|
||||||
|
if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
|
||||||
|
require_once '%{phpdir}/Symfony/Component/ClassLoader/ClassLoader.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
$fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
|
||||||
|
$fedoraClassLoader->register();
|
||||||
|
}
|
||||||
|
|
||||||
|
$fedoraClassLoader->addPrefix('JmesPath\\', dirname(__DIR__));
|
||||||
|
|
||||||
require_once __DIR__ . '/JmesPath.php';
|
require_once __DIR__ . '/JmesPath.php';
|
||||||
|
|
||||||
|
return $fedoraClassLoader;
|
||||||
AUTOLOAD
|
AUTOLOAD
|
||||||
|
) | tee src/autoload.php
|
||||||
|
|
||||||
: Modify bin script
|
: Modify bin script
|
||||||
sed "s#.*require.*autoload.*#require_once '%{phpdir}/JmesPath/autoload.php';#" \
|
sed "s#.*require.*autoload.*#require_once '%{phpdir}/JmesPath/autoload.php';#" \
|
||||||
|
|
@ -107,23 +115,20 @@ install -pm 0755 bin/jp.php %{buildroot}%{_bindir}/
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with tests}
|
%if %{with_tests}
|
||||||
|
: Skip test known to fail
|
||||||
|
sed 's/function testTokenizesJsonNumbers/function SKIP_testTokenizesJsonNumbers/' \
|
||||||
|
-i tests/LexerTest.php
|
||||||
|
|
||||||
: Run tests
|
: Run tests
|
||||||
RETURN_CODE=0
|
%{_bindir}/phpunit -v --bootstrap %{buildroot}%{phpdir}/JmesPath/autoload.php
|
||||||
for PHP_EXEC in php php73 php74 php80; do
|
|
||||||
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
|
|
||||||
$PHP_EXEC %{_bindir}/phpunit7 \
|
|
||||||
--bootstrap %{buildroot}%{phpdir}/JmesPath/autoload.php \
|
|
||||||
--verbose || RETURN_CODE=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
exit $RETURN_CODE
|
|
||||||
%else
|
%else
|
||||||
: Tests skipped
|
: Tests skipped
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%{!?_licensedir:%global license %%doc}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CHANGELOG.md
|
%doc CHANGELOG.md
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
|
|
@ -133,83 +138,6 @@ exit $RETURN_CODE
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-11
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-10
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-9
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-8
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-7
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Apr 14 2021 Remi Collet <remi@remirepo.net> - 2.6.0-1
|
|
||||||
- update to 2.6.0
|
|
||||||
- switch to phpunit7
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Feb 12 2020 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.5.0-1
|
|
||||||
- Update to 2.5.0 (RHBZ #1787856)
|
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-8
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-7
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Dec 07 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.4.0-1
|
|
||||||
- Update to 2.4.0 (RHBZ #1401271)
|
|
||||||
- Change autoloader from php-composer(symfony/class-loader) to
|
|
||||||
php-composer(fedora/autoloader)
|
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Jun 28 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.3.0-1
|
|
||||||
- Updated to 2.3.0 (RHBZ #1295982)
|
|
||||||
- Added "php-{COMPOSER_VENDOR}-{COMPOSER_PROJECT}" ("php-mtdowling-jmespath.php")
|
|
||||||
virtual provide
|
|
||||||
|
|
||||||
* Sun Jun 28 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.2.0-1
|
* Sun Jun 28 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.2.0-1
|
||||||
- Updated to 2.2.0 (RHBZ #1225677)
|
- Updated to 2.2.0 (RHBZ #1225677)
|
||||||
- Changed autoloader from phpab to Symfony ClassLoader
|
- Changed autoloader from phpab to Symfony ClassLoader
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (php-mtdowling-jmespath-php-2.6.0-42dae2cbd13154083ca6d70099692fef8ca84bfb.tar.gz) = 69eb3dc26bec2d2a0ae56cb0c9effd53b79fd5cae15e34e3bb9748cea46eff69209278466b2e020b0bebbb645fa65c918fba341ebbc182a2a0f144b8a50ab461
|
7cee7a6b6c6e2d4b0df8ccfc5ce9f63e php-mtdowling-jmespath-php-2.2.0-a7d99d0c836e69d27b7bfca1d33ca2759fba3289.tar.gz
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue