]> git.pld-linux.org Git - projects/template-specs.git/blob - php-package.spec
pecl: add example how to make failed tests as XFAIL
[projects/template-specs.git] / php-package.spec
1 %define         pkgname PACKAGE_NAME
2 %define         php_min_version 5.0.0
3 %if %{with phpdeps}
4 # new php based depsolver will look into this macro, however it works in static
5 # manner too.
6 %include        /usr/lib/rpm/macros.php
7 %endif
8 Summary:        -
9 Name:           php-%{pkgname}
10 Version:        _
11 Release:        0.1
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
15 # Source0-md5:  -
16 URL:            -
17 %if %{with phpdeps}
18 BuildRequires:  /usr/bin/php
19 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
20 %endif
21 BuildRequires:  rpmbuild(macros) >= 1.654
22 Requires:       php(core) >= %{php_min_version}
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 # exclude PEAR deps
27 %define         _noautoreq_pear Excluded.php PEAR/Something.php
28
29 %define         _appdir                 %{php_data_dir}/%{pkgname}
30
31 # _phpdocdir / php_docdir / phpdoc_dir ?
32 %define         _phpdocdir              %{_docdir}/phpdoc
33
34 %description
35 ...
36
37 %package phpdoc
38 Summary:        Online manual for %{name}
39 Summary(pl.UTF-8):      Dokumentacja online do %{name}
40 Group:          Documentation
41 Requires:       php-dirs
42
43 %description phpdoc
44 Documentation for %{name}.
45
46 %description phpdoc -l pl.UTF-8
47 Dokumentacja do %{name}.
48
49 %prep
50 %setup -q
51 %setup -q -n %{pkgname}-%{version}
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT%{_appdir}
56 install -d $RPM_BUILD_ROOT%{php_data_dir}
57
58 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
59 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
60
61 install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
62 cp -a doc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %files
68 %defattr(644,root,root,755)
69
70 %{_examplesdir}/%{name}-%{version}
71
72 %files phpdoc
73 %defattr(644,root,root,755)
74 %{_phpdocdir}/%{pkgname}
This page took 0.071524 seconds and 3 git commands to generate.