2 %include /usr/lib/rpm/macros.php
4 # new php based depsolver will look into this macro, however it works in static
6 %define php_min_version 5.0.0
7 %define pkgname PACKAGE_NAME
12 License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
13 Group: Development/Languages/PHP
14 Source0: %{name}-%{version}.tar.gz
18 BuildRequires: /usr/bin/php
19 BuildRequires: rpm-php-pearprov >= 4.4.2-11
21 BuildRequires: rpmbuild(macros) >= 1.461
22 Requires: php-common >= 4:%{php_min_version}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _appdir %{php_data_dir}/%{pkgname}
28 # _phpdocdir / php_docdir / phpdoc_dir ?
29 %define _phpdocdir %{_docdir}/phpdoc
32 %define _noautopear pear(class.template.php) pear(/etc/webapps/template/config.php)
34 # exclude optional php dependencies
35 %define _noautophp php-bzip2 php-bcmath php-zip php-date php-ftp php-hash php-ldap php-mbstring php-mysql php-pgsql php-tokenizer
37 # put it together for rpmbuild
38 %define _noautoreq %{?_noautophp} %{?_noautopear}
44 Summary: Tests for ...
45 Summary(pl.UTF-8): Testy dla ...
46 Group: Development/Languages/PHP
47 Requires: %{name} = %{version}-%{release}
54 %description tests -l pl.UTF-8
58 Summary: Online manual for %{name}
59 Summary(pl.UTF-8): Dokumentacja online do %{name}
64 Documentation for %{name}.
66 %description phpdoc -l pl.UTF-8
67 Dokumentacja do %{name}.
71 %setup -q -n %{pkgname}-%{version}
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT%{_appdir}
77 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
78 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
80 install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
81 cp -a doc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
84 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
89 %{_examplesdir}/%{name}-%{version}
92 %defattr(644,root,root,755)
95 %defattr(644,root,root,755)