#
# This file exists just for a reference when updating existing packages
#
-%include /usr/lib/rpm/macros.php
-%define _class class
-%define _subclass subclass
-%define _status stable
-%define _pearname %{_class}_%{_subclass}
-Summary: %{_pearname} -
-Summary(pl.UTF-8): %{_pearname} -
-Name: php-pear-%{_pearname}
+%define status stable
+%define pearname class_subclass
+Summary: %{pearname} -
+Summary(pl.UTF-8): %{pearname} -
+Name: php-pear-%{pearname}
Version: 0.2.0
Release: 1
License: PHP 2.02
Group: Development/Languages/PHP
-Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz
+Source0: http://pear.php.net/get/%{pearname}-%{version}.tgz
URL: http://pear.php.net/package/Class_Subclass/
BuildRequires: php-packagexml2cl
BuildRequires: php-pear-PEAR
BuildRequires: rpm-php-pearprov >= 4.4.2-11
-BuildRequires: rpmbuild(macros) >= 1.593
+BuildRequires: rpmbuild(macros) >= 1.745
Requires: php-pear
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# exclude optional dependencies
-%define _noautoreq pear(XML/Beautifier/.*)
+%define _noautoreq_pear XML/Beautifier
# included in tests
-%define _noautoreq pear(HTML_TestListener.php) pear(TestUnit.php)
+%define _noautoreq_pear HTML_TestListener.php TestUnit.php
%description
...
-In PEAR status of this package is: %{_status}.
+In PEAR status of this package is: %{status}.
%description -l pl.UTF-8
...
-Ta klasa ma w PEAR status: %{_status}.
-
-%package tests
-Summary: Tests for PEAR::%{_pearname}
-Summary(pl.UTF-8): Testy dla PEAR::%{_pearname}
-Group: Development/Languages/PHP
-Requires: %{name} = %{version}-%{release}
-AutoProv: no
-AutoReq: no
-
-%description tests
-Tests for PEAR::%{_pearname}.
-
-%description tests -l pl.UTF-8
-Testy dla PEAR::%{_pearname}.
+Ta klasa ma w PEAR status: %{status}.
%prep
%pear_package_setup
## docs fixups
# pear/docs -> docs
-install -d docs/%{_pearname}
-mv ./%{php_pear_dir}/%{_class}/doc/* docs/%{_pearname}
+install -d docs/%{pearname}
+mv ./%{php_pear_dir}/%{_class}/doc/* docs/%{pearname}
# pear/docs -> docs
-install -d docs/%{_pearname}
-mv ./%{php_pear_dir}/docs/%{_pearname}/* docs/%{_pearname}
+install -d docs/%{pearname}
+mv ./%{php_pear_dir}/docs/%{pearname}/* docs/%{pearname}
# pear/data/docs -> docs
-install -d docs/%{_pearname}
-mv ./%{php_pear_dir}/data/%{_pearname}/docs/* docs/%{_pearname}
-
-# tests fixups
-# class/test -> tests
-install -d ./%{php_pear_dir}/tests/%{_pearname}
-mv ./%{php_pear_dir}/{%{_class}/test/*,tests/%{_pearname}}
-
-# pear/tests/pearname/tests -> pear/tests/pearname
-mv ./%{php_pear_dir}/tests/%{_pearname}/{tests/*,}
-rmdir ./%{php_pear_dir}/tests/%{_pearname}/tests
-
-# docs/tests -> tests
-install -d ./%{php_pear_dir}/tests/%{_pearname}
-mv docs/%{_pearname}/tests/* ./%{php_pear_dir}/tests/%{_pearname}
-
-# tests -> tests/%{_pearname}
-install -d ./%{php_pear_dir}/tests/%{_pearname}
-mv ./%{php_pear_dir}/tests/{*,%{_pearname}}
+install -d docs/%{pearname}
+mv ./%{php_pear_dir}/data/%{pearname}/docs/* docs/%{pearname}
# examples fixups
mv ./%{php_pear_dir}/examples .
mv ./%{php_pear_dir}/%{_class}/examples .
-mv docs/%{_pearname}/examples .
-mv docs/%{_pearname}/docs/examples .
+mv docs/%{pearname}/examples .
+mv docs/%{pearname}/docs/examples .
%build
packagexml2cl package.xml > ChangeLog
%files
%defattr(644,root,root,755)
%doc ChangeLog install.log optional-packages.txt
-%doc docs/%{_pearname}/docs/*
+%doc docs/%{pearname}/docs/*
%attr(755,root,root) %{_bindir}/*
%{php_pear_dir}/.registry/*.reg
%{php_pear_dir}/.registry/.channel.*/*.reg
-%{php_pear_dir}/%{_class}/*.php
+%{php_pear_dir}/Class/*.php
-%{php_pear_dir}/data/%{_pearname}
+%{php_pear_dir}/data/%{pearname}
%{_examplesdir}/%{name}-%{version}
-
-%files tests
-%defattr(644,root,root,755)
-%{php_pear_dir}/tests/%{_pearname}