]>
Commit | Line | Data |
---|---|---|
f8f8625a AG |
1 | %define _modname newt |
2 | %define _status alpha | |
3 | ||
4 | Summary: %{_modname} - Extension for RedHat Newt windowing library | |
5 | Summary(pl): %{_modname} - Rozszerzenie biblioteki Newt | |
6 | Name: php-pecl-%{_modname} | |
7 | Version: 0.2 | |
d12a3629 | 8 | Release: 1 |
f8f8625a AG |
9 | License: PHP 2.02 |
10 | Group: Development/Languages/PHP | |
11 | Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz | |
12 | # Source0-md5: 7a5816b24032188545a31d51b2527800 | |
13 | Patch0: %{name}-compile_fix.patch | |
d12a3629 | 14 | Patch1: %{name}-missing_ifdefs.patch |
f8f8625a AG |
15 | URL: http://pecl.php.net/package/newt/ |
16 | BuildRequires: libtool | |
17 | BuildRequires: php-devel >= 4.3.0 | |
18 | Requires: php-common >= 4.3.0 | |
19 | Obsoletes: php-pear-%{_modname} | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %define _sysconfdir /etc/php | |
23 | %define extensionsdir %{_libdir}/php | |
24 | ||
25 | %description | |
26 | PHP-NEWT - PHP language extension for RedHat Newt library, a | |
27 | terminal-based window and widget library for writing applications with | |
28 | user friendly interface. Once this extension is enabled in PHP it will | |
29 | provide the use of Newt widgets, such as windows, buttons, checkboxes, | |
30 | radiobuttons, labels, editboxes, scrolls, textareas, scales, etc. Use | |
31 | of this extension if very similar to the original Newt API fo C | |
32 | programming language. | |
33 | ||
34 | In PECL status of this extension is: %{_status}. | |
35 | ||
36 | #%description -l pl | |
37 | # | |
38 | #To rozszerzenie ma w PECL status: %{_status}. | |
39 | ||
40 | %prep | |
41 | %setup -q -c | |
42 | cd %{_modname}-%{version} | |
43 | %patch0 -p1 | |
d12a3629 | 44 | %patch1 -p1 |
f8f8625a AG |
45 | |
46 | %build | |
47 | cd %{_modname}-%{version} | |
48 | phpize | |
49 | %configure | |
50 | %{__make} | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | install -d $RPM_BUILD_ROOT%{extensionsdir} | |
55 | ||
56 | install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir} | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %post | |
62 | %{_sbindir}/php-module-install install %{_modname} %{_sysconfdir}/php-cgi.ini | |
63 | ||
64 | %preun | |
65 | if [ "$1" = "0" ]; then | |
66 | %{_sbindir}/php-module-install remove %{_modname} %{_sysconfdir}/php-cgi.ini | |
67 | fi | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %doc %{_modname}-%{version}/{CREDITS,TODO} | |
72 | %attr(755,root,root) %{extensionsdir}/%{_modname}.so |