LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File php5-uploadprogress.spec of Package php5-uploadprogress (Project server:php:extensions)

#
# spec file for package php5-uploadprogress
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define pkg_name uploadprogress
Name:           php5-uploadprogress
Version:        1.0.3.1
Release:        0
Summary:        An extension to track progress of a file upload
License:        PHP-3.01
Group:          Productivity/Networking/Web/Servers
Url:            http://pecl.php.net/uploadprogress
Source:         https://pecl.php.net/get/%{pkg_name}-%{version}.tgz
Patch0:         uploadprogress-0.9.0-no-return-in-nonvoid-function.patch
#only php 5.2 has the needed api features.
BuildRequires:  php5-devel >= 5.2.0
Provides:       php-uploadprogress = %{version}
Obsoletes:      php-uploadprogress < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %{?php_zend_api}0
Requires:       php(api) = %{php_core_api}
Requires:       php(zend-abi) = %{php_zend_api}
%else
%requires_eq    php5
%endif

%description
An extension to track progress of a file upload.

%prep
%setup -q -n %{pkg_name}-%{version}
%patch0
mkdir %{name}

%build
%{_bindir}/phpize
pushd %{name}
CFLAGS="%{optflags} -fno-strict-aliasing"
CXXFLAGS="%{optflags} -fno-strict-aliasing"
export CFLAGS
export CXXFLAGS
../configure
make %{?_smp_mflags}
popd

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags} -C %{name} INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/php5/conf.d
echo "; comment out next line to disable uploadprogress extension in php" > %{buildroot}%{_sysconfdir}/php5/conf.d/uploadprogress.ini
echo 'extension = uploadprogress.so' >> %{buildroot}%{_sysconfdir}/php5/conf.d/uploadprogress.ini


%files
%defattr(-,root,root,-)
%{_libdir}/php5/extensions/uploadprogress.so
%config(noreplace) %{_sysconfdir}/php5/conf.d/uploadprogress.ini

%changelog -n php5-uploadprogress
* Thu Dec 05 2006 - judas_iscariote@shorewall.net
- very first build