summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-11-06 19:11:46 +0100
committerRemi Collet <fedora@famillecollet.com>2016-11-06 19:11:46 +0100
commit7de4a0eb2874c4a50458eeceb7699fd2fb0cdaf0 (patch)
treec36ae6e3da24c5d178a15e46e4861eb5043358ce
parent77c1472edf9e3b2b5dd6efb421ef9aa0b9753baf (diff)
php-sentry: add backport stuff
-rw-r--r--Makefile4
-rw-r--r--composer.json39
-rwxr-xr-xphp-sentry-get-source.sh4
-rw-r--r--php-sentry.spec27
4 files changed, 73 insertions, 1 deletions
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..2fde623
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,39 @@
+{
+ "name": "sentry/sentry",
+ "type": "library",
+ "description": "A PHP client for Sentry (http://getsentry.com)",
+ "keywords": ["log", "logging"],
+ "homepage": "http://getsentry.com",
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "David Cramer",
+ "email": "dcramer@gmail.com"
+ }
+ ],
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "^1.8.0",
+ "phpunit/phpunit": "^4.6.6"
+ },
+ "require": {
+ "php": ">=5.2.4",
+ "ext-curl": "*",
+ "monolog/monolog": "*"
+ },
+ "conflict": {
+ "raven/raven": "*"
+ },
+ "bin": [
+ "bin/sentry"
+ ],
+ "autoload": {
+ "psr-0" : {
+ "Raven_" : "lib/"
+ }
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.22.x-dev"
+ }
+ }
+}
diff --git a/php-sentry-get-source.sh b/php-sentry-get-source.sh
index ba71f5d..9399d7f 100755
--- a/php-sentry-get-source.sh
+++ b/php-sentry-get-source.sh
@@ -43,6 +43,8 @@ print "GIT_REPO = $GIT_REPO"
print "GIT_DIR = $GIT_DIR"
TEMP_DIR=$(mktemp --dir)
+TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
+CMP_FILE=$PWD/composer.json
pushd $TEMP_DIR
print "Cloning git repo..."
@@ -51,6 +53,7 @@ pushd $TEMP_DIR
pushd $GIT_DIR
print "Checking out commit..."
$GIT checkout $GIT_COMMIT
+ cp composer.json $CMP_FILE
popd
TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
@@ -58,7 +61,6 @@ pushd $TEMP_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
diff --git a/php-sentry.spec b/php-sentry.spec
index 59ffb5f..7d980b7 100644
--- a/php-sentry.spec
+++ b/php-sentry.spec
@@ -1,3 +1,4 @@
+# remirepo spec file for php-sentry, from
#
# Fedora spec file for php-sentry
#
@@ -46,6 +47,7 @@ URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
Source1: %{name}-get-source.sh
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
# Library version value check
BuildRequires: php-cli
@@ -138,6 +140,8 @@ AUTOLOAD
%install
+rm -rf %{buildroot}
+
mkdir -p %{buildroot}%{phpdir}
cp -rp lib/* %{buildroot}%{phpdir}/
@@ -165,13 +169,33 @@ require_once '%{buildroot}%{phpdir}/Raven/autoload.php';
BOOTSTRAP
: Run tests
+# remirepo:11
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/phpunit --bootstrap bootstrap.php || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
+# remirepo:2
+fi
+exit $ret
%else
: Tests skipped
%endif
+%clean
+rm -rf %{buildroot}
+
+
%files
+%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.rst
@@ -184,5 +208,8 @@ BOOTSTRAP
%changelog
+* Sun Nov 6 2016 Remi Collet <remi@remirepo.net> - 0.22.0-1
+- add backport stuff for remi repo.
+
* Thu Nov 03 2016 Shawn Iwinski <shawn@iwin.ski> - 0.22.0-1
- Initial package