summaryrefslogtreecommitdiff
path: root/package/bogofilter
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/bogofilter
Initial import
Diffstat (limited to 'package/bogofilter')
-rw-r--r--package/bogofilter/Config.in26
-rw-r--r--package/bogofilter/Makefile47
-rw-r--r--package/bogofilter/ipkg/bogofilter.control4
-rw-r--r--package/bogofilter/patches/patch-config_in14
-rw-r--r--package/bogofilter/patches/patch-configure281
5 files changed, 372 insertions, 0 deletions
diff --git a/package/bogofilter/Config.in b/package/bogofilter/Config.in
new file mode 100644
index 000000000..1dfb7d2d5
--- /dev/null
+++ b/package/bogofilter/Config.in
@@ -0,0 +1,26 @@
+config ADK_PACKAGE_BOGOFILTER
+ prompt "bogofilter........................ Mail (spam) filter utility"
+ tristate
+ default n
+ depends on ADK_CXX
+ select ADK_PACKAGE_LIBDB
+ select ADK_PACKAGE_LIBICONV
+ help
+ Filters mail, must be trained.
+
+ http://bogofilter.sourceforge.net
+
+
+config ADK_PACKAGE_BOGOFILTER_BOGOUTIL
+ prompt " include bogoutil in firmware image and package file"
+ bool
+ default n
+ depends ADK_PACKAGE_BOGOFILTER
+
+config ADK_PACKAGE_BOGOFILTER_BOGOTUNE
+ prompt " include bogotune in firmware image and package file"
+ bool
+ default n
+ depends ADK_PACKAGE_BOGOFILTER
+
+
diff --git a/package/bogofilter/Makefile b/package/bogofilter/Makefile
new file mode 100644
index 000000000..d9f015ccc
--- /dev/null
+++ b/package/bogofilter/Makefile
@@ -0,0 +1,47 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= bogofilter
+PKG_VERSION:= 1.1.3
+PKG_RELEASE:= 1
+PKG_MD5SUM:= a816f509324ccb9946a4d89fefe525e1
+MASTER_SITES:= http://ftp.debian.org/debian/pool/main/b/bogofilter/
+DISTFILES:= ${PKG_NAME}_${PKG_VERSION}.orig.tar.gz
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,BOGOFILTER,bogofilter,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+CONFIGURE_STYLE= gnu
+CONFIGURE_ENV+= ac_cv_c_bigendian=no \
+ ac_cv_sizeof_off_t=8 \
+ ac_cv_sizeof_int=4 \
+ ac_cv_sizeof_long=4 \
+ LIBS="-liconv"
+CONFIGURE_ARGS+= --without-libsqlite3-prefix \
+ --without-libqdbm-prefix \
+ --with-included-gsl \
+ --with-libdb-prefix=${STAGING_DIR}/usr \
+ --disable-transactions
+# --without-libdb-prefix
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+PKG_DEPENDS:= libdb libiconv
+
+post-install:
+ echo 'Depends: ${PKG_DEPENDS}' >>${IDIR_BOGOFILTER}/CONTROL/control
+ ${INSTALL_DIR} ${IDIR_BOGOFILTER}/usr/bin
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/${PKG_NAME} ${IDIR_BOGOFILTER}/usr/bin/
+ifeq (${ADK_PACKAGE_BOGOFILTER_BOGOUTIL},y)
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/bogoutil ${IDIR_BOGOFILTER}/usr/bin/
+endif
+ifeq (${ADK_PACKAGE_BOGOFILTER_BOGOTUNE},y)
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/bogotune ${IDIR_BOGOFILTER}/usr/bin/
+endif
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/bogofilter/ipkg/bogofilter.control b/package/bogofilter/ipkg/bogofilter.control
new file mode 100644
index 000000000..ef205f2d7
--- /dev/null
+++ b/package/bogofilter/ipkg/bogofilter.control
@@ -0,0 +1,4 @@
+Package: bogofilter
+Priority: optional
+Section: mail
+Description: Mail filter
diff --git a/package/bogofilter/patches/patch-config_in b/package/bogofilter/patches/patch-config_in
new file mode 100644
index 000000000..11648db39
--- /dev/null
+++ b/package/bogofilter/patches/patch-config_in
@@ -0,0 +1,14 @@
+$Id$
+--- bogofilter-1.1.3.orig/config.in 2006-12-03 05:17:24.000000000 +0100
++++ bogofilter-1.1.3/config.in 2007-03-29 19:28:01.000000000 +0200
+@@ -51,10 +51,6 @@
+ /* Have suitable db.h header */
+ #undef HAVE_DB_H
+
+-/* Define to 1 if you have the declaration of `db_create', and to 0 if you
+- don't. */
+-#undef HAVE_DECL_DB_CREATE
+-
+ /* Define to 1 if you have the declaration of `getopt', and to 0 if you don't.
+ */
+ #undef HAVE_DECL_GETOPT
diff --git a/package/bogofilter/patches/patch-configure b/package/bogofilter/patches/patch-configure
new file mode 100644
index 000000000..165de8409
--- /dev/null
+++ b/package/bogofilter/patches/patch-configure
@@ -0,0 +1,281 @@
+$Id$
+--- bogofilter-1.1.3.orig/configure 2006-12-03 05:17:15.000000000 +0100
++++ bogofilter-1.1.3/configure 2007-03-29 19:27:35.000000000 +0200
+@@ -13464,238 +13464,55 @@ echo "${ECHO_T}$LIBDB" >&6; }
+
+ saveLIBS="$LIBS"
+ LIBS="$LIBS $LIBDB"
+- { echo "$as_me:$LINENO: checking if a program can be linked against Berkeley DB and run" >&5
+-echo $ECHO_N "checking if a program can be linked against Berkeley DB and run... $ECHO_C" >&6; }
+- if test "$cross_compiling" = yes; then
+- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-else
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
++# AC_MSG_CHECKING(if a program can be linked against Berkeley DB and run)
++# AC_RUN_IFELSE(
++# AC_LANG_PROGRAM([[
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+ #include <db.h>
++# ]], [[
++#return 0;
++# ]]),,
++# [AC_MSG_RESULT(no)
++# AC_MSG_ERROR([Cannot run a program linked against libdb.
++#Did you adjust your library search path to include your libdb?])],)
++# AC_MSG_RESULT(yes)
+
+-int
+-main ()
+-{
+-
+-return 0;
+-
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_link") 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_try") 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- :
+-else
+- echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-{ echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+- { { echo "$as_me:$LINENO: error: Cannot run a program linked against libdb.
+-Did you adjust your library search path to include your libdb?" >&5
+-echo "$as_me: error: Cannot run a program linked against libdb.
+-Did you adjust your library search path to include your libdb?" >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+-
+- { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+-
+- { echo "$as_me:$LINENO: checking if Berkeley DB header and library versions match" >&5
+-echo $ECHO_N "checking if Berkeley DB header and library versions match... $ECHO_C" >&6; }
+- rm -r -f bfadtestdir
+- mkdir bfadtestdir
+- if test "$cross_compiling" = yes; then
+- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
+-else
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+- #include <stdlib.h>
+- #include <stdio.h>
++# dnl check if header and library of DB library match
++# dnl ignore if cross compiling
++# AC_MSG_CHECKING(if Berkeley DB header and library versions match)
++# rm -r -f bfadtestdir
++# mkdir bfadtestdir
++# AC_RUN_IFELSE(
++# AC_LANG_PROGRAM([[
++# #include <stdlib.h>
++# #include <stdio.h>
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+- #include <db.h>
+-
+-int
+-main ()
+-{
+-
+- int maj, min;
+- (void)db_version(&maj, &min, 0);
+- (void)fprintf(stderr, "headers: %d.%d, library: %d.%d\n",
+- DB_VERSION_MAJOR, DB_VERSION_MINOR, maj, min);
+- if (maj != DB_VERSION_MAJOR) exit(1);
+- if (min != DB_VERSION_MINOR) exit(1);
+- exit(0);
+-
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_link") 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_try") 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- :
+-else
+- echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-{ echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6; }
+- { { echo "$as_me:$LINENO: error: db.h header file and db library version do not match." >&5
+-echo "$as_me: error: db.h header file and db library version do not match." >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+-
+- { echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6; }
+- { echo "$as_me:$LINENO: checking whether db_create is declared" >&5
+-echo $ECHO_N "checking whether db_create is declared... $ECHO_C" >&6; }
+-if test "${ac_cv_have_decl_db_create+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-#ifdef HAVE_INTTYPES_H
++# #include <db.h>
++# ]], [[
++# int maj, min;
++# (void)db_version(&maj, &min, 0);
++# (void)fprintf(stderr, "headers: %d.%d, library: %d.%d\n",
++# DB_VERSION_MAJOR, DB_VERSION_MINOR, maj, min);
++# if (maj != DB_VERSION_MAJOR) exit(1);
++# if (min != DB_VERSION_MINOR) exit(1);
++# exit(0);
++# ]]),,
++# [AC_MSG_RESULT(no)
++# AC_MSG_ERROR(db.h header file and db library version do not match.)],)
++# AC_MSG_RESULT(yes)
++# AC_CHECK_DECLS(db_create,,
++# AC_MSG_ERROR([[Can not locate a suitable Berkeley DB db.h header file.
++#Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory.
++#You can download Berkeley DB 4.3.x from http://www.sleepycat.com/]]),
++# [[#ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+ #endif
+-#include <db.h>
+-
+-
+-int
+-main ()
+-{
+-#ifndef db_create
+- (void) db_create;
+-#endif
+-
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_compile") 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } && {
+- test -z "$ac_c_werror_flag" ||
+- test ! -s conftest.err
+- } && test -s conftest.$ac_objext; then
+- ac_cv_have_decl_db_create=yes
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+- ac_cv_have_decl_db_create=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_db_create" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_db_create" >&6; }
+-if test $ac_cv_have_decl_db_create = yes; then
+-
+-cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_DB_CREATE 1
+-_ACEOF
+-
+-
+-else
+- cat >>confdefs.h <<_ACEOF
+-#define HAVE_DECL_DB_CREATE 0
+-_ACEOF
+-
+-{ { echo "$as_me:$LINENO: error: Can not locate a suitable Berkeley DB db.h header file.
+-Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory.
+-You can download Berkeley DB 4.3.x from http://www.sleepycat.com/" >&5
+-echo "$as_me: error: Can not locate a suitable Berkeley DB db.h header file.
+-Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory.
+-You can download Berkeley DB 4.3.x from http://www.sleepycat.com/" >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-
+-
++#include <db.h>]]
++# )
+ { echo "$as_me:$LINENO: checking if Berkeley DB supports shared environments" >&5
+ echo $ECHO_N "checking if Berkeley DB supports shared environments... $ECHO_C" >&6; }
+ if test "x$enable_dbshared_test" != xno && test "x$USE_TRANSACTIONS" != xNO ; then