From 013eaef6c6226e5acb85a64bb9e809a66f67c8d1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 17 Apr 2015 09:03:34 +0200 Subject: php-adoy-fastcgi-client: mostly rewrite --- php-adoy-fastcgi-client.spec | 51 +++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/php-adoy-fastcgi-client.spec b/php-adoy-fastcgi-client.spec index 5661cf2..9056ca1 100644 --- a/php-adoy-fastcgi-client.spec +++ b/php-adoy-fastcgi-client.spec @@ -1,20 +1,37 @@ -Name: php-fastcgi-client -Summary: Template/Presentation Framework for PHP +# spec file for php-adoy-fastcgi-client +# +# Copyright (c) 2012-2015 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%global gh_commit c332dfc8d3f96e47022170f169de73cf8d8d4f0a +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_date 20150417 +%global gh_owner adoy +%global gh_project PHP-FastCGI-Client +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} + +Name: php-adoy-fastcgi-client +Summary: Client for communication with a FastCGI application Version: 1.0 -Release: 1%{?dist} +Release: 0.1.%{gh_date}git%{gh_short}%{?dist} URL: https://github.com/adoy/PHP-FastCGI-Client License: LGPLv2+ Group: Development/Libraries -# https://github.com/adoy/PHP-FastCGI-Client/archive/master.tar.gz -Source0: PHP-FastCGI-Client-master.tar.gz +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch +Requires: php(language) > 5.3 Requires: php-cli -Requires: php-spl +Requires: php-pcre +Obsoletes: php-fastcgi-client <= 1.0 +Provides: php-composer(adoy/fastcgi-client) = %{version} %description This PHP class handles the communication with a FastCGI (FCGI) application @@ -24,10 +41,10 @@ The package provides a simple command line test command: fcgiget. %prep -%setup -qn PHP-FastCGI-Client-master +%setup -q -n %{gh_project}-%{gh_commit} # Fix include path -sed -e '/^require/s:fastcgi.php:PHP-FastCGI-Client/fastcgi.php:' \ +sed -e '/^require/s:src/::' \ -i fcgiget.php @@ -39,7 +56,8 @@ sed -e '/^require/s:fastcgi.php:PHP-FastCGI-Client/fastcgi.php:' \ rm -rf %{buildroot} # install the class -install -Dpm 644 fastcgi.php %{buildroot}%{_datadir}/php/PHP-FastCGI-Client/fastcgi.php +mkdir -p %{buildroot}%{_datadir}/php +cp -pr src/Adoy %{buildroot}%{_datadir}/php/Adoy # install the command install -Dpm 755 fcgiget.php %{buildroot}%{_bindir}/fcgiget @@ -51,11 +69,18 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc LICENSE +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc README +%doc composer.json %{_bindir}/fcgiget -%{_datadir}/php/PHP-FastCGI-Client +%{_datadir}/php/Adoy %changelog -* Tue Oct 13 2012 Remi Collet - 1.0-1 -- Initial package +* Fri Apr 17 2015 Remi Collet - 1.0-0.1.20150417gitc332dfc +- rename to php-adoy-fastcgi-client +- PSR-0 tree + +* Sat Oct 13 2012 Remi Collet - 1.0-1 +- Initial package \ No newline at end of file -- cgit