]> git.pld-linux.org Git - packages/php-clamav.git/blame - php-clamav.spec
working homepage url
[packages/php-clamav.git] / php-clamav.spec
CommitLineData
f14dbe6f
ER
1%define php_name php%{?php_suffix}
2%define modname clamav
3Summary: Provides a interface to ClamAV for PHP
4Name: %{php_name}-%{modname}
ec3c44e3
ER
5Version: 0.15.7
6Release: 1
f14dbe6f
ER
7License: PHP License
8Group: Development/Languages/PHP
ec3c44e3
ER
9Source0: http://downloads.sourceforge.net/php-clamav/php-clamav_%{version}.tar.gz
10# Source0-md5: 7812fb38f75b76a212df335d18a72071
4229e1de 11URL: http://php-clamav.sourceforge.net/
f14dbe6f 12BuildRequires: %{php_name}-devel
ec3c44e3 13BuildRequires: clamav-devel
f14dbe6f
ER
14BuildRequires: rpmbuild(macros) >= 1.666
15%{?requires_php_extension}
f14dbe6f 16Requires: clamav
ec3c44e3 17Provides: php(%{modname}) = %{version}
f14dbe6f
ER
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
21PHP ClamaAV Lib is a PHP extension that allows to incorporate virus
22scanning features in your PHP scripts. It uses the Clam Antivirus API
23(libclamav) for virus scanning.
24
25%prep
ec3c44e3 26%setup -q -n php-clamav-%{version}
f14dbe6f
ER
27
28%build
29phpize
30%configure
31%{__make}
32
33%if %{with tests}
34# simple module load test
35%{__php} -n -q \
36 -d extension_dir=modules \
37 -d extension=%{modname}.so \
38 -m > modules.log
39grep %{modname} modules.log
40
41export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
42%{__make} test \
43 PHP_EXECUTABLE=%{__php}
44%endif
45
46%install
ec3c44e3 47rm -rf $RPM_BUILD_ROOT
f14dbe6f
ER
48%{__make} install \
49 EXTENSION_DIR=%{php_extensiondir} \
50 INSTALL_ROOT=$RPM_BUILD_ROOT
51
52install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
53cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
54; Enable %{modname} extension module
55extension=%{modname}.so
56
57[clamav]
58clamav.dbpath="/var/lib/clamav"
59clamav.maxreclevel=0
60clamav.maxfiles=0
61clamav.archivememlim=0
62clamav.maxfilesize=0
63EOF
64
ec3c44e3
ER
65%clean
66rm -rf $RPM_BUILD_ROOT
67
f14dbe6f
ER
68%post
69%php_webserver_restart
70
71%postun
72if [ "$1" = 0 ]; then
73 %php_webserver_restart
74fi
75
76%files
77%defattr(644,root,root,755)
ec3c44e3 78%doc CHANGES CREDITS INSTALL phpclamav_test.php
f14dbe6f
ER
79%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
80%attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.06407 seconds and 4 git commands to generate.