]> git.pld-linux.org Git - packages/python-pyclamav.git/commitdiff
- adjusted new-api patch to cover clamav 0.101; release 15
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 11 Dec 2018 17:23:26 +0000 (18:23 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 11 Dec 2018 17:23:26 +0000 (18:23 +0100)
python-pyclamav-new-api.patch
python-pyclamav.spec

index 1cf77e1925e7717f70621fd2b6bcfefb078c2107..1b7b11cae75650163a96d39f1dc4027910cccf02 100644 (file)
  }
  
 
+--- pyclamav-0.4.1/pyclamav.c.orig     2018-12-10 21:43:22.642033238 +0100
++++ pyclamav-0.4.1/pyclamav.c  2018-12-11 17:39:55.224546828 +0100
+@@ -210,7 +210,16 @@
+     return NULL;     
+   }
++#ifdef CL_SCAN_STDOPT
+   ret = cl_scanfile(file_to_scan, &virname, &size, engine, CL_SCAN_STDOPT);
++#else
++  {
++    struct cl_scan_options scanoptions = {CL_SCAN_GENERAL_HEURISTICS,
++                                        CL_SCAN_PARSE_ARCHIVE|CL_SCAN_PARSE_ELF|CL_SCAN_PARSE_PDF|CL_SCAN_PARSE_SWF|CL_SCAN_PARSE_HWP3|CL_SCAN_PARSE_XMLDOCS|CL_SCAN_PARSE_MAIL|CL_SCAN_PARSE_OLE2|CL_SCAN_PARSE_HTML|CL_SCAN_PARSE_PE,
++                                        0,0,0};
++    ret = cl_scanfile(file_to_scan, &virname, &size, engine, &scanoptions);
++  }
++#endif
+   /* Test return code */
+   switch (ret) {
index eda44da8b7e0376ad122fbe79b14257712ae9b4b..7f5d8863406fabd804f1250a5f57246f9850a373 100644 (file)
@@ -4,20 +4,21 @@ Summary:      A Python interface to libclamav
 Summary(pl.UTF-8):     Interfejs Pythona do libclamav
 Name:          python-pyclamav
 Version:       0.4.1
-Release:       14
-License:       GPL
+Release:       15
+License:       GPL v2+
 Group:         Libraries/Python
 Source0:       http://norman.free.fr/norman/python/pyclamav/pyclamav-%{version}.tar.gz
 # Source0-md5: 9e1f29ea118bac87223ff4df3c077556
 Patch0:                %{name}-new-api.patch
 URL:           http://xael.org/norman/python/pyclamav/index.html
-BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: clamav-devel >= 0:0.95
-BuildRequires: python
+BuildRequires: clamav-devel >= 0.95
+BuildRequires: pkgconfig
+BuildRequires: python >= 1:2.4
 BuildRequires: python-devel >= 1:2.4
-BuildRequires: python-modules
+BuildRequires: python-modules >= 1:2.4
 BuildRequires: rpm-pythonprov
-Requires:      clamav >= 0:0.95
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires:      clamav >= 0.95
 Requires:      python
 %pyrequires_eq python-modules
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -33,6 +34,7 @@ Interfejs Pythona do libclamav.
 %patch0 -p1
 
 %build
+CFLAGS="%{rpmcflags} $(pkg-config --cflags libclamav)"
 %py_build
 
 %install
@@ -49,9 +51,9 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc README.txt CHANGELOG
-%attr(755,root,root) %{py_sitedir}/*.so
+%attr(755,root,root) %{py_sitedir}/pyclamav.so
 %dir %{_examplesdir}/%{name}-%{version}
 %{_examplesdir}/%{name}-%{version}/example.py
 %if "%{py_ver}" > "2.4"
-%{py_sitedir}/*.egg-info
+%{py_sitedir}/pyclamav-%{version}-py*.egg-info
 %endif
This page took 0.044586 seconds and 4 git commands to generate.