[php-bartlett-PHP-Reflect] import new package

Remi Collet remi at fedoraproject.org
Tue Sep 20 18:07:53 UTC 2011


commit e9748172ecdfc38edd14d7cb5378799185c55ae5
Author: remi <fedora at famillecollet.com>
Date:   Tue Sep 20 20:07:36 2011 +0200

    import new package

 .gitignore                    |    1 +
 PHP_Reflect-addhtml.patch     |   19 +++++
 PHP_Reflect-deljs.patch       |   16 ++++
 PHP_Reflect-docs.patch        |   71 +++++++++++++++++
 php-bartlett-PHP-Reflect.spec |  174 +++++++++++++++++++++++++++++++++++++++++
 sources                       |    1 +
 6 files changed, 282 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2cfab8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/PHP_Reflect-1.0.2.tgz
diff --git a/PHP_Reflect-addhtml.patch b/PHP_Reflect-addhtml.patch
new file mode 100644
index 0000000..ae9a230
--- /dev/null
+++ b/PHP_Reflect-addhtml.patch
@@ -0,0 +1,19 @@
+diff -up PHP_Reflect-1.0.2/php-bartlett-PHP-Reflect.xml.inst2 PHP_Reflect-1.0.2/php-bartlett-PHP-Reflect.xml
+--- PHP_Reflect-1.0.2/php-bartlett-PHP-Reflect.xml.inst2	2011-09-19 18:13:52.630592571 +0200
++++ PHP_Reflect-1.0.2/php-bartlett-PHP-Reflect.xml	2011-09-19 18:13:57.232589618 +0200
+@@ -238,6 +238,15 @@ Bug fixes:
+    <file baseinstalldir="Bartlett" md5sum="13e7cd0079e1cdf3283ba099e0f87f9f" name="LICENSE" role="doc">
+     <tasks:replace from="@package_version@" to="version" type="package-info" />
+    </file>
++   <file baseinstalldir="Bartlett" name="docs/userguide.html" role="doc" />
++   <file baseinstalldir="Bartlett" name="docs/index.html" role="doc" />
++   <file baseinstalldir="Bartlett" name="docs/CHANGELOG.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/sources/scanFile.html" role="doc" />
++   <file baseinstalldir="Bartlett" name="docs/sources/Token.html" role="doc" />
++   <file baseinstalldir="Bartlett" name="docs/sources/Autoload.html" role="doc" />
++   <file baseinstalldir="Bartlett" name="docs/sources/Reflect.html" role="doc" />
+   </dir>
+  </contents>
+  <dependencies>
diff --git a/PHP_Reflect-deljs.patch b/PHP_Reflect-deljs.patch
new file mode 100644
index 0000000..fb6c8fc
--- /dev/null
+++ b/PHP_Reflect-deljs.patch
@@ -0,0 +1,16 @@
+diff -up PHP_Reflect-1.0.2/php-bartlett-PHP-Reflect.xml.inst PHP_Reflect-1.0.2/php-bartlett-PHP-Reflect.xml
+--- PHP_Reflect-1.0.2/php-bartlett-PHP-Reflect.xml.inst	2011-07-18 14:15:10.000000000 +0200
++++ PHP_Reflect-1.0.2/php-bartlett-PHP-Reflect.xml	2011-09-19 18:12:38.902716749 +0200
+@@ -112,12 +112,6 @@ Bug fixes:
+    <file baseinstalldir="Bartlett" md5sum="ed9a0ac6cf02533827408905c5de33e3" name="docs/images/logo.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="a8862b67ca976f8e124cac54fb43ab07" name="docs/sources/Autoload.txt" role="doc">
+     <tasks:replace from="@package_version@" to="version" type="package-info" />
+    </file>
diff --git a/PHP_Reflect-docs.patch b/PHP_Reflect-docs.patch
new file mode 100644
index 0000000..79b99c4
--- /dev/null
+++ b/PHP_Reflect-docs.patch
@@ -0,0 +1,71 @@
+--- docs/index.txt.orig	2011-07-18 17:56:01.598097428 +0200
++++ docs/index.txt	2011-07-18 17:55:43.602953982 +0200
+@@ -94,17 +94,15 @@
+ The PHP_Reflect 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,PDF file
+-English,link:{binary_dir}userguide.zip[userguide.zip] (6Kb), link:{binary_dir}userguide.chunked.zip[userguide.chunked.zip] (42Kb) , link:{binary_dir}userguide.chm.zip[userguide.chm.zip] (39Kb), link:{binary_dir}userguide.pdf[pdf] (70Kb)
++| Language | Single HTML file | Many HTML files | HTML Help file | PDF file
++| English | link:{binary_dir}userguide.zip[userguide.zip] 6 Kb | link:{binary_dir}userguide.chunked.zip[userguide.chunked.zip] 42 Kb | link:{binary_dir}userguide.chm[userguide.chm.zip] 46 Kb | link:{binary_dir}userguide.pdf[userguide.pdf] 70 Kb
+ |===========================
+ 
+ 
+-[appendix]
+-Classes Source Code
+--------------------
++== Appendix A: Classes Source Code
++
+ Below you can find highlighted PHP source code
+ (with http://pygments.org/[Pygments])
+ of PHP_Reflect classes version {revnumber}
+@@ -113,27 +111,22 @@
+ * link:sources/Autoload.html[Autoload]
+ * link:sources/Token.html[Tokens]
+ 
+-[appendix]
+-Examples
+---------
++== Appendix B: Examples
++
+ .Scan a simple file
+ * link:sources/scanFile.html[Basic usage with default options]
+ 
+-[appendix]
+-Changelog
+----------
++== Appendix C: Changelog
+ link:CHANGELOG.html[History of changes]
+ 
+-[appendix]
+-License
+--------
++== Appendix D: 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 E: Credits
++
+ 
+ [quote, , https://github.com/sebastianbergmann/]
+ ____
+@@ -144,9 +137,8 @@
+ ____
+ 
+ 
+-[appendix]
+-Links
+------
++== Appendix F: 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-Reflect.spec b/php-bartlett-PHP-Reflect.spec
new file mode 100644
index 0000000..44a49e4
--- /dev/null
+++ b/php-bartlett-PHP-Reflect.spec
@@ -0,0 +1,174 @@
+%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+%global channel   bartlett.laurent-laville.org
+%global pear_name PHP_Reflect
+
+%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
+%global withhtmldoc 1
+%else
+%global withhtmldoc 0
+%endif
+
+
+Name:           php-bartlett-PHP-Reflect
+Version:        1.0.2
+Release:        2%{?dist}
+Summary:        Adds the ability to reverse-engineer PHP
+
+Group:          Development/Libraries
+License:        BSD
+URL:            http://bartlett.laurent-laville.org/
+Source0:        http://%{channel}/get/%{pear_name}-%{version}%{?prever}.tgz
+
+# for old asciidoc version https://bugzilla.redhat.com/556171
+Patch0:         PHP_Reflect-docs.patch
+# Don't install .js (unused)
+Patch1:         PHP_Reflect-deljs.patch
+# Install generated doc using pear command
+Patch2:         PHP_Reflect-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
+%if %{withhtmldoc}
+# to build HTML documentation
+BuildRequires:  php-pear(pear.phing.info/phing)
+BuildRequires:  asciidoc >= 8.4.0
+%endif
+
+Requires:       php-pear(PEAR) >= 1.9.0
+Requires(post): %{__pear}
+Requires(postun): %{__pear}
+Requires:       php-channel(%{channel})
+
+Provides:       php-pear(%{channel}/%{pear_name}) = %{version}%{?prever}
+
+
+%description
+PHP_Reflect adds the ability to reverse-engineer classes, interfaces,
+functions, constants and more, by connecting php callbacks to other tokens.
+
+%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 -p0 -b .fix
+%patch1 -p1 -b .deljs
+%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
+# Check that our patch for installed doc is ok
+cpt=$(find docs -name \*.html | wc -l)
+echo "File generated:$cpt, expected:9"
+[ $cpt -eq 9 ] || 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}
+
+
+
+%check
+cd %{pear_name}-%{version}%{?prever}
+
+# Version 1.0.2 : OK (25 tests, 42 assertions)
+%{_bindir}/phpunit \
+  -d date.timezone=UTC \
+  --bootstrap %{buildroot}%{pear_phpdir}/Bartlett/PHP/Reflect/Autoload.php \
+  tests
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%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}
+%{pear_xmldir}/%{name}.xml
+%{pear_phpdir}/Bartlett
+%{pear_testdir}/PHP_Reflect
+
+
+%changelog
+* Mon Sep 19 2011 Remi Collet <Fedora at FamilleCollet.com> - 1.0.2-2
+- remove unused .js and improve installation of generated doc
+- use buildroot macro
+
+* Mon Jul 18 2011 Remi Collet <Fedora at FamilleCollet.com> - 1.0.2-1
+- Version 1.0.2 (stable) - API 1.0.0 (stable)
+
+* Sat Jun 16 2011 Remi Collet <Fedora at FamilleCollet.com> - 1.0.1-1
+- Version 1.0.1 (stable) - API 1.0.0 (stable)
+
+* Sat Jun 02 2011 Remi Collet <Fedora at FamilleCollet.com> - 1.0.0-1
+- Version 1.0.0 (stable) - API 1.0.0 (stable)
+- add HTML documentation
+
+* Tue Apr 26 2011 Remi Collet <Fedora at FamilleCollet.com> - 1.0.0-0.1.RC1
+- Version 1.0.0RC1 (beta) - API 1.0.0 (beta)
+
+* Sat Apr 17 2011 Remi Collet <Fedora at FamilleCollet.com> - 0.7.0-1
+- Version 0.7.0 (beta) - API 0.7.0 (beta)
+
+* Mon Apr 11 2011 Remi Collet <Fedora at FamilleCollet.com> - 0.6.0-1
+- Version 0.6.0 (beta) - API 0.6.0 (beta)
+
+* Wed Apr 06 2011 Remi Collet <Fedora at FamilleCollet.com> - 0.5.1-1
+- Version 0.5.1 (beta) - API 0.5.0 (beta)
+
+* Fri Mar 25 2011 Remi Collet <Fedora at FamilleCollet.com> - 0.5.0-1
+- Version 0.5.0 (beta) - API 0.5.0 (beta)
+
+* Wed Feb 25 2011 Remi Collet <Fedora at FamilleCollet.com> - 0.4.0-1
+- Version 0.4.0 (beta)
+- Initial RPM package
+
diff --git a/sources b/sources
index e69de29..82e21e5 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+beb4912241aa4af4faf1b0cb9f574992  PHP_Reflect-1.0.2.tgz


More information about the scm-commits mailing list