Blob Blame History Raw
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%global pear_name Net_Traceroute

Name:           php-pear-Net-Traceroute
Version:        0.21.3
Release:        7%{?dist}
Summary:        Execute traceroute

Group:          Development/Libraries
License:        PHP
URL:            http://pear.php.net/package/Net_Traceroute
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 >= 1:1.4.9-1.2

Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides:       php-pear(%{pear_name}) = %{version}
Requires:       traceroute

%description
OS independent wrapper class for executing traceroute calls.


%prep
%setup -q -c
%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 10

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
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}


%clean
rm -rf $RPM_BUILD_ROOT


%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
%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/Net
%exclude %{pear_datadir}


%changelog
* Tue Feb 19 2013 Remi Collet <remi@fedoraproject.org> - 0.21.3-7
- fix metadata location

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Apr 18 2011 Remi Collet <Fedora@FamilleCollet.com> 0.21.3-3
- doc in /usr/share/doc/pear

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Oct 21 2010 Remi Collet <Fedora@FamilleCollet.com> 0.21.3-1
- Version 0.21.3 (alpha) - API 0.21.1 (alpha)
- set timezone during build

* Sat May 22 2010 Remi Collet <Fedora@FamilleCollet.com> 0.21.2-2
- spec cleanup

* Sat Nov 14 2009 Remi Collet <Fedora@FamilleCollet.com> 0.21.2-1
- new version (bugfix)
- rename Net_Traceroute.xml to php-pear-Net-Traceroute.xml

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Jun 14 2008 Remi Collet <Fedora@FamilleCollet.com> 0.21.1-3
- rebuild (fix Vendor, Bug #451372)
- fix license

* Wed May 16 2007 Remi Collet <Fedora@FamilleCollet.com> 0.21.1-2
- From review, change description
- add Requires: traceroute

* Sat May 12 2007 Remi Collet <Fedora@FamilleCollet.com> 0.21.1-1
- initial RPM (generated specfile + cleanup)
- add CHANGELOG and LICENSE