summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-06-12 11:07:12 +0200
committerRemi Collet <remi@remirepo.net>2018-06-12 11:07:12 +0200
commit069a3e8a59fe6ea61774c6ed56daa6a7582ee423 (patch)
tree3bbe5d86350a754a65053fbd339728028734f2a9
parent66cdc58cecaaa8e5ff3b4ce97bc899d3e8ad4a53 (diff)
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
-rw-r--r--.gitignore8
-rw-r--r--Makefile4
-rw-r--r--composer.json41
-rwxr-xr-xmakesrc.sh27
-rw-r--r--php-solarium4.spec20
5 files changed, 91 insertions, 9 deletions
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
<?php
-require_once '%{buildroot}%{_datadir}/php/Solarium/autoload.php';
+require_once '%{buildroot}%{_datadir}/php/Solarium%{major}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Solarium\\Tests\\', dirname(__DIR__) . '/tests');
\Fedora\Autoloader\Dependencies::required([
'%{_datadir}/php/GuzzleHttp6/autoload.php',
@@ -145,18 +144,21 @@ exit $ret
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license COPYING
-%doc composer.json *.md examples
-%{_datadir}/php/Solarium
+%doc composer.json
+%doc *.md examples
+%{_datadir}/php/Solarium%{major}
%changelog
* Tue Jun 12 2018 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 3.8.1-4
- fix autoloader for Symfony 3, FTBFS from Koschei