%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}} %define php_apiver %((echo %{default_apiver}; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) Summary: PHP language bindings for GTK+ Name: php-gtk Version: 2.0.1 Release: 1%{?dist} License: PHP Group: Development/Languages URL: http://gtk.php.net/ Source: http://gtk.php.net/distributions/%{name}-%{version}.tar.gz # See http://cvs.php.net/viewvc.cgi/php-gtk/main/php_gtk.c?r1=1.60&r2=1.61 Patch0: %{name}-php53.patch # To build with gtkhtml 3.18 Patch1: %{name}-html318.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: php-devel >= 5.1.0 BuildRequires: gtk2-devel >= 2.6.0 BuildRequires: atk-devel >= 1.9.0 BuildRequires: pango-devel >= 1.8.0 BuildRequires: gtk+extra-devel >= 2.1.1 BuildRequires: gtkhtml3-devel >= 3.10.0 BuildRequires: libglade2-devel >= 2.4.0 BuildRequires: libsexy >= 0.1.10 BuildRequires: gtksourceview2-devel BuildRequires: gtkspell-devel >= 2.0.0 BuildRequires: libsexy-devel >= 0.1.10 BuildRequires: xulrunner-devel-unstable %if %{?php_zend_api}0 Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} %else Requires: php-api = %{php_apiver} %endif %description PHP-GTK is an extension for the PHP programming language that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client-side cross-platform GUI applications. %prep %setup -q %patch0 -p0 -b .php53 %patch1 -p0 -b .html318 # Simple wrapper tee php-gtk < %{buildroot}%{_sysconfdir}/php.d/%{name}.ini << 'EOF' #; Enable %{name} extension module #extension = php_gtk2.so #EOF %{__mkdir_p} %{buildroot}%{_bindir} %{__install} -m 755 php-gtk %{buildroot}%{_bindir} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS NEWS README README.KNOWN-ISSUES TODO2 # must work on this #%config(noreplace) %{_sysconfdir}/php.d/%{name}.ini %{_bindir}/php-gtk %{php_extdir}/php_gtk2.so %changelog * Sat Aug 16 2008 Remi Collet 2.0.1-1 - update to 2.0.1 * Sun Apr 20 2008 Remi Collet 2.0.0-1 - Initial RPM