summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-10-09 16:23:25 +0200
committerRemi Collet <fedora@famillecollet.com>2014-10-09 16:23:25 +0200
commit3bd87b5b1026053ef6cd4cece524ba686ea562ed (patch)
treeda9e298212b31149d16b1fc53b1d1d840e4524ab
parentd4b5a2144dca5b895f6fad107d5c1ecf195e0178 (diff)
php-pear-PHP-CodeSniffer: cleanup from rawhide
-rw-r--r--PHP_CodeSniffer-licence.txt28
-rw-r--r--php-pear-PHP-CodeSniffer.spec32
2 files changed, 51 insertions, 9 deletions
diff --git a/PHP_CodeSniffer-licence.txt b/PHP_CodeSniffer-licence.txt
new file mode 100644
index 0000000..b2f2ab1
--- /dev/null
+++ b/PHP_CodeSniffer-licence.txt
@@ -0,0 +1,28 @@
+PHP_CodeSniffer Licence
+
+Copyright (c) 2006, Squiz Pty Ltd (ABN 77 084 670 600) All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name of Squiz Pty Ltd nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/php-pear-PHP-CodeSniffer.spec b/php-pear-PHP-CodeSniffer.spec
index b9c34f8..bd3e071 100644
--- a/php-pear-PHP-CodeSniffer.spec
+++ b/php-pear-PHP-CodeSniffer.spec
@@ -1,4 +1,15 @@
-%{!?__pear: %global __pear %{_bindir}/pear}
+# spec file for php-pear-PHP-CodeSniffer
+#
+# Copyright (c) 2013-2014 Remi Collet
+# Copyright (c) 2009-2013 Christof Damian
+# Copyright (c) 2006-2009 Konstantin Ryabitsev
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
+# Please, preserve the changelog entries
+#
+%{!?__pear: %global __pear %{_bindir}/pear}
%global pear_name PHP_CodeSniffer
Name: php-pear-PHP-CodeSniffer
@@ -10,6 +21,8 @@ Group: Development/Tools
License: BSD
URL: http://pear.php.net/package/PHP_CodeSniffer
Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz
+# https://github.com/squizlabs/PHP_CodeSniffer/issues/273
+Source1: PHP_CodeSniffer-licence.txt
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -23,33 +36,32 @@ Requires(postun): %{__pear}
Requires: php-pear(PEAR)
# From package.xml - optional
Requires: php-pear(pear.phpunit.de/PHP_Timer) >= 1.0.0
-# From phpcompatinfo report for version 1.4.8
+# From phpcompatinfo report for version 1.5.5
Requires: php-ctype
Requires: php-date
Requires: php-dom
-Requires: php-gettext
Requires: php-iconv
-Requires: php-json
Requires: php-pcre
-Requires: php-pdo
-Requires: php-soap
Requires: php-reflection
+Requires: php-simplexml
Requires: php-spl
Requires: php-tokenizer
Requires: php-xmlwriter
-Requires: php-zip
Provides: php-pear(%{pear_name}) = %{version}
Provides: php-composer(squizlabs/php_codesniffer) = %{version}
Provides: phpcs = %{version}
Obsoletes: phpcs < %{version}
+
%description
PHP_CodeSniffer provides functionality to verify that code conforms to
certain standards, such as PEAR, or user-defined.
+
%prep
%setup -q -c
+
sed -e '/phpcs-svn-pre-commit/s/role="script"/role="doc"/' \
package.xml >%{pear_name}-%{version}/%{pear_name}.xml
@@ -64,7 +76,6 @@ cd %{pear_name}-%{version}
%{__pear} install --nodeps --packagingroot %{buildroot} %{pear_name}.xml
-
# Clean up unnecessary files
rm -rf %{buildroot}%{pear_metadir}/.??*
@@ -72,11 +83,13 @@ rm -rf %{buildroot}%{pear_metadir}/.??*
mkdir -p %{buildroot}%{pear_xmldir}
install -pm 644 %{pear_name}.xml %{buildroot}%{pear_xmldir}
+install -pm 644 %{SOURCE1} %{buildroot}%{pear_docdir}/%{pear_name}/LICENSE
+
%check
cd %{pear_name}-%{version}/tests
-# Version 1.5.0 : Tests: 215, Assertions: 57, Skipped: 3.
+# Version 1.5.5 : 216, Assertions: 57, Skipped: 4.
%{_bindir}/phpunit \
-d date.timezone=UTC \
--verbose \
@@ -86,6 +99,7 @@ cd %{pear_name}-%{version}/tests
%clean
rm -rf %{buildroot}
+
%post
%{__pear} install --nodeps --soft --force --register-only \
%{pear_xmldir}/%{pear_name}.xml >/dev/null || :