Blob Blame History Raw
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%define pear_name Structures_DataGrid_DataSource_RSS

Name:           php-pear-Structures-DataGrid-DataSource-RSS
Version:        0.1.1
Release:        3%{?dist}
Summary:        DataSource driver using RSS files

Group:          Development/Libraries
License:        BSD
URL:            http://pear.php.net/package/Structures_DataGrid_DataSource_RSS
Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  php-pear >= 1:1.4.9-1.2
Requires:       php-pear(PEAR)
Requires:       php-pear(XML_RSS) >= 0.9.2
Requires:       php-pear(Structures_DataGrid) >= 0.7.0
Requires:       php-pear(Structures_DataGrid_DataSource_Array) >= 0.1.0
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides:       php-pear(%{pear_name}) = %{version}

%description
This is a DataSource driver for Structures_DataGrid using RSS files.


%prep
%setup -q -c
[ -f package2.xml ] || mv package.xml package2.xml
mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
cd %{pear_name}-%{version}


%build
cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.


%install
cd %{pear_name}-%{version}
rm -rf $RPM_BUILD_ROOT docdir
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml

# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*

# Install XML package description
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}


%clean
rm -rf $RPM_BUILD_ROOT


%post
%{__pear} install --nodeps --soft --force --register-only \
    %{pear_xmldir}/%{pear_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,-)
%{pear_xmldir}/%{pear_name}.xml
%{pear_phpdir}/Structures/DataGrid/DataSource/*


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

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

* Sun Jan 14 2007 Christopher Stone <chris.stone@gmail.com> 0.1.1-1
- Upstream sync
- Relicense to BSD

* Sun Dec 03 2006 Christopher Stone <chris.stone@gmail.com> 0.1.0-3
- Retag for rebuild (forgot to commit license files to CVS)

* Sun Dec 03 2006 Christopher Stone <chris.stone@gmail.com> 0.1.0-2
- No longer own common directories
- Add versioned Requires
- Add LICENSE to %%doc

* Sun Oct 29 2006 Christopher Stone <chris.stone@gmail.com> 0.1.0-1
- Initial Release