[php-pear-PhpDocumentor] update to 1.4.4, single package, move doc, add %check
Remi Collet
remi at fedoraproject.org
Fri Feb 24 05:59:19 UTC 2012
commit 9d00a3a63f7af1a49fb8eb669933613e54e494ba
Author: remi <fedora at famillecollet.com>
Date: Fri Feb 24 06:58:33 2012 +0100
update to 1.4.4, single package, move doc, add %check
.gitignore | 1 +
php-pear-PhpDocumentor.spec | 81 ++++++++++++++++++++----------------------
sources | 2 +-
3 files changed, 41 insertions(+), 43 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0082c94..fb01ebd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
PhpDocumentor-1.4.3.tgz
+/PhpDocumentor-1.4.4.tgz
diff --git a/php-pear-PhpDocumentor.spec b/php-pear-PhpDocumentor.spec
index 756e3ca..d83caca 100644
--- a/php-pear-PhpDocumentor.spec
+++ b/php-pear-PhpDocumentor.spec
@@ -3,8 +3,8 @@
Summary: The complete documentation solution for PHP
Name: php-pear-PhpDocumentor
-Version: 1.4.3
-Release: 4%{?dist}
+Version: 1.4.4
+Release: 1%{?dist}
License: LGPLv2+
Group: Development/Libraries
URL: http://www.phpdoc.org/
@@ -13,13 +13,22 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear >= 1:1.4.9
+# to run test suite
+BuildRequires: php-pear(pear.phpunit.de/PHPUnit) >= 3.6.0
+
Requires: php-pear(PEAR)
Requires: php-Smarty >= 2.6.0
-Requires: php-pear-XML-Beautifier >= 1.1
+Requires: php-pear(XML_Beautifier) >= 1.1
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides: php-pear(%{pear_name}) = %{version}
+Provides: phpdoc = %{version}
+Obsoletes: phpdoc < %{version}
+Provides: php-pear-PhpDocumentor-docs = %{version}
+Obsoletes: php-pear-PhpDocumentor-docs < %{version}
+
+
%description
phpDocumentor is the current standard auto-documentation tool for the
php language. phpDocumentor has support for linking between documentation,
@@ -34,24 +43,6 @@ pre-designed HTML versions, PDF format, Windows Helpfile CHM format, and
in Docbook XML.
-%package -n phpdoc
-Summary: Command-line utility for PhpDocumentor
-Group: Development/Tools
-Requires: %{name} = %{version}-%{release}
-
-%description -n phpdoc
-This package includes a utility to run PhpDocumentor from the command-line
-interface.
-
-
-%package docs
-Summary: Documentation for PhpDocumentor
-Group: Documentation
-Requires: %{name} = %{version}-%{release}
-
-%description docs
-This package includes the documentation for PhpDocumentor.
-
%prep
%setup -q -c
[ -f package2.xml ] || mv package.xml package2.xml
@@ -59,7 +50,10 @@ mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
cd %{pear_name}-%{version}
# don't install our own php-Smarty
-sed -i -e '/Smarty-2/d' %{pear_name}.xml
+# don't install scripts in bin, but in doc
+sed -e '/Smarty-2/d' \
+ -e '/name="scripts/s/role="php"/role="doc"/' \
+ -i %{pear_name}.xml
%build
@@ -69,9 +63,6 @@ sed -i -e '/Smarty-2/d' %{pear_name}.xml
cd %{pear_name}-%{version}
rm -rf $RPM_BUILD_ROOT
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
-# Move documentation
-mkdir -p docdir
-mv $RPM_BUILD_ROOT%{pear_docdir}/* docdir
# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
@@ -80,17 +71,26 @@ rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
-# make example script non executable
-chmod -x scripts/makedoc.sh
-
-# Remove scripts out of bindir
-rm -rf $RPM_BUILD_ROOT%{_bindir}/scripts
-
# Point to the system php-Smarty
sed -i -e "s|phpDocumentor/Smarty-2.6.0/libs|Smarty|" \
$RPM_BUILD_ROOT%{pear_phpdir}/%{pear_name}/phpDocumentor/Converter.inc
+%check
+cd %{pear_name}-%{version}/tests
+
+# quick hack for phpunit 3.6.0 compatibility
+for i in *php
+do
+ sed -i -e '/PHPUnit\/Framework.php/d' $i
+done
+
+# Version 1.4.4 : OK (125 tests, 244 assertions)
+%{_bindir}/phpunit \
+ -d date.timezone=UTC \
+ AllTests.php
+
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -108,24 +108,21 @@ fi
%files
%defattr(-,root,root,-)
-%doc %{pear_name}-%{version}/docdir/%{pear_name}/LICENSE
+%doc %{pear_docdir}/%{pear_name}
%{pear_phpdir}/%{pear_name}
%{pear_datadir}/%{pear_name}
%{pear_testdir}/%{pear_name}
%{pear_xmldir}/%{pear_name}.xml
-
-%files -n phpdoc
-%defattr(-,root,root,-)
-%doc %{pear_name}-%{version}/docdir/%{pear_name}/LICENSE
-%doc %{pear_name}-%{version}/scripts/makedoc.sh
-%{_bindir}/*
-
-%files docs
-%defattr(-,root,root,-)
-%doc %{pear_name}-%{version}/docdir/%{pear_name}/*
+%{_bindir}/phpdoc
%changelog
+* Fri Feb 24 2012 Remi Collet <RPMS at FamilleCollet.com> - 1.4.4-1
+- update to 1.4.4
+- merge in a single package
+- doc in /usr/share/doc/pear
+- run test suite during build
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index 39369fc..e9562f6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-180ea5bf2ab4f729d0cd09d99f7b2520 PhpDocumentor-1.4.3.tgz
+319243ed4e446323461f86f6fdc93149 PhpDocumentor-1.4.4.tgz
More information about the scm-commits
mailing list