summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-06-10 07:17:36 +0200
committerRemi Collet <fedora@famillecollet.com>2012-06-10 07:17:36 +0200
commite69a395e8a4cd9ea83a87590b177e712f59aed84 (patch)
tree1777c3a6b263ed29611abeb64e60254bead5b007
repo reorg
-rw-r--r--Makefile4
-rw-r--r--PHP_CompatInfo-addhtml.patch15
-rw-r--r--PHP_CompatInfo-del.patch52
-rw-r--r--PHP_CompatInfo-docs.patch51
-rw-r--r--php-bartlett-PHP-CompatInfo.spec195
5 files changed, 317 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1e65467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
diff --git a/PHP_CompatInfo-addhtml.patch b/PHP_CompatInfo-addhtml.patch
new file mode 100644
index 0000000..39f1a61
--- /dev/null
+++ b/PHP_CompatInfo-addhtml.patch
@@ -0,0 +1,15 @@
+diff -up PHP_CompatInfo-2.1.0/php-bartlett-PHP-CompatInfo.xml.addhtml PHP_CompatInfo-2.1.0/php-bartlett-PHP-CompatInfo.xml
+--- PHP_CompatInfo-2.1.0/php-bartlett-PHP-CompatInfo.xml.addhtml 2011-09-20 18:22:05.525712911 +0200
++++ PHP_CompatInfo-2.1.0/php-bartlett-PHP-CompatInfo.xml 2011-09-20 18:23:53.312153155 +0200
+@@ -784,6 +784,11 @@ Bug fixes:
+ <file baseinstalldir="Bartlett" md5sum="c65cb59e8aa7d6e164f5908c6a4f3348" name="README.markdown" role="doc">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
++ <file baseinstalldir="Bartlett" name="docs/index.html" role="doc" />
++ <file baseinstalldir="Bartlett" name="docs/INSTALL.html" role="doc" />
++ <file baseinstalldir="Bartlett" name="docs/LICENSE.html" role="doc" />
++ <file baseinstalldir="Bartlett" name="docs/phpci-book.html" role="doc" />
++ <file baseinstalldir="Bartlett" name="docs/CHANGELOG.html" role="doc" />
+ </dir>
+ </contents>
+ <dependencies>
diff --git a/PHP_CompatInfo-del.patch b/PHP_CompatInfo-del.patch
new file mode 100644
index 0000000..523f76d
--- /dev/null
+++ b/PHP_CompatInfo-del.patch
@@ -0,0 +1,52 @@
+diff -up PHP_CompatInfo-2.1.0/php-bartlett-PHP-CompatInfo.xml.deljs PHP_CompatInfo-2.1.0/php-bartlett-PHP-CompatInfo.xml
+--- PHP_CompatInfo-2.1.0/php-bartlett-PHP-CompatInfo.xml.deljs 2011-08-24 20:39:25.000000000 +0200
++++ PHP_CompatInfo-2.1.0/php-bartlett-PHP-CompatInfo.xml 2011-09-21 17:41:03.925086384 +0200
+@@ -136,12 +136,6 @@ Bug fixes:
+ <file baseinstalldir="Bartlett" md5sum="adcac4a13f10988d55dc357ff91aee0e" name="docs/images/thumb_summary2.png" role="doc">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+- <file baseinstalldir="Bartlett" md5sum="a3e60e26c6b1b9271c48e16dda9b6e03" name="docs/js/asciidoc-xhtml11.js" role="doc">
+- <tasks:replace from="@package_version@" to="version" type="package-info" />
+- </file>
+- <file baseinstalldir="Bartlett" md5sum="9f32dfead2e0cdcf5e3157a4f8cb0a3b" name="docs/js/asciidoc.js" role="doc">
+- <tasks:replace from="@package_version@" to="version" type="package-info" />
+- </file>
+ <file baseinstalldir="Bartlett" md5sum="16cfb6e94de43a22241c92bed60d02c2" name="docs/styles/flask.css" role="doc">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+@@ -736,9 +730,6 @@ Bug fixes:
+ <file baseinstalldir="Bartlett" md5sum="35505cce5faa97b9c143f6ce53b7a72c" name="tests/_files/source6581.php" role="test">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+- <file baseinstalldir="Bartlett" md5sum="249296c67a98618527669212d47923df" name="tests/_files/source7813.php" role="test">
+- <tasks:replace from="@package_version@" to="version" type="package-info" />
+- </file>
+ <file baseinstalldir="Bartlett" md5sum="4ba6508ce5fb1de3d5f6e2db518c0637" name="tests/_files/source10100.php" role="test">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+@@ -748,9 +739,6 @@ Bug fixes:
+ <file baseinstalldir="Bartlett" md5sum="be4f84e82acd838ee9202cbc87f01f0a" name="tests/_files/source13568.php" role="test">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+- <file baseinstalldir="Bartlett" md5sum="79676ff8f980d53d07249c5684eb12d0" name="tests/_files/source13873.php" role="test">
+- <tasks:replace from="@package_version@" to="version" type="package-info" />
+- </file>
+ <file baseinstalldir="Bartlett" md5sum="c48d70ec9db9a67b61c33dcc7a82642b" name="tests/_files/source14696.php" role="test">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+@@ -772,15 +760,9 @@ Bug fixes:
+ <file baseinstalldir="Bartlett" md5sum="bda22dd135c0c4f7ee5a0212d7a69681" name="tests/InterfaceTest.php" role="test">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+- <file baseinstalldir="Bartlett" md5sum="90e48d1f6e8a42c95793f5578dbad80b" name="tests/IssueTest.php" role="test">
+- <tasks:replace from="@package_version@" to="version" type="package-info" />
+- </file>
+ <file baseinstalldir="Bartlett" md5sum="4d45dab1a4194641f85fbc08cd0de157" name="tests/MagicConstantTest.php" role="test">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
+- <file baseinstalldir="Bartlett" md5sum="29bb287cdbe03d2b9ac5a8309198df41" name="tests/PackageTest.php" role="test">
+- <tasks:replace from="@package_version@" to="version" type="package-info" />
+- </file>
+ <file baseinstalldir="Bartlett" md5sum="6fd3e176cb64b4b8a5c303ba3359d7d3" name="LICENSE" role="doc">
+ <tasks:replace from="@package_version@" to="version" type="package-info" />
+ </file>
diff --git a/PHP_CompatInfo-docs.patch b/PHP_CompatInfo-docs.patch
new file mode 100644
index 0000000..9b548a7
--- /dev/null
+++ b/PHP_CompatInfo-docs.patch
@@ -0,0 +1,51 @@
+diff -up PHP_CompatInfo-2.1.0/docs/index.txt.orig PHP_CompatInfo-2.1.0/docs/index.txt
+--- PHP_CompatInfo-2.1.0/docs/index.txt.orig 2011-08-25 08:24:54.198681536 +0200
++++ PHP_CompatInfo-2.1.0/docs/index.txt 2011-08-25 08:29:10.706968690 +0200
+@@ -167,28 +167,23 @@ Will output results as follow. May diffe
+ The PHP_CompatInfo manual is available in a selection of formats. Pick a format
+ from the table below to start downloading.
+
+-[grid="rows",format="csv"]
+ [options="header"]
+ |===========================
+-Language,Single HTML file,Many HTML files,HTML Help file (CHM),PDF file
+-English, link:{man_dir}/en/pci-book.html.zip[pci-book.html.zip] 529Kb, link:{man_dir}/en/phpci-book.chunked.zip[phpci-book.chunked.zip] 464Kb , link:{man_dir}/en/phpci-book.chm.zip[phpci-book.chm.zip] 469Kb, link:{man_dir}/en/phpci-book.pdf[phpci-book.pdf] 512Kb
++| Language | Single HTML file | Many HTML files | HTML Help file (CHM) | PDF file
++| English | link:{man_dir}/en/pci-book.html.zip[pci-book.html.zip] 529Kb | link:{man_dir}/en/phpci-book.chunked.zip[phpci-book.chunked.zip] 464Kb | link:{man_dir}/en/phpci-book.chm.zip[phpci-book.chm.zip] 469Kb | link:{man_dir}/en/phpci-book.pdf[phpci-book.pdf] 512Kb
+ |===========================
+
+-[appendix]
+-Changelog
+----------
++== Appendix A: Changelog
++
+ link:CHANGELOG.html[History of changes]
+
+-[appendix]
+-License
+--------
++== Appendix B: License
++
+ Released under the link:LICENSE.html[BSD] license,
+ you are free to do whatever you want, even in a commercial environment.
+ You are also encouraged to contribute.
+
+-[appendix]
+-Credits
+--------
++== Appendix C: Credits
+
+ I would like to thanks here specially a guy without who this PHP QA tool
+ won't be born.
+@@ -214,9 +209,8 @@ on version 2.0.0RC2
+ ____
+
+
+-[appendix]
+-Links
+------
++== Appendix D: Links
++
+ All pages of this site, and user guide were generated with AsciiDoc 8.6.5,
+ assisted by FOP 1.0 (for PDFs). Automated build process uses Phing 2.4.5
+
diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec
new file mode 100644
index 0000000..148e2af
--- /dev/null
+++ b/php-bartlett-PHP-CompatInfo.spec
@@ -0,0 +1,195 @@
+%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+%global pear_name PHP_CompatInfo
+%global channel bartlett.laurent-laville.org
+
+%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
+%global withhtmldoc 1
+%else
+%global withhtmldoc 0
+%endif
+
+# TODO : link /usr/share/pear/data/PHP_CompatInfo/misc/jquery-1.5.min.js
+# to system jquery when available, then fix License (BSD only)
+
+
+Name: php-bartlett-PHP-CompatInfo
+Version: 2.1.0
+Release: 3%{?dist}
+Summary: Find out version and the extensions required for a piece of code to run
+
+Group: Development/Libraries
+# PHP-CompatInfo is BSD, bundled jquery is MIT (or GPL)
+License: BSD and MIT
+URL: http://php5.laurent-laville.org/compatinfo/
+Source0: http://bartlett.laurent-laville.org/get/%{pear_name}-%{version}%{?prever}.tgz
+
+# for old asciidoc version https://bugzilla.redhat.com/556171
+Patch0: PHP_CompatInfo-docs.patch
+# Remove unused asciidoc*.js scripts
+# source7813.php => PHP License
+# source13873.php => GPL
+# and tests which use this files.
+Patch1: PHP_CompatInfo-del.patch
+# Install generated doc using pear command
+Patch2: PHP_CompatInfo-addhtml.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch: noarch
+BuildRequires: php-pear(PEAR) >= 1.9.0
+BuildRequires: php-channel(%{channel})
+# to run test suite
+BuildRequires: php-pear(pear.phpunit.de/PHPUnit) >= 3.5.0
+BuildRequires: php-pear(%{channel}/PHP_Reflect) >= 0.7.0
+%if %{withhtmldoc}
+# to build HTML documentation
+BuildRequires: php-pear(pear.phing.info/phing)
+BuildRequires: asciidoc >= 8.4.0
+%endif
+
+Requires(post): %{__pear}
+Requires(postun): %{__pear}
+Requires: php-xml >= 5.2.0
+Requires: php-pear(PEAR) >= 1.9.0
+Requires: php-pear(%{channel}/PHP_Reflect) >= 0.7.0
+Requires: php-pear(Console_CommandLine) >= 1.1.3
+Requires: php-pear(components.ez.no/ConsoleTools) >= 1.6.1
+Requires: php-pear(pear.phpunit.de/PHPUnit) >= 3.5.0
+# Optional and not yet availalble php-pear(Net_Growl) >= 2.2.2
+# php-pear(components.ez.no/Base) required by ConsoleTools
+# php-pear(pear.phpunit.de/PHP_Timer) required by PHPUnit
+
+Provides: php-pear(%{channel}/%{pear_name}) = %{version}%{?prever}
+
+
+%description
+PHP_CompatInfo will parse a file/folder/array to find out the minimum
+version and extensions required for it to run. CLI version has many reports
+(extension, interface, class, function, constant) to display and ability to
+show content of dictionary references.
+
+%if %{withhtmldoc}
+HTML Documentation: %{pear_docdir}/%{pear_name}/docs/index.html
+%endif
+
+
+%prep
+%setup -q -c
+
+# Package is V2
+cd %{pear_name}-%{version}%{?prever}
+mv -f ../package.xml %{name}.xml
+
+%patch0 -p1 -b .fix
+%patch1 -p1 -b .del
+%if %{withhtmldoc}
+%patch2 -p1 -b .addhtml
+%endif
+
+
+%build
+cd %{pear_name}-%{version}%{?prever}
+
+%if %{withhtmldoc}
+# Generate the HTML documentation
+phing -f docs/build-phing.xml \
+ -Dhomedir=$PWD \
+ -Dasciidoc.home=%{_datadir}/asciidoc \
+ make-full-docs
+
+# asciidoc fails silently
+cpt=$(find docs -name \*.html | wc -l)
+echo "File generated:$cpt, expected:5"
+[ $cpt -eq 5 ] || exit 1
+%endif
+
+# restore unpatched docs (for install and checksum)
+mv docs/index.txt.fix docs/index.txt
+
+
+%install
+rm -rf %{buildroot}
+cd %{pear_name}-%{version}%{?prever}
+%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
+
+# Clean up unnecessary files
+rm -rf %{buildroot}%{pear_phpdir}/.??*
+
+# Install XML package description
+mkdir -p %{buildroot}%{pear_xmldir}
+install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
+
+# Fix wrong-script-end-of-line-encoding
+sed -i -e 's/\r//' %{buildroot}%{_bindir}/phpci
+sed -i -e 's/\r//' %{buildroot}%{pear_docdir}/%{pear_name}/README.markdown
+
+
+%check
+cd %{pear_name}-%{version}%{?prever}
+
+# OK (444, Assertions: 8380, Skipped: 7) when all extensions installed
+# OK, but incomplete or skipped tests!
+# Tests: 329, Assertions: 5446, Skipped: 133.
+# Reference tests need some fixes for EL-4, so ignore result for now
+%{_bindir}/phpunit \
+ -d date.timezone=UTC \
+ -d memory_limit=-1 \
+ --bootstrap %{buildroot}%{pear_phpdir}/Bartlett/PHP/CompatInfo/Autoload.php \
+%if 0%{?rhel} < 6 && 0%{?fedora} < 8
+ tests || exit 0
+%else
+ tests
+%endif
+
+
+%post
+%{__pear} install --nodeps --soft --force --register-only \
+ %{pear_xmldir}/%{name}.xml >/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+ %{__pear} uninstall --nodeps --ignore-errors --register-only \
+ %{channel}/%{pear_name} >/dev/null || :
+fi
+
+
+%files
+%defattr(-,root,root,-)
+%doc %{pear_docdir}/%{pear_name}
+%dir %{pear_cfgdir}/%{pear_name}
+%config(noreplace) %{pear_cfgdir}/%{pear_name}/*dist
+%{pear_xmldir}/%{name}.xml
+%{pear_phpdir}/Bartlett/PHP/Compat*
+%{pear_testdir}/%{pear_name}
+%{pear_datadir}/%{pear_name}
+%{_bindir}/phpci
+
+
+%changelog
+* Wed Sep 21 2011 Remi Collet <remi@fedoraproject.org> - 2.1.0-3
+- remove all files with licensing issue
+ don't use it during test, don't install it
+ can keep it in sources are this files are still under free license
+
+* Tue Sep 20 2011 Remi Collet <remi@fedoraproject.org> - 2.1.0-2
+- comments from review #693204
+- remove ascii*js (not used)
+- add MIT to license for bundled jquery
+
+* Thu Aug 25 2011 Remi Collet <Fedora@FamilleCollet.com> - 2.1.0-1
+- Version 2.1.0 (stable) - API 2.1.0 (stable)
+- fix documentation for asciidoc 8.4
+
+* Sat Jun 02 2011 Remi Collet <Fedora@FamilleCollet.com> - 2.0.0-1
+- Version 2.0.0 (stable) - API 2.0.0 (stable)
+- add HTML documentation
+
+* Tue Apr 26 2011 Remi Collet <Fedora@FamilleCollet.com> - 2.0.0-0.3.RC4
+- Version 2.0.0RC4 (beta) - API 2.0.0 (beta)
+
+* Fri Mar 25 2011 Remi Collet <Fedora@FamilleCollet.com> - 2.0.0-0.2.RC3
+- Version 2.0.0RC3
+
+* Wed Feb 25 2011 Remi Collet <Fedora@FamilleCollet.com> - 2.0.0-0.1.RC2
+- Version 2.0.0RC2
+- Initial Release
+