[packages/phploc] up to 2.0.6; use github release

glen glen at pld-linux.org
Thu Nov 26 10:41:23 CET 2015


commit 27b265fc25821c9425fa71d25edde1d75ecf7a5c
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Nov 26 11:40:38 2015 +0200

    up to 2.0.6; use github release

 autoload.patch | 44 +++++++++++++++++++++++++++++++++++---------
 phploc.spec    | 27 +++++++++++++--------------
 2 files changed, 48 insertions(+), 23 deletions(-)
---
diff --git a/phploc.spec b/phploc.spec
index d4e542f..4900f64 100644
--- a/phploc.spec
+++ b/phploc.spec
@@ -2,20 +2,18 @@
 %include	/usr/lib/rpm/macros.php
 Summary:	A tool for quickly measuring the size of a PHP project
 Name:		phploc
-Version:	2.0.4
-Release:	2
+Version:	2.0.6
+Release:	1
 License:	BSD
 Group:		Development/Languages/PHP
-Source0:	http://pear.phpunit.de/get/%{name}-%{version}.tgz
-# Source0-md5:	2d8cf318bc1c2c9f631dc6aede63bcf6
+Source0:	https://github.com/sebastianbergmann/phploc/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	9ff44f461e6f8fe54b335acf97c42fb4
 Patch0:		autoload.patch
 URL:		https://github.com/sebastianbergmann/phploc
-BuildRequires:	php-channel(pear.phpunit.de)
-BuildRequires:	php-pear-PEAR >= 1:1.9.4
+BuildRequires:	phpab
 BuildRequires:	rpm-php-pearprov >= 4.4.2-11
 BuildRequires:	rpmbuild(macros) >= 1.654
 Requires:	php(tokenizer)
-Requires:	php-channel(pear.phpunit.de)
 Requires:	php-pear
 Requires:	php-phpunit-FinderFacade >= 1.1.0
 Requires:	php-phpunit-Git >= 1.0.0
@@ -36,22 +34,23 @@ them when you just need to get a quick understanding of a project's
 size.
 
 %prep
-%pear_package_setup
+%setup -q
 %patch0 -p1
-mv docs/phploc/* .
+
+%build
+phpab -n -o src/autoload.php src
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{php_pear_dir}}
-%pear_package_install
-install -p ./%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{php_pear_dir}/SebastianBergmann/PHPLOC}
+install -p phploc $RPM_BUILD_ROOT%{_bindir}/%{name}
+cp -a src/* $RPM_BUILD_ROOT%{php_pear_dir}/SebastianBergmann/PHPLOC
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README.md LICENSE install.log
-%{php_pear_dir}/.registry/.channel.*/*.reg
+%doc README.md LICENSE
 %attr(755,root,root) %{_bindir}/phploc
 %{php_pear_dir}/SebastianBergmann/PHPLOC
diff --git a/autoload.patch b/autoload.patch
index 1a6d767..507226e 100644
--- a/autoload.patch
+++ b/autoload.patch
@@ -1,11 +1,37 @@
---- phploc-2.0.4/./usr/share/pear/SebastianBergmann/PHPLOC/autoload.php~	2015-11-26 00:38:56.000000000 +0200
-+++ phploc-2.0.4/./usr/share/pear/SebastianBergmann/PHPLOC/autoload.php	2015-11-26 00:39:15.371256072 +0200
-@@ -44,7 +44,7 @@
- require_once 'SebastianBergmann/FinderFacade/autoload.php';
- require_once 'SebastianBergmann/Git/autoload.php';
- require_once 'SebastianBergmann/Version/autoload.php';
--require_once 'Symfony/Component/Console/autoloader.php';
+--- phploc-2.0.4/phploc~	2013-12-18 10:31:50.000000000 +0200
++++ phploc-2.0.5/phploc	2015-11-26 11:37:55.082136288 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env php
++#!/usr/bin/php
+ <?php
+ /**
+  * phploc
+@@ -42,23 +42,11 @@
+  * @since     File available since Release 1.0.0
+  */
+ 
+-$loaded = false;
+-
+-foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
+-    if (file_exists($file)) {
+-        require $file;
+-        $loaded = true;
+-        break;
+-    }
+-}
+-
+-if (!$loaded) {
+-    die(
+-        'You need to set up the project dependencies using the following commands:' . PHP_EOL .
+-        'wget http://getcomposer.org/composer.phar' . PHP_EOL .
+-        'php composer.phar install' . PHP_EOL
+-    );
+-}
++require_once 'SebastianBergmann/PHPLOC/autoload.php';
++require_once 'SebastianBergmann/FinderFacade/autoload.php';
++require_once 'SebastianBergmann/Git/autoload.php';
++require_once 'SebastianBergmann/Version/autoload.php';
 +require_once 'Symfony/Component/Console/autoload.php';
  
- spl_autoload_register(
-     function($class) {
+ $application = new SebastianBergmann\PHPLOC\CLI\Application;
+ $application->run();
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/phploc.git/commitdiff/27b265fc25821c9425fa71d25edde1d75ecf7a5c



More information about the pld-cvs-commit mailing list