]> git.pld-linux.org Git - packages/php-gtk2.git/blob - php-gtk2.spec
- use php(core) as dependency to require php version
[packages/php-gtk2.git] / php-gtk2.spec
1 # NOTE:
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
4 %define         modname gtk2
5 Summary:        PHP language bindings for GTK+ toolkit
6 Summary(pl.UTF-8):      Moduł PHP z wiązaniami do GTK+
7 Name:           php-gtk2
8 Version:        2.0.2
9 Release:        6
10 License:        GPL
11 Group:          Libraries
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
26 Provides:       php(gtk2)
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
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.
35
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.
39
40 This version (php-gtk2) was rewriten almost from scratch and is based
41 on PHP 5.1 and GTK+ 2.6.
42
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.
49
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.
53
54 Ta wersja (php-gtk2) została przepisana prawie od zera, obecnie jest
55 oparta na PHP 5.1 i GTK+ 2.6.
56
57 %prep
58 %setup -q -n php-gtk-%{version}
59
60 %build
61 ./buildconf \
62         --with-phpize=%{_bindir}/phpize
63 %configure \
64         --with-php-config=%{_bindir}/php-config
65 %{__make} -j1
66
67 %install
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
71 # NOTE:
72 # - makes php unusable if loaded automatically and $DISPLAY not present:
73 # $ php -r
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
79 EOF
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %files
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
This page took 0.140366 seconds and 3 git commands to generate.