From 069a3e8a59fe6ea61774c6ed56daa6a7582ee423 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 12 Jun 2018 11:07:12 +0200 Subject: update to 4.0.0 rename to php-solarium4 move to /usr/share/php/Solarium5 raise dependency on PHP 7.0 raise dependency on symfony 2.7 and allow symfony 4 --- .gitignore | 8 ++++++++ Makefile | 4 ++++ composer.json | 41 +++++++++++++++++++++++++++++++++++++++++ makesrc.sh | 27 +++++++++++++++++++++++++++ php-solarium4.spec | 20 +++++++++++--------- 5 files changed, 91 insertions(+), 9 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 composer.json create mode 100755 makesrc.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..518fa0a --- /dev/null +++ b/composer.json @@ -0,0 +1,41 @@ +{ + "name": "solarium/solarium", + "type": "library", + "description": "PHP Solr client", + "keywords": ["solr", "search", "php"], + "homepage": "http://www.solarium-project.org", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "See GitHub contributors", + "homepage": "https://github.com/basdenooijer/solarium/contributors" + } + ], + "require": { + "php": "^7.0", + "symfony/event-dispatcher": "^2.7 || ^3.0 || ^4.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^3.8 || ^6.2", + "phpunit/phpunit": "^6.5", + "satooshi/php-coveralls": "^1.0", + "squizlabs/php_codesniffer": "^1.4", + "zendframework/zendframework1": "^1.12" + }, + "suggest": { + "minimalcode/search": "Query builder compatible with Solarium, allows simplified solr-query handling" + }, + "config": { + "sort-packages": true + }, + "autoload": { + "psr-4": { + "Solarium\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Solarium\\Tests\\": "tests/" + } + } +} diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..dfd5c2a --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,27 @@ +#!/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..." +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + +echo "Getting commit..." +pushd $PROJECT-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.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-solarium4.spec b/php-solarium4.spec index 1284211..3e526b7 100644 --- a/php-solarium4.spec +++ b/php-solarium4.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-solarium +# remirepo/fedora spec file for php-solarium4 # # Copyright (c) 2013-2017 Remi Collet # License: CC-BY-SA @@ -10,20 +10,19 @@ %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner solariumphp %global gh_project solarium +%global major 4 %global with_tests 0%{!?_without_tests:1} -Name: php-%{gh_project} +Name: php-%{gh_project}%{major} Summary: Solarium PHP Solr client library Version: 4.0.0 Release: 1%{?dist} URL: http://www.solarium-project.org/ License: BSD -Group: Development/Libraries Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if %{with_tests} # For tests @@ -115,7 +114,7 @@ EOF %install mkdir -p %{buildroot}%{_datadir}/php -cp -pr src %{buildroot}%{_datadir}/php/Solarium +cp -pr src %{buildroot}%{_datadir}/php/Solarium%{major} %check @@ -124,7 +123,7 @@ cp -pr src %{buildroot}%{_datadir}/php/Solarium mkdir vendor cat << 'EOF' | tee vendor/autoload.php - 4.0.0-1 - update to 4.0.0 +- rename to php-solarium4 +- move to /usr/share/php/Solarium5 - raise dependency on PHP 7.0 - raise dependency on symfony 2.7 and allow symfony 4 + * Thu Oct 5 2017 Remi Collet - 3.8.1-4 - fix autoloader for Symfony 3, FTBFS from Koschei -- cgit