%define name php5-newt %define version 5.0.3 %define rversion 0.3 %define modname newt %define dirname %{modname} %define soname %{modname}.so %define inifile A30_%{modname}.ini Summary: Newt provides window library functions for PHP Name: %{name} Version: %{version}_%{rversion} Release: %mkrel 2 Group: System/Servers License: PHP License URL: http://php-newt.sourceforge.net/ Source0: newt-%{rversion}.tar.bz2 Patch0: newt-0.3-lib64.diff.bz2 BuildRequires: newt-devel BuildRequires: php5-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 php5ize %configure2_5x \ --with-%{modname}=shared,%{_prefix} %make mv modules/*.so . %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/php5/extensions install -d %{buildroot}%{_sysconfdir}/php5.d install -m755 %{soname} %{buildroot}%{_libdir}/php5/extensions/ cat > %{buildroot}%{_sysconfdir}/php5.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}/php5.d/%{inifile} %attr(0755,root,root) %{_libdir}/php5/extensions/%{soname} %changelog * Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.3-2mdk - use the %%mkrel macro * Sat Feb 12 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3_0.3-1mdk - initial Mandrakelinux package * 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