From a0018ed841eb3ea7cb6b152e5fbe1e6a162d5424 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 2 Jul 2017 14:19:48 +0200 Subject: [PATCH] First commit --- createlinks | 3 ++ .../opt/remi/php56/root/etc/php-fpm.conf | 6 +++ .../e-smith/templates/etc/php-fpm.conf/010Include | 1 + .../e-smith/templates/etc/php-fpm.conf/020Global | 1 + root/etc/e-smith/templates/etc/php-fpm.conf/030Pid | 1 + root/etc/e-smith/templates/etc/php-fpm.conf/040Log | 4 ++ .../e-smith/templates/etc/php-fpm.conf/050Daemon | 1 + smeserver-php-fpm.spec | 51 ++++++++++++++++++++++ 8 files changed, 68 insertions(+) create mode 100644 createlinks create mode 100644 root/etc/e-smith/templates.metadata/opt/remi/php56/root/etc/php-fpm.conf create mode 100644 root/etc/e-smith/templates/etc/php-fpm.conf/010Include create mode 100644 root/etc/e-smith/templates/etc/php-fpm.conf/020Global create mode 100644 root/etc/e-smith/templates/etc/php-fpm.conf/030Pid create mode 100644 root/etc/e-smith/templates/etc/php-fpm.conf/040Log create mode 100644 root/etc/e-smith/templates/etc/php-fpm.conf/050Daemon create mode 100644 smeserver-php-fpm.spec diff --git a/createlinks b/createlinks new file mode 100644 index 0000000..d56dffa --- /dev/null +++ b/createlinks @@ -0,0 +1,3 @@ +#!/usr/bin/perl -w + +use esmith::Build::CreateLinks qw(:all); diff --git a/root/etc/e-smith/templates.metadata/opt/remi/php56/root/etc/php-fpm.conf b/root/etc/e-smith/templates.metadata/opt/remi/php56/root/etc/php-fpm.conf new file mode 100644 index 0000000..116b596 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/opt/remi/php56/root/etc/php-fpm.conf @@ -0,0 +1,6 @@ +TEMPLATE_PATH="/etc/php-fpm.conf" +MORE_DATA={ + PHP_VERSION => 56, + PID_DIR => "/opt/remi/php56/root/var/run/php-fpm", + FPM_POOL_DIR => "/opt/remi/php56/root/etc/php-fpm.d", +} diff --git a/root/etc/e-smith/templates/etc/php-fpm.conf/010Include b/root/etc/e-smith/templates/etc/php-fpm.conf/010Include new file mode 100644 index 0000000..c5b3020 --- /dev/null +++ b/root/etc/e-smith/templates/etc/php-fpm.conf/010Include @@ -0,0 +1 @@ +include={ $FPM_POOL_DIR }/*.conf diff --git a/root/etc/e-smith/templates/etc/php-fpm.conf/020Global b/root/etc/e-smith/templates/etc/php-fpm.conf/020Global new file mode 100644 index 0000000..488f610 --- /dev/null +++ b/root/etc/e-smith/templates/etc/php-fpm.conf/020Global @@ -0,0 +1 @@ +[global] diff --git a/root/etc/e-smith/templates/etc/php-fpm.conf/030Pid b/root/etc/e-smith/templates/etc/php-fpm.conf/030Pid new file mode 100644 index 0000000..ca081b5 --- /dev/null +++ b/root/etc/e-smith/templates/etc/php-fpm.conf/030Pid @@ -0,0 +1 @@ +pid = { $PID_DIR }/php-fpm.pid diff --git a/root/etc/e-smith/templates/etc/php-fpm.conf/040Log b/root/etc/e-smith/templates/etc/php-fpm.conf/040Log new file mode 100644 index 0000000..8dd3188 --- /dev/null +++ b/root/etc/e-smith/templates/etc/php-fpm.conf/040Log @@ -0,0 +1,4 @@ +error_log = syslog +syslog.facility = daemon +syslog.ident = php{ $PHP_VERSION }-fpm + diff --git a/root/etc/e-smith/templates/etc/php-fpm.conf/050Daemon b/root/etc/e-smith/templates/etc/php-fpm.conf/050Daemon new file mode 100644 index 0000000..21d3e4a --- /dev/null +++ b/root/etc/e-smith/templates/etc/php-fpm.conf/050Daemon @@ -0,0 +1 @@ +daemonize = yes diff --git a/smeserver-php-fpm.spec b/smeserver-php-fpm.spec new file mode 100644 index 0000000..fc4cc07 --- /dev/null +++ b/smeserver-php-fpm.spec @@ -0,0 +1,51 @@ +%define version 0.0.1 +%define release 0.beta1 +%define name smeserver-php-fpm + + +Summary: PHP FPM pools on SME Server +Name: %{name} +Version: %{version} +Release: %{release}%{?dist} +License: MIT +Group: Applications/System +Source: %{name}-%{version}.tar.gz + +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot +BuildArchitectures: noarch +BuildRequires: e-smith-devtools + +Requires: e-smith-base >= 5.6.0 +Requires: php56-fpm + +%description +Manage PHP FPM pools, and switch between PHP versions easily + +%prep +%setup -q -n %{name}-%{version} + +%build +perl createlinks + +%install +/bin/rm -rf $RPM_BUILD_ROOT +(cd root; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) +/bin/rm -f %{name}-%{version}-filelist +/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ + > %{name}-%{version}-filelist + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f %{name}-%{version}-filelist +%defattr(-,root,root) + +%pre + +%post + +%preun + +%changelog +* Sun Jul 2 2017 Daniel Berteaud - 0.0.1-1.sme +- Initial release