LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

# norootforbuild
%define pkg_name uploadprogress

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

%description

 	An extension to track progress of a file upload.

Authors:
---------
	 	Christian Stocker <chregu@php.net> 

%prep
%setup -q -n %{pkg_name}-%{version}
%patch

%{__mkdir} %{name}

%build
/usr/bin/phpize
pushd %{name}

CFLAGS="%{optflags} -fno-strict-aliasing"
CXXFLAGS="%{optflags} -fno-strict-aliasing"
%if 0%{?suse_version} > 1000
CFLAGS="$CFLAGS -fstack-protector"
CXXFLAGS="$CXXFLAGS -fstack-protector"
%endif

export CFLAGS
export CXXFLAGS

../configure

%{__make} %{?jobs:-j%jobs}
popd

%install

%makeinstall -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


%clean
%{__rm} -rf %{buildroot}

%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