summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-04-17 09:03:34 +0200
committerRemi Collet <fedora@famillecollet.com>2015-04-17 09:03:34 +0200
commit013eaef6c6226e5acb85a64bb9e809a66f67c8d1 (patch)
tree156fc4346663edde5097df189cb78a69a6746054
parent920ef30e10913907b030ee81097f8c24c30eb296 (diff)
php-adoy-fastcgi-client: mostly rewrite
-rw-r--r--php-adoy-fastcgi-client.spec51
1 files 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 <remi@fedoraproject.org> - 1.0-1
-- Initial package
+* Fri Apr 17 2015 Remi Collet <remi@fedoraproject.org> - 1.0-0.1.20150417gitc332dfc
+- rename to php-adoy-fastcgi-client
+- PSR-0 tree
+
+* Sat Oct 13 2012 Remi Collet <remi@fedoraproject.org> - 1.0-1
+- Initial package \ No newline at end of file