/[packages]/cauldron/php-esmtp/current/SPECS/php-esmtp.spec
ViewVC logotype

Contents of /cauldron/php-esmtp/current/SPECS/php-esmtp.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 44187 - (show annotations) (download)
Sat Jan 29 21:34:22 2011 UTC (10 years, 7 months ago) by spuhler
File size: 1741 byte(s)
imported package php-esmtp
1 %define modname esmtp
2 %define dirname %{modname}
3 %define soname %{modname}.so
4 %define inifile A34_%{modname}.ini
5
6 Summary: ESMTP client extension for PHP
7 Name: php-%{modname}
8 Version: 0.3.1
9 Release: %mkrel 30
10 Group: Development/PHP
11 License: PHP License
12 URL: http://pecl.php.net/package/esmtp
13 Source0: esmtp-%{version}.tar.bz2
14 Patch0: esmtp-0.3.1-compile_fix.diff
15 BuildRequires: php-devel >= 3:5.2.0
16 BuildRequires: libesmtp-devel >= 1.0.3r1-1mdk
17 BuildRequires: openssl-devel
18 Epoch: 1
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
20
21 %description
22 Esmtp is a wrapper for SMTP client library based on the libESMTP library. You
23 can use it to send messages using internal SASL, and external/openssl SSL
24 support.
25
26 %prep
27
28 %setup -q -n esmtp-%{version}
29 %patch0 -p0
30
31 %build
32 %serverbuild
33
34 phpize
35 %configure2_5x --with-libdir=%{_lib} \
36 --with-%{modname}=shared,%{_prefix}
37
38 %make
39 mv modules/*.so .
40
41 %install
42 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
43
44 install -d %{buildroot}%{_libdir}/php/extensions
45 install -d %{buildroot}%{_sysconfdir}/php.d
46
47 install -m755 %{soname} %{buildroot}%{_libdir}/php/extensions/
48
49 cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF
50 extension = %{soname}
51 EOF
52
53 %post
54 if [ -f /var/lock/subsys/httpd ]; then
55 %{_initrddir}/httpd restart >/dev/null || :
56 fi
57
58 %postun
59 if [ "$1" = "0" ]; then
60 if [ -f /var/lock/subsys/httpd ]; then
61 %{_initrddir}/httpd restart >/dev/null || :
62 fi
63 fi
64
65 %clean
66 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
67 [ "../package.xml" != "/" ] && rm -f ../package.xml
68
69 %files
70 %defattr(-,root,root)
71 %doc tests CREDITS NOTES TODO
72 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile}
73 %attr(0755,root,root) %{_libdir}/php/extensions/%{soname}
74
75

  ViewVC Help
Powered by ViewVC 1.1.28