2 # - fails to build on Ac: http://bugs.php.net/bug.php?id=41720
3 # - make NOT fail if $DISPLAY not present, or we can't autoload package
5 Summary: PHP language bindings for GTK+ toolkit
6 Summary(pl.UTF-8): Moduł PHP z wiązaniami do GTK+
12 #Source0: http://gtk.php.net/distributions/php-gtk-%{version}.tar.gz
13 # 2.0.2 tagged, but no tarball
14 # svn co http://svn.php.net/repository/gtk/php-gtk/tags/php_gtk_2_0_2 php-gtk-2.0.2
15 # tar --exclude-vcs -czf php-gtk-2.0.2.tar.gz php-gtk-2.0.2
16 Source0: php-gtk-%{version}.tar.gz
17 # Source0-md5: 63a132426b1f007efc82876906a4e006
18 URL: http://gtk.php.net/
19 BuildRequires: gtk+2-devel
20 BuildRequires: php-devel >= 4:5.1
21 BuildRequires: php-pecl-cairo-devel
22 BuildRequires: php-program
23 BuildRequires: rpmbuild(macros) >= 1.344
24 %{?requires_php_extension}
25 Requires: php(core) >= 5.0.4
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 PHP-GTK is a PHP extension that enables you to write client-side
31 cross-platform GUI applications. This is the first such extension of
32 this kind and one of the goals behind it was to prove that PHP is a
33 capable general-purpose scripting language that is suited for more
34 than just Web applications.
36 This extension will _not_ allow you to display GTK+ programs in a Web
37 browser, and cannot be used in the Web environment. It is intended for
38 creating standalone GUI applications.
40 This version (php-gtk2) was rewriten almost from scratch and is based
41 on PHP 5.1 and GTK+ 2.6.
43 %description -l pl.UTF-8
44 PHP-GTK jest rozszerzeniem PHP które pozwala pisać klienckie przenośne
45 aplikacje typu GUI. To jest pierwsze rozszerzenie tego typu i jednym z
46 celów które przyświecały jego autorom było pokazanie że PHP jest
47 językiem skryptowym ogólnego zastosowania, który pasuje do czegoś
48 więcej niż tylko aplikacje WWW.
50 To rozszerzenie _nie_pozwala_ na używanie programów korzystających z
51 GTK+ przez przeglądarkę i nie może być używane w środowisku WWW. Jest
52 przeznaczone do tworzenia samodzielnych aplikacji GUI.
54 Ta wersja (php-gtk2) została przepisana prawie od zera, obecnie jest
55 oparta na PHP 5.1 i GTK+ 2.6.
58 %setup -q -n php-gtk-%{version}
62 --with-phpize=%{_bindir}/phpize
64 --with-php-config=%{_bindir}/php-config
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
70 install -p modules/php_gtk2.so $RPM_BUILD_ROOT%{php_extensiondir}/%{modname}.so
72 # - makes php unusable if loaded automatically and $DISPLAY not present:
74 # PHP Fatal error: php-gtk: Could not open display in Unknown on line 0
75 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
76 ; Enable %{modname} extension module
77 ; DO NOT load automatically, as it requires DISPLAY being present
78 ;extension=%{modname}.so
82 rm -rf $RPM_BUILD_ROOT
85 %defattr(644,root,root,755)
86 %doc ChangeLog AUTHORS TODO2 NEWS
87 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
88 %attr(755,root,root) %{php_extensiondir}/%{modname}.so