osbf-lua-2.0.4, lua text classification module and anti-spam solution
from pedro@
This commit is contained in:
parent
888e9a5285
commit
36f350da56
39
mail/osbf-lua/Makefile
Normal file
39
mail/osbf-lua/Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2007/03/17 21:37:08 jolan Exp $
|
||||
|
||||
COMMENT= "lua text classification module and anti-spam solution"
|
||||
|
||||
DISTNAME= osbf-lua-2.0.4
|
||||
CATEGORIES= mail
|
||||
|
||||
MASTER_SITES= http://luaforge.net/frs/download.php/2094/
|
||||
HOMEPAGE= http://osbf-lua.luaforge.net/
|
||||
|
||||
MAINTAINER= Pedro Martelletto <pedro@openbsd.org>
|
||||
|
||||
# GPL
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
NO_REGRESS= Yes
|
||||
RUN_DEPENDS= :lua->=5.1:lang/lua
|
||||
|
||||
do-build:
|
||||
.for f in losbflib osbf_bayes osbf_aux
|
||||
${CC} ${CFLAGS} -DLIB_VERSION=\"2.0.4\" -fPIC -I${LOCALBASE}/include\
|
||||
-c ${WRKDIST}/$f.c -o ${WRKDIST}/$f.o
|
||||
.endfor
|
||||
${CC} ${CFLAGS} -shared ${WRKDIST}/losbflib.o ${WRKDIST}/osbf_bayes.o\
|
||||
${WRKDIST}/osbf_aux.o -L${LOCALBASE}/lib -o ${WRKDIST}/osbf.so
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lib/lua/5.1
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/osbf-lua
|
||||
${INSTALL_DATA} ${WRKSRC}/osbf.so ${PREFIX}/lib/lua/5.1
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/spamfilter/*.lua ${PREFIX}/share/osbf-lua
|
||||
${INSTALL_DATA} ${WRKSRC}/spamfilter/*sample ${PREFIX}/share/osbf-lua
|
||||
${INSTALL_DATA} ${WRKSRC}/spamfilter/*help ${PREFIX}/share/osbf-lua
|
||||
|
||||
.include <bsd.port.mk>
|
5
mail/osbf-lua/distinfo
Normal file
5
mail/osbf-lua/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (osbf-lua-2.0.4.tar.gz) = 17888b58053f810a752ffbcc8c8e2ad9
|
||||
RMD160 (osbf-lua-2.0.4.tar.gz) = ba808072739de2bcb40ce81f0177ef7588508670
|
||||
SHA1 (osbf-lua-2.0.4.tar.gz) = 6fd4fb6496c20e9340cdcff4820c50a793e2ea27
|
||||
SHA256 (osbf-lua-2.0.4.tar.gz) = 3262798d9d670c858cdce5dfb38d9b6967464ff5fe379acf1a20bc04c2db8a93
|
||||
SIZE (osbf-lua-2.0.4.tar.gz) = 82343
|
24
mail/osbf-lua/patches/patch-losbflib_c
Normal file
24
mail/osbf-lua/patches/patch-losbflib_c
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-losbflib_c,v 1.1.1.1 2007/03/17 21:37:08 jolan Exp $
|
||||
--- losbflib.c.orig Sun Jan 14 19:57:19 2007
|
||||
+++ losbflib.c Tue Mar 6 21:44:40 2007
|
||||
@@ -13,6 +13,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+#include <sys/param.h>
|
||||
+
|
||||
#include <ctype.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
@@ -673,9 +675,9 @@ lua_osbf_changedir (lua_State * L)
|
||||
static int
|
||||
lua_osbf_getdir (lua_State * L)
|
||||
{
|
||||
- char cur_dir[MAX_DIR_SIZE + 1];
|
||||
+ char cur_dir[MAXPATHLEN];
|
||||
|
||||
- if (getcwd (cur_dir, MAX_DIR_SIZE) != NULL)
|
||||
+ if (getcwd (cur_dir, MAXPATHLEN) != NULL)
|
||||
{
|
||||
lua_pushstring (L, cur_dir);
|
||||
return 1;
|
6
mail/osbf-lua/pkg/DESCR
Normal file
6
mail/osbf-lua/pkg/DESCR
Normal file
@ -0,0 +1,6 @@
|
||||
OSBF-Lua (Orthogonal Sparse Bigrams with confidence Factor) is a Lua C
|
||||
module for text classification. It is a port of the OSBF classifier
|
||||
implemented in the CRM114 project. This implementation attempts to put
|
||||
focus on the classification task itself by using Lua as the scripting
|
||||
language, a powerful yet light-weight and fast language, which makes it
|
||||
easier to build and test more elaborated filters and training methods.
|
17
mail/osbf-lua/pkg/PLIST
Normal file
17
mail/osbf-lua/pkg/PLIST
Normal file
@ -0,0 +1,17 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/03/17 21:37:08 jolan Exp $
|
||||
lib/lua/5.1/osbf.so
|
||||
share/osbf-lua/
|
||||
share/osbf-lua/cache_report.lua
|
||||
share/osbf-lua/classify.sample
|
||||
share/osbf-lua/create_databases.lua
|
||||
share/osbf-lua/database_status.lua
|
||||
share/osbf-lua/getopt.lua
|
||||
share/osbf-lua/promailrc.sample
|
||||
share/osbf-lua/random.lua
|
||||
share/osbf-lua/roc.lua
|
||||
share/osbf-lua/spamfilter.help
|
||||
share/osbf-lua/spamfilter.lua
|
||||
share/osbf-lua/spamfilter_commands.lua
|
||||
share/osbf-lua/spamfilter_config.lua
|
||||
share/osbf-lua/toer.lua
|
||||
share/osbf-lua/train.sample
|
Loading…
Reference in New Issue
Block a user