]> git.pld-linux.org Git - projects/template-specs.git/blob - php-package.spec
sample to setup shadow py3 tree
[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.461
22 # for %%undos macro
23 BuildRequires:  rpmbuild(macros) >= 1.553
24 Requires:       php(core) >= %{php_min_version}
25 BuildArch:      noarch
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _appdir                 %{php_data_dir}/%{pkgname}
29
30 # _phpdocdir / php_docdir / phpdoc_dir ?
31 %define         _phpdocdir              %{_docdir}/phpdoc
32
33 # bad depsolver
34 %define         _noautopear     pear
35
36 # exclude optional php dependencies
37 %define         _noautophp      php-curl
38
39 # put it together for rpmbuild
40 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
41
42 %description
43 ...
44
45 %package phpdoc
46 Summary:        Online manual for %{name}
47 Summary(pl.UTF-8):      Dokumentacja online do %{name}
48 Group:          Documentation
49 Requires:       php-dirs
50
51 %description phpdoc
52 Documentation for %{name}.
53
54 %description phpdoc -l pl.UTF-8
55 Dokumentacja do %{name}.
56
57 %prep
58 %setup -q
59 %setup -q -n %{pkgname}-%{version}
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT%{_appdir}
64 install -d $RPM_BUILD_ROOT%{php_data_dir}
65
66 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
67 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
68
69 install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
70 cp -a doc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(644,root,root,755)
77
78 %{_examplesdir}/%{name}-%{version}
79
80 %files phpdoc
81 %defattr(644,root,root,755)
82 %{_phpdocdir}/%{pkgname}
This page took 0.051439 seconds and 3 git commands to generate.