[packages/php-clamav] up to 0.15.7

glen glen at pld-linux.org
Wed May 28 18:59:50 CEST 2014


commit ec3c44e3b418d25799e40bd9850c9769872cef45
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed May 28 19:59:13 2014 +0300

    up to 0.15.7

 php-clamav.spec                          | 24 ++++++-------
 php-clamavlib-clamav-0.93_build_fix.diff | 62 --------------------------------
 php-clamavlib-clamav-0.94_build_fix.diff | 21 -----------
 3 files changed, 12 insertions(+), 95 deletions(-)
---
diff --git a/php-clamav.spec b/php-clamav.spec
index 28456c4..63a86a0 100644
--- a/php-clamav.spec
+++ b/php-clamav.spec
@@ -2,21 +2,19 @@
 %define		modname		clamav
 Summary:	Provides a interface to ClamAV for PHP
 Name:		%{php_name}-%{modname}
-Version:	0.13
-Release:	0.1
+Version:	0.15.7
+Release:	1
 License:	PHP License
 Group:		Development/Languages/PHP
-Source0:	php-clamavlib-%{version}.tar.gz
-# Source0-md5:	5ccb9daa8ed4181a9fafae5dd9297395
-Patch0:		php-clamavlib-clamav-0.93_build_fix.diff
-Patch1:		php-clamavlib-clamav-0.94_build_fix.diff
+Source0:	http://downloads.sourceforge.net/php-clamav/php-clamav_%{version}.tar.gz
+# Source0-md5:	7812fb38f75b76a212df335d18a72071
 URL:		http://phpclamavlib.org/
-BuildRequires:	clamav-devel
 BuildRequires:	%{php_name}-devel
+BuildRequires:	clamav-devel
 BuildRequires:	rpmbuild(macros) >= 1.666
 %{?requires_php_extension}
-Provides:	php(MODULE_NAME) = %{version}
 Requires:	clamav
+Provides:	php(%{modname}) = %{version}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -25,9 +23,7 @@ scanning features in your PHP scripts. It uses the Clam Antivirus API
 (libclamav) for virus scanning.
 
 %prep
-%setup -q -n php-clamavlib-%{version}
-%patch0 -p0
-%patch1 -p0
+%setup -q -n php-clamav-%{version}
 
 %build
 phpize
@@ -48,6 +44,7 @@ export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
 %endif
 
 %install
+rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	EXTENSION_DIR=%{php_extensiondir} \
 	INSTALL_ROOT=$RPM_BUILD_ROOT
@@ -65,6 +62,9 @@ clamav.archivememlim=0
 clamav.maxfilesize=0
 EOF
 
+%clean
+rm -rf $RPM_BUILD_ROOT
+
 %post
 %php_webserver_restart
 
@@ -75,6 +75,6 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES CREDITS EXPERIMENTAL INSTALL clamav.php
+%doc CHANGES CREDITS INSTALL phpclamav_test.php
 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
