]> git.pld-linux.org Git - projects/template-specs.git/blob - php-package.spec
- pkgname unify
[projects/template-specs.git] / php-package.spec
1 %if %{with phpdeps}
2 %include        /usr/lib/rpm/macros.php
3 %endif
4 # new php based depsolver will look into this macro, however it works in static
5 # manner too.
6 %define         php_min_version 5.0.0
7 %define         pkgname PACKAGE_NAME
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.461
22 Requires:       php-common >= 4:%{php_min_version}
23 BuildArch:      noarch
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _appdir                 %{php_data_dir}/%{pkgname}
27
28 # _phpdocdir / php_docdir / phpdoc_dir ?
29 %define         _phpdocdir              %{_docdir}/phpdoc
30
31 # bad depsolver
32 %define         _noautopear     pear(class.template.php) pear(/etc/webapps/template/config.php)
33
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
36
37 # put it together for rpmbuild
38 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
39
40 %description
41 ...
42
43 %package tests
44 Summary:        Tests for ...
45 Summary(pl.UTF-8):      Testy dla ...
46 Group:          Development/Languages/PHP
47 Requires:       %{name} = %{version}-%{release}
48 AutoProv:       no
49 AutoReq:        no
50
51 %description tests
52 Tests for ...
53
54 %description tests -l pl.UTF-8
55 Testy dla ...
56
57 %package phpdoc
58 Summary:        Online manual for %{name}
59 Summary(pl.UTF-8):      Dokumentacja online do %{name}
60 Group:          Documentation
61 Requires:       php-dirs
62
63 %description phpdoc
64 Documentation for %{name}.
65
66 %description phpdoc -l pl.UTF-8
67 Dokumentacja do %{name}.
68
69 %prep
70 %setup -q
71 %setup -q -n %{pkgname}-%{version}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT%{_appdir}
76
77 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
78 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
79
80 install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
81 cp -a doc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(644,root,root,755)
88
89 %{_examplesdir}/%{name}-%{version}
90
91 %files tests
92 %defattr(644,root,root,755)
93
94 %files phpdoc
95 %defattr(644,root,root,755)
96 %{_phpdocdir}/%{name}
This page took 0.040699 seconds and 4 git commands to generate.