]>
Commit | Line | Data |
---|---|---|
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.3 | |
8 | Release: 0.1 | |
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: 3a58ec1bae3f0c515e0adec03fd7c156 | |
13 | Patch0: paths.patch | |
14 | URL: http://code.google.com/a/apache-extras.org/p/phpmailer/ | |
15 | #BuildRequires: php-pear-PhpDocumentor | |
16 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
17 | BuildRequires: rpmbuild(macros) >= 1.654 | |
18 | Requires: php(core) >= %{php_min_version} | |
19 | Requires: php(date) | |
20 | Requires: php(pcre) | |
21 | Suggests: php(mbstring) | |
22 | Suggests: php(openssl) | |
23 | Obsoletes: phpmailer | |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %define _appdir %{php_data_dir}/%{pkgname} | |
28 | %define _phpdocdir %{_docdir}/phpdoc | |
29 | ||
30 | # exclude optional php dependencies | |
31 | %define _noautophp php-openssl php-mbstring php-filter | |
32 | ||
33 | # bad depsolver | |
34 | %define _noautoreq_pear ntlm_sasl_client.php | |
35 | ||
36 | # put it together for rpmbuild | |
37 | %define _noautoreq %{?_noautophp} | |
38 | ||
39 | %description | |
40 | PHP email transport class featuring multiple file attachments, SMTP | |
41 | servers, CCs, BCCs, HTML messages, and word wrap, and more. It can | |
42 | send email via sendmail, PHP mail(), or with SMTP. Methods are based | |
43 | on the popular AspEmail active server component. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Klasa PHP do przesyłania e-mail obsługująca wiele załączników | |
47 | plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii | |
48 | itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo | |
49 | poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail. | |
50 | ||
51 | %package phpdoc | |
52 | Summary: Online manual for %{name} | |
53 | Summary(pl.UTF-8): Dokumentacja online do %{name} | |
54 | Group: Documentation | |
55 | Requires: php-dirs | |
56 | ||
57 | %description phpdoc | |
58 | Documentation for %{name}. | |
59 | ||
60 | %description phpdoc -l pl.UTF-8 | |
61 | Dokumentacja do %{name}. | |
62 | ||
63 | %prep | |
64 | %setup -q -n PHPMailer_%{version}%{?subver:-%{subver}} | |
65 | %patch0 -p1 | |
66 | ||
67 | %undos -f php,html,txt README LICENSE | |
68 | ||
69 | mv docs/phpdoc . | |
70 | ||
71 | %if 0 | |
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 | %endif | |
84 | ||
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | install -d $RPM_BUILD_ROOT%{_appdir}/language | |
88 | ||
89 | cp -p class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir} | |
90 | # plugins: for smtp and pop before smtp auth | |
91 | cp -p class.{smtp,pop3}.php $RPM_BUILD_ROOT%{_appdir} | |
92 | # language: translations of error messages | |
93 | cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language | |
94 | ||
95 | # extras: htmlfilter.php, ntlm_sasl_client.php | |
96 | cp -a extras $RPM_BUILD_ROOT%{_appdir} | |
97 | ||
98 | # examples | |
99 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
100 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
101 | ||
102 | # api doc | |
103 | install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname} | |
104 | cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname} | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
111 | %doc changelog.txt README docs/* | |
112 | %{php_data_dir}/class.phpmailer.php | |
113 | ||
114 | %dir %{_appdir} | |
115 | %{_appdir}/class.pop3.php | |
116 | %{_appdir}/class.smtp.php | |
117 | %dir %{_appdir}/language | |
118 | %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php | |
119 | %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php | |
120 | %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php | |
121 | %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php | |
122 | %lang(da) %{_appdir}/language/phpmailer.lang-dk.php | |
123 | %lang(de) %{_appdir}/language/phpmailer.lang-de.php | |
124 | %lang(es) %{_appdir}/language/phpmailer.lang-es.php | |
125 | %lang(et) %{_appdir}/language/phpmailer.lang-et.php | |
126 | %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php | |
127 | %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php | |
128 | %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php | |
129 | %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php | |
130 | %lang(it) %{_appdir}/language/phpmailer.lang-it.php | |
131 | %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php | |
132 | %lang(nb) %{_appdir}/language/phpmailer.lang-no.php | |
133 | %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php | |
134 | %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php | |
135 | %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php | |
136 | %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php | |
137 | %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php | |
138 | %lang(sk) %{_appdir}/language/phpmailer.lang-sk.php | |
139 | %lang(sv) %{_appdir}/language/phpmailer.lang-se.php | |
140 | %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php | |
141 | %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php | |
142 | %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php | |
143 | ||
144 | %dir %{_appdir}/extras | |
145 | %{_appdir}/extras/class.html2text.inc | |
146 | %{_appdir}/extras/htmlfilter.php | |
147 | %{_appdir}/extras/ntlm_sasl_client.php | |
148 | ||
149 | %{_examplesdir}/%{name}-%{version} | |
150 | ||
151 | %files phpdoc | |
152 | %defattr(644,root,root,755) | |
153 | %{_phpdocdir}/%{pkgname} |