summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--Makefile4
-rw-r--r--uwsgi-plugin-php.spec90
3 files changed, 101 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab5c4f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+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..1e65467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
diff --git a/uwsgi-plugin-php.spec b/uwsgi-plugin-php.spec
new file mode 100644
index 0000000..6546f80
--- /dev/null
+++ b/uwsgi-plugin-php.spec
@@ -0,0 +1,90 @@
+# remirepo/fedora spec file for uwsgi-plugin-php
+#
+# Copyright (c) 2017 Remi Collet
+# License: CC-BY-SA
+# http://creativecommons.org/licenses/by-sa/4.0/
+#
+# Please, preserve the changelog entries
+#
+
+%global project uwsgi
+
+# Disable RPATH check
+%global __arch_install_post /bin/true
+
+# Disable auto-provides (php_plugin.so is not a library)
+AutoProv: 0
+
+%if 0%{?scl:1}
+%scl_package %{project}-plugin-php
+AutoReq: 0
+# ensure correct dependencies
+Requires: %{scl_prefix}php-cli
+Requires: %{scl_prefix}php-embedded
+%else
+%global _root_libdir %{_libdir}
+%endif
+
+Name: %{?scl_prefix}%{project}-plugin-php
+Version: 2.0.15
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Summary: uWSGI - Plugin for PHP support
+License: GPLv2 with exceptions
+URL: http://projects.unbit.it/uwsgi
+Group: System Environment/Daemons
+
+Source0: http://projects.unbit.it/downloads/%{project}-%{version}.tar.gz
+
+BuildRequires: %{?scl_prefix}php-devel
+BuildRequires: %{?scl_prefix}php-embedded
+BuildRequires: %{project}-devel
+BuildRequires: bzip2-devel
+BuildRequires: libxml2-devel
+BuildRequires: libedit-devel
+BuildRequires: libcap-devel
+BuildRequires: ncurses-devel
+BuildRequires: openssl-devel
+BuildRequires: pcre-devel
+BuildRequires: zlib-devel
+BuildRequires: python
+
+Requires: %{project}-plugin-common = %{version}
+
+
+%description
+This package contains the PHP plugin for uWSGI,
+designed to work with %{project} in %{?fedora:Fedora}%{?rhel:EPEL} repository.
+
+Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
+
+
+%prep
+%setup -qn %{project}-%{version}
+
+# Fix makefile
+sed -e 's:/lib:/%{_lib}:' -i plugins/php/uwsgiplugin.py
+
+
+%build
+# for php-config PATH (mandatory for SCL)
+export UWSGICONFIG_PHPDIR=%{_prefix}
+
+# for RPATH
+export UWSGICONFIG_PHPLIBDIR=%{_libdir}
+
+python uwsgiconfig.py --verbose --plugin plugins/php default %{?scl}
+
+
+%install
+install -Dpm 755 %{?scl}%{!?scl:php}_plugin.so %{buildroot}%{_root_libdir}/%{project}/%{?scl}%{!?scl:php}_plugin.so
+
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%{_root_libdir}/uwsgi/%{?scl}%{!?scl:php}_plugin.so
+
+
+%changelog
+* Wed Jun 21 2017 Remi Collet <remi@remirepo.net> - 2.0.15-1
+- initial package