Remi Collet d92f63a
%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
xulchris cb46308
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
60daba1
%global pear_name HTTP_Upload
xulchris cb46308
xulchris cb46308
Name:           php-pear-HTTP-Upload
xulchris cb46308
Version:        0.9.1
59a3071
Release:        16%{?dist}
xulchris cb46308
Summary:        Secure managment of files submitted via HTML Forms
xulchris cb46308
xulchris cb46308
Group:          Development/Libraries
xulchris cb46308
License:        LGPLv2+
xulchris cb46308
URL:            http://pear.php.net/package/HTTP_Upload
xulchris cb46308
Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
xulchris 3e59994
Patch0:         %{pear_name}-0.9.1-sample.patch
xulchris cb46308
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
xulchris cb46308
xulchris cb46308
BuildArch:      noarch
xulchris cb46308
BuildRequires:  php-pear >= 1:1.4.9-1.2
xulchris cb46308
Requires:       php-pear(PEAR)
xulchris cb46308
Requires(post): %{__pear}
xulchris cb46308
Requires(postun): %{__pear}
xulchris cb46308
Provides:       php-pear(%{pear_name}) = %{version}
xulchris cb46308
xulchris cb46308
%description
xulchris cb46308
This class provides an advanced file uploader system for file uploads made
xulchris cb46308
from html forms. Features:
xulchris cb46308
* Can handle from one file to multiple files.
xulchris cb46308
* Safe file copying from tmp dir.
xulchris cb46308
* Easy detecting mechanism of valid upload, missing upload or error.
xulchris cb46308
* Gives extensive information about the uploaded file.
xulchris cb46308
* Rename uploaded files in different ways: as it is, safe or unique
xulchris cb46308
* Validate allowed file extensions
xulchris cb46308
* Multiple languages error messages support (es, en, de, fr, it, nl, pt_BR)
xulchris cb46308
xulchris cb46308
xulchris cb46308
%prep
xulchris cb46308
%setup -qc
xulchris cb46308
cd %{pear_name}-%{version}
60daba1
# Package.xml is still V1 :(
Remi Collet d92f63a
%{__pear} convert ../package.xml %{name}.xml
xulchris cb46308
xulchris cb46308
xulchris cb46308
%build
xulchris cb46308
cd %{pear_name}-%{version}
xulchris cb46308
# Empty build section, most likely nothing required.
xulchris cb46308
xulchris cb46308
xulchris cb46308
%install
2402f00
rm -rf $RPM_BUILD_ROOT
xulchris cb46308
cd %{pear_name}-%{version}
Remi Collet d92f63a
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
xulchris cb46308
xulchris 3e59994
# Must be patched manually after install
2402f00
pushd $RPM_BUILD_ROOT/%{pear_docdir}/%{pear_name}
xulchris 3e59994
patch -p0 < %{PATCH0}
2402f00
# Fix EOL encoding
2402f00
sed -i 's/\r//' docs/upload_example.php
xulchris 3e59994
popd
xulchris 3e59994
xulchris cb46308
xulchris cb46308
# Clean up unnecessary files
Remi Collet d92f63a
rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
xulchris cb46308
xulchris cb46308
# Install XML package description
xulchris cb46308
install -d $RPM_BUILD_ROOT%{pear_xmldir}
60daba1
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
xulchris cb46308
xulchris cb46308
xulchris cb46308
%clean
xulchris cb46308
rm -rf $RPM_BUILD_ROOT
xulchris cb46308
xulchris cb46308
xulchris cb46308
%post
xulchris cb46308
%{__pear} install --nodeps --soft --force --register-only \
60daba1
    %{pear_xmldir}/%{name}.xml >/dev/null || :
xulchris cb46308
xulchris cb46308
%postun
xulchris cb46308
if [ $1 -eq 0 ] ; then
xulchris cb46308
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
xulchris cb46308
        %{pear_name} >/dev/null || :
xulchris cb46308
fi
xulchris cb46308
xulchris cb46308
xulchris cb46308
%files
xulchris cb46308
%defattr(-,root,root,-)
2402f00
%doc %{pear_docdir}/%{pear_name}
60daba1
%{pear_xmldir}/%{name}.xml
xulchris cb46308
%dir %{pear_phpdir}/HTTP
xulchris cb46308
%{pear_phpdir}/HTTP/Upload.php
xulchris cb46308
xulchris cb46308
xulchris cb46308
%changelog
59a3071
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-16
59a3071
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
59a3071
c6aeb66
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-15
c6aeb66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c6aeb66
6fc8bf2
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-14
6fc8bf2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6fc8bf2
9d3fa68
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-13
9d3fa68
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9d3fa68
5841cfb
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-12
5841cfb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5841cfb
Remi Collet d92f63a
* Tue Feb 19 2013 Remi Collet <remi@fedoraproject.org> - 0.9.1-11
Remi Collet d92f63a
- fix metadata location
Remi Collet d92f63a
fd15f21
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-10
fd15f21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
fd15f21
a55f392
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-9
a55f392
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a55f392
1fac544
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-8
1fac544
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1fac544
797a86b
* Sun Apr 17 2011 Remi Collet <Fedora@FamilleCollet.com> 0.9.1-7
2402f00
- doc in /usr/share/doc/pear
797a86b
03c86d5
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-6
03c86d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2402f00
60daba1
* Wed Aug 18 2010 Remi Collet <Fedora@FamilleCollet.com> - 0.9.1-5
60daba1
- rename HTTP_Upload.xml to php-pear-HTTP-Upload.xml
60daba1
- set date.timezone during build
60daba1
- clean define
60daba1
- convert old V1 package.xml
60daba1
3f20462
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-4
3f20462
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
3f20462
9a3ad0f
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-3
9a3ad0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9a3ad0f
xulchris 3e59994
* Thu Feb  7 2008 Christopher Stone <chris.stone@gmail.com> 0.9.1-2
xulchris 3e59994
- Patch sample (bz #397031)
xulchris 3e59994
xulchris cb46308
* Fri Nov 23 2007 Christopher Stone <chris.stone@gmail.com> 0.9.1-1
xulchris cb46308
- Initial Fedora release