]> git.pld-linux.org Git - packages/php-phpmailer.git/blob - php-phpmailer.spec
- build phpdoc, bundled one is incomplete and too old
[packages/php-phpmailer.git] / php-phpmailer.spec
1 %define         pkgname phpmailer
2 %define         php_min_version 5.2.0
3 %include        /usr/lib/rpm/macros.php
4 Summary:        Full featured email transfer class for PHP
5 Summary(pl.UTF-8):      W pełni funkcjonalna klasa PHP do przesyłania e-maili
6 Name:           php-%{pkgname}
7 Version:        5.2.1
8 Release:        2
9 License:        LGPL v2.1
10 Group:          Development/Languages/PHP
11 Source0:        http://phpmailer.apache-extras.org.codespot.com/files/PHPMailer_%{version}.tgz
12 # Source0-md5:  2ef9a089aa9aae9899b4ab785ef873c3
13 Patch0:         paths.patch
14 Patch1:         phpmailer-update-et.patch
15 Patch2:         tests.patch
16 URL:            http://code.google.com/a/apache-extras.org/p/phpmailer/
17 BuildRequires:  php-pear-PhpDocumentor
18 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
19 BuildRequires:  rpmbuild(macros) >= 1.553
20 Requires:       php-common >= 4:%{php_min_version}
21 Requires:       php-date
22 Requires:       php-pcre
23 Suggests:       php-mbstring
24 Suggests:       php-openssl
25 Obsoletes:      phpmailer
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _appdir         %{php_data_dir}/%{pkgname}
30 %define         _phpdocdir      %{_docdir}/phpdoc
31
32 # exclude optional php dependencies
33 %define         _noautophp      php-openssl php-mbstring php-filter
34
35 # put it together for rpmbuild
36 %define         _noautoreq      %{?_noautophp} %{?_noautopear}
37
38 %description
39 PHP email transport class featuring multiple file attachments, SMTP
40 servers, CCs, BCCs, HTML messages, and word wrap, and more. It can
41 send email via sendmail, PHP mail(), or with SMTP. Methods are based
42 on the popular AspEmail active server component.
43
44 %description -l pl.UTF-8
45 Klasa PHP do przesyłania e-mail obsługująca wiele załączników
46 plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii
47 itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo
48 poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail.
49
50 %package phpdoc
51 Summary:        Online manual for %{name}
52 Summary(pl.UTF-8):      Dokumentacja online do %{name}
53 Group:          Documentation
54 Requires:       php-dirs
55
56 %description phpdoc
57 Documentation for %{name}.
58
59 %description phpdoc -l pl.UTF-8
60 Dokumentacja do %{name}.
61
62 %prep
63 %setup -q -n PHPMailer_%{version}
64 %patch0 -p1
65 %patch1 -p1
66 %patch2 -p1
67
68 %undos -f php,html,txt README LICENSE
69
70 mv docs/5.0-phpdocs phpdoc.orig
71
72 %build
73 phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer -f 'class.*.php'
74 # nuke smarty cache
75 rm -rf phpdoc/????????????????????????????????
76 rm -rf phpdoc/*/????????????????????????????????
77
78 # copy images, phpdoc is likely buggy not doing itself
79 sdir=%{php_pear_dir}/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/earthli/templates/media/images
80 install -d phpdoc/media/images
81 cp -a $sdir/Constant.png phpdoc/media/images
82 cp -a $sdir/Variable.png phpdoc/media/images
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT%{_appdir}/language
87
88 cp -p class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir}
89 # plugins: for smtp and pop before smtp auth
90 cp -p class.{smtp,pop3}.php  $RPM_BUILD_ROOT%{_appdir}
91 # language: translations of error messages
92 cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language
93
94 # extras: htmlfilter.php
95 cp -a extras $RPM_BUILD_ROOT%{_appdir}
96
97 # examples
98 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
99 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
100
101 # api doc
102 install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
103 cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %files
109 %defattr(644,root,root,755)
110 %doc changelog.txt README docs/*
111 %{php_data_dir}/class.phpmailer.php
112
113 %dir %{_appdir}
114 %{_appdir}/class.pop3.php
115 %{_appdir}/class.smtp.php
116 %dir %{_appdir}/language
117 %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php
118 %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php
119 %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php
120 %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php
121 %lang(da) %{_appdir}/language/phpmailer.lang-dk.php
122 %lang(de) %{_appdir}/language/phpmailer.lang-de.php
123 %lang(es) %{_appdir}/language/phpmailer.lang-es.php
124 %lang(et) %{_appdir}/language/phpmailer.lang-et.php
125 %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php
126 %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php
127 %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php
128 %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php
129 %lang(it) %{_appdir}/language/phpmailer.lang-it.php
130 %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php
131 %lang(nb) %{_appdir}/language/phpmailer.lang-no.php
132 %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php
133 %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php
134 %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php
135 %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php
136 %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php
137 %lang(sv) %{_appdir}/language/phpmailer.lang-se.php
138 %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php
139 %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php
140 %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php
141
142 %dir %{_appdir}/extras
143 %{_appdir}/extras/htmlfilter.php
144
145 %{_examplesdir}/%{name}-%{version}
146
147 %files phpdoc
148 %defattr(644,root,root,755)
149 %{_phpdocdir}/%{pkgname}
This page took 0.034711 seconds and 3 git commands to generate.