File php-pear-Image-GraphViz.spec of Package php-pear-Image-GraphViz
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%global pear_name Image_GraphViz
Name: php-pear-Image-GraphViz
Version: 1.3.0
Release: 7%{?dist}
Summary: Interface to AT&T's GraphViz tools
Group: Development/Libraries
License: PHP
URL: http://pear.php.net/package/Image_GraphViz
Source0: http://pear.php.net/get/%{pear_name}-%{version}.tgz
Source2: xml2changelog
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear(PEAR) >= 1.6.2
Requires: php-pear(PEAR) graphviz
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides: php-pear(%{pear_name}) = %{version}
%description
The GraphViz class allows for the creation of and the work with directed and
undirected graphs and their visualization with AT&T's GraphViz tools.
%prep
%setup -qc
%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 5
cd %{pear_name}-%{version}
# package.xml is V2
mv ../package.xml %{name}.xml
%build
cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.
%install
rm -rf $RPM_BUILD_ROOT
cd %{pear_name}-%{version}
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
# Install XML package description
install -d $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
%clean
rm -rf $RPM_BUILD_ROOT
%check
cd %{pear_name}-%{version}
%{__pear} \
run-tests \
-i "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \
tests | tee ../testslog
grep -q "18 PASSED TESTS" ../testslog
%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 \
%{pear_name} >/dev/null ||:
fi
%files
%defattr(-,root,root,-)
%doc CHANGELOG
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/Image
%{pear_testdir}/%{pear_name}
%changelog
* Tue Feb 19 2013 Remi Collet <remi@fedoraproject.org> - 1.3.0-7
- fix metadata location
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Aug 14 2012 Remi Collet <remi@fedoraproject.org> - 1.3.0-5
- rebuilt for new pear_testdir
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Oct 24 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.3.0-1
- Version 1.3.0 (stable) - API 1.3.0 (stable)
- add generated Changelog in %%doc
- define timezone during build
- run tests in %%check
* Sun Aug 15 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.2.1-7
- clean spec
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Oct 23 2008 Christopher Stone <chris.stone@gmail.com> 1.2.1-4
- Update LICENSE to 3.01
* Thu Aug 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.2.1-3
- fix license tag
* Sun Jan 14 2007 Christopher Stone <chris.stone@gmail.com> 1.2.1-2
- Use correct version of PHP License
* Mon Jun 26 2006 Christopher Stone <chris.stone@gmail.com> 1.2.1-1
- Initial Release