%define version 4.3.10 %define rversion 0.3 %define realname Newt %define modname newt %define dirname %{modname} %define soname %{modname}.so %define inifile A30_%{modname}.ini Summary: %{realname} provides window library functions for PHP4 Name: php-%{modname} Version: %{version}_%{rversion} Release: %mkrel 4 Group: System/Servers License: PHP License URL: http://php-newt.sourceforge.net/ Source0: newt-%{rversion}.tar.bz2 Patch0: newt-0.3-lib64.diff.bz2 Requires: php432 Requires: php-cli BuildRequires: php432-devel BuildRequires: newt-devel BuildRoot: %{_tmppath}/%{name}-root %description PHP-NEWT - PHP language extension for RedHat Newt library, a terminal-based window and widget library for writing applications with user friendly interface. Once this extension is enabled in PHP it will provide the use of Newt widgets, such as windows, buttons, checkboxes, radiobuttons, labels, editboxes, scrolls, textareas, scales, etc. Use of this extension if very similar to the original Newt API of C programming language. %prep %setup -q -n newt-%{rversion} %patch0 -p0 %build phpize %configure2_5x \ --with-%{modname}=shared,%{_prefix} %make mv modules/*.so . %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_sysconfdir}/php.d install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/ cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} EOF %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} [ "../package.xml" != "/" ] && rm -f ../package.xml %files %defattr(-,root,root) %doc examples CREDITS TODO %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Mon Mar 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.3-4mdk - use the %%mkrel macro * Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.3-3mdk - rebuilt against a non hardened-php aware php lib * Sat Jan 15 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.3-2mdk - rebuild due to hardened-php-0.2.6 - cleanups * Sat Jan 08 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 4.3.10_0.3-1mdk - initial mandrake package - added P0