diff --git a/php-clamavlib-clamav-0.93_build_fix.diff b/php-clamavlib-clamav-0.93_build_fix.diff
deleted file mode 100644
index ccb7193..0000000
--- a/php-clamavlib-clamav-0.93_build_fix.diff
+++ /dev/null
@@ -1,62 +0,0 @@
---- clamav.c	2007-09-25 17:50:25.000000000 +0200
-+++ clamav.c.oden	2008-04-18 09:55:26.000000000 +0200
-@@ -112,9 +112,6 @@ PHP_INI_BEGIN()
-     STD_PHP_INI_ENTRY("clamav.maxfilesize", "0", PHP_INI_ALL, OnUpdateLong, 
- 					  maxfilesize, zend_clamav_globals, clamav_globals)
- 
--    STD_PHP_INI_ENTRY("clamav.maxratio", "200", PHP_INI_ALL, OnUpdateLong, 
--					  maxratio, zend_clamav_globals, clamav_globals)
--
- PHP_INI_END()
- /* }}} */
- 
-@@ -127,7 +124,6 @@ static void php_clamav_init_globals(zend
- 	clamav_globals->maxfiles      = 0;
- 	clamav_globals->archivememlim = 0;
- 	clamav_globals->maxfilesize   = 0;
--	clamav_globals->maxratio      = 0;
- }
- /* }}} */
- 
-@@ -161,7 +157,6 @@ PHP_MINIT_FUNCTION(clamav)
- 	limits.maxfiles      = CLAMAV_G(maxfiles); 		/* max files */	
- 	limits.maxfilesize   = CLAMAV_G(maxfilesize);	/* maximal archived file size */
- 	limits.maxreclevel   = CLAMAV_G(maxreclevel);	/* maximal recursion level */
--	limits.maxratio      = CLAMAV_G(maxratio);		/* maximal compression ratio */
- 	limits.archivememlim = CLAMAV_G(archivememlim);	/* disable memory limit for bzip2 scanner */
- 
- 	/*  Register ClamAV scan options, they're also availible inside
-@@ -406,12 +401,11 @@ PHP_FUNCTION(cl_scanfile)
- PHP_FUNCTION(cl_setlimits)
- {
- 	/* number of arguments */
--	const int NUM_ARGS	= 5;
-+	const int NUM_ARGS	= 4;
- 	
- 	int maxfiles;
- 	int maxfilesize;
- 	int maxreclevel;
--	int maxratio;
- 	int archivememlim;
- 
- 	/* argument checking */
-@@ -421,9 +415,9 @@ PHP_FUNCTION(cl_setlimits)
- 	}
- 
- 	/* argument parsing */
--	if (zend_parse_parameters(NUM_ARGS TSRMLS_CC, "lllll", 
-+	if (zend_parse_parameters(NUM_ARGS TSRMLS_CC, "llll", 
- 							  &maxfiles, &maxfilesize,
--							  &maxreclevel, &maxratio, 
-+							  &maxreclevel, 
- 							  &archivememlim ) == FAILURE) 
- 		return FAILURE;
- 	
-@@ -432,7 +426,6 @@ PHP_FUNCTION(cl_setlimits)
- 	limits.maxfiles      = maxfiles; 		/* max files */	
- 	limits.maxfilesize   = maxfilesize;		/* maximal archived file size */
- 	limits.maxreclevel   = maxreclevel;		/* maximal recursion level */
--	limits.maxratio      = maxratio;		/* maximal compression ratio */
- 	limits.archivememlim = archivememlim;	/* disable memory limit for bzip2 scanner */
- 
- 	RETURN_TRUE;	
diff --git a/php-clamavlib-clamav-0.94_build_fix.diff b/php-clamavlib-clamav-0.94_build_fix.diff
deleted file mode 100644
index 81ca87a..0000000
--- a/php-clamavlib-clamav-0.94_build_fix.diff
+++ /dev/null
@@ -1,21 +0,0 @@
---- clamav.c	2008-09-04 15:07:25.000000000 +0200
-+++ clamav.c.oden	2008-09-04 15:06:49.000000000 +0200
-@@ -219,8 +219,6 @@ PHP_MINIT_FUNCTION(clamav)
-                             CONST_CS | CONST_PERSISTENT);
-     REGISTER_LONG_CONSTANT("CL_ETMPFILE", CL_ETMPFILE,
-                             CONST_CS | CONST_PERSISTENT);
--    REGISTER_LONG_CONSTANT("CL_EFSYNC", CL_EFSYNC,
--                            CONST_CS | CONST_PERSISTENT);
-     REGISTER_LONG_CONSTANT("CL_EMEM", CL_EMEM,
-                             CONST_CS | CONST_PERSISTENT);
-     REGISTER_LONG_CONSTANT("CL_EOPEN", CL_EOPEN,
-@@ -547,9 +545,6 @@ PHP_FUNCTION(cl_pretcode)
- 		case CL_ETMPFILE:
- 			RETURN_STRING("tmpfile() failed", 1);
- 			break;
--		case CL_EFSYNC:
--			RETURN_STRING("fsync() failed", 1);
--			break;
- 		case CL_EMEM:
- 			RETURN_STRING("memory allocation error", 1);
- 			break;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-clamav.git/commitdiff/ec3c44e3b418d25799e40bd9850c9769872cef45



More information about the pld-cvs-commit mailing list