]> git.pld-linux.org Git - packages/php-phpmailer.git/blob - php-phpmailer.spec
build doc of more files
[packages/php-phpmailer.git] / php-phpmailer.spec
1 %define         pkgname phpmailer
2 %define         php_min_version 5.2.4
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.7
8 Release:        2
9 License:        LGPL v2.1
10 Group:          Development/Languages/PHP
11 Source0:        https://github.com/PHPMailer/PHPMailer/archive/v%{version}/%{pkgname}-%{version}.tar.gz
12 # Source0-md5:  b07621694679cd625af3f53771502677
13 Patch0:         paths.patch
14 Patch1:         https://github.com/glensc/PHPMailer/commit/f302f1d497469d81b13797b6f2fb986b729928f3.patch
15 # Patch1-md5:   cfe92497baf90bcceb1ecc84c71b1f36
16 URL:            https://github.com/PHPMailer/PHPMailer
17 %{?with_tests:BuildRequires:    %{php_name}-cli}
18 BuildRequires:  php-pear-PhpDocumentor
19 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
20 BuildRequires:  rpmbuild(macros) >= 1.663
21 Requires:       php(core) >= %{php_min_version}
22 Requires:       php(date)
23 Requires:       php(pcre)
24 Suggests:       php(hash)
25 Suggests:       php(mbstring)
26 Suggests:       php(openssl)
27 Obsoletes:      phpmailer
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _appdir         %{php_data_dir}/%{pkgname}
32 %define         _phpdocdir      %{_docdir}/phpdoc
33
34 # exclude optional php dependencies
35 %define         _noautophp      php-openssl php-mbstring php-filter php-hash
36
37 # bad depsolver
38 %define         _noautoreq_pear extras/ntlm_sasl_client.php extras/class.html2text.php PHPMailerAutoload.php
39
40 # put it together for rpmbuild
41 %define         _noautoreq      %{?_noautophp}
42
43 %description
44 PHP email transport class featuring multiple file attachments, SMTP
45 servers, CCs, BCCs, HTML messages, and word wrap, and more. It can
46 send email via sendmail, PHP mail(), or with SMTP. Methods are based
47 on the popular AspEmail active server component.
48
49 %description -l pl.UTF-8
50 Klasa PHP do przesyłania e-mail obsługująca wiele załączników
51 plikowych, serwery SMTP, CC, BCC, wiadomości HTML, zawijanie linii
52 itp. Potrafi wysyłać pocztę przez sendmaila, funkcją PHP mail() albo
53 poprzez SMTP. Metody są oparte na popularnym komponencie AspEmail.
54
55 %package phpdoc
56 Summary:        Online manual for %{name}
57 Summary(pl.UTF-8):      Dokumentacja online do %{name}
58 Group:          Documentation
59 Requires:       php-dirs
60
61 %description phpdoc
62 Documentation for %{name}.
63
64 %description phpdoc -l pl.UTF-8
65 Dokumentacja do %{name}.
66
67 %prep
68 %setup -q -n PHPMailer-%{version}%{?subver:-%{subver}}
69 %patch0 -p1
70 %patch1 -p1
71
72 %build
73 # syntax lint
74 for a in $(find -name '*.php' -o -name '*.inc'); do
75         php -n -l $a
76 done
77
78 rm -rf phpdoc
79 phpdoc --title 'PHPMailer version %{version}' --target phpdoc --defaultpackagename PHPMailer \
80         --directory . --ignore test/,examples/,extras/,test_script/,language/,phpdoc/ --sourcecode
81
82 # copy images, phpdoc is likely buggy not doing itself
83 sdir=%{php_pear_dir}/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/earthli/templates/media/images
84 install -d phpdoc/media/images
85 cp -p $sdir/Constant.png phpdoc/media/images
86 cp -p $sdir/Variable.png phpdoc/media/images
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT%{_appdir}/language
91
92 cp -p class.phpmailer.php $RPM_BUILD_ROOT%{php_data_dir}
93 # plugins: for smtp and pop before smtp auth
94 cp -p class.{smtp,pop3}.php  $RPM_BUILD_ROOT%{_appdir}
95 # language: translations of error messages
96 cp -p language/*.php $RPM_BUILD_ROOT%{_appdir}/language
97
98 # extras: htmlfilter.php, ntlm_sasl_client.php
99 cp -a extras $RPM_BUILD_ROOT%{_appdir}
100
101 # examples
102 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
103 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
104
105 # api doc
106 install -d $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
107 cp -a phpdoc/* $RPM_BUILD_ROOT%{_phpdocdir}/%{pkgname}
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %files
113 %defattr(644,root,root,755)
114 %doc README.md changelog.md docs/*
115 %{php_data_dir}/class.phpmailer.php
116
117 %dir %{_appdir}
118 %{_appdir}/class.pop3.php
119 %{_appdir}/class.smtp.php
120 %dir %{_appdir}/language
121 %lang(ar) %{_appdir}/language/phpmailer.lang-ar.php
122 %lang(ca) %{_appdir}/language/phpmailer.lang-ca.php
123 %lang(ch) %{_appdir}/language/phpmailer.lang-ch.php
124 %lang(cs) %{_appdir}/language/phpmailer.lang-cz.php
125 %lang(da) %{_appdir}/language/phpmailer.lang-dk.php
126 %lang(de) %{_appdir}/language/phpmailer.lang-de.php
127 %lang(eo) %{_appdir}/language/phpmailer.lang-eo.php
128 %lang(es) %{_appdir}/language/phpmailer.lang-es.php
129 %lang(et) %{_appdir}/language/phpmailer.lang-et.php
130 %lang(fa) %{_appdir}/language/phpmailer.lang-fa.php
131 %lang(fi) %{_appdir}/language/phpmailer.lang-fi.php
132 %lang(fo) %{_appdir}/language/phpmailer.lang-fo.php
133 %lang(fr) %{_appdir}/language/phpmailer.lang-fr.php
134 %lang(he) %{_appdir}/language/phpmailer.lang-he.php
135 %lang(hu) %{_appdir}/language/phpmailer.lang-hu.php
136 %lang(it) %{_appdir}/language/phpmailer.lang-it.php
137 %lang(ja) %{_appdir}/language/phpmailer.lang-ja.php
138 %lang(lt) %{_appdir}/language/phpmailer.lang-lt.php
139 %lang(nb) %{_appdir}/language/phpmailer.lang-no.php
140 %lang(nl) %{_appdir}/language/phpmailer.lang-nl.php
141 %lang(pl) %{_appdir}/language/phpmailer.lang-pl.php
142 %lang(pt_BR) %{_appdir}/language/phpmailer.lang-br.php
143 %lang(ro) %{_appdir}/language/phpmailer.lang-ro.php
144 %lang(ru) %{_appdir}/language/phpmailer.lang-ru.php
145 %lang(sk) %{_appdir}/language/phpmailer.lang-sk.php
146 %lang(sv) %{_appdir}/language/phpmailer.lang-se.php
147 %lang(tr) %{_appdir}/language/phpmailer.lang-tr.php
148 %lang(uk) %{_appdir}/language/phpmailer.lang-uk.php
149 %lang(zh) %{_appdir}/language/phpmailer.lang-zh.php
150 %lang(zh_CN) %{_appdir}/language/phpmailer.lang-zh_cn.php
151
152 %dir %{_appdir}/extras
153 %{_appdir}/extras/EasyPeasyICS.php
154 %{_appdir}/extras/class.html2text.php
155 %{_appdir}/extras/htmlfilter.php
156 %{_appdir}/extras/ntlm_sasl_client.php
157
158 %{_examplesdir}/%{name}-%{version}
159
160 %files phpdoc
161 %defattr(644,root,root,755)
162 %{_phpdocdir}/%{pkgname}
This page took 1.764968 seconds and 4 git commands to generate.