Portage is a package management system used by Gentoo Linux
# ChangeLog for mail-filter/spamassassin-fuzzyocr
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin-fuzzyocr/ChangeLog,v 1.17 2008/08/23 06:03:23 cardoe Exp $
23 Aug 2008; Doug Goldstein
add GLEP 56 USE flag desc from use.local.desc
02 Aug 2008; Torsten Veller
spamassassin-fuzzyocr-3.5.1.ebuild, spamassassin-fuzzyocr-3.5.1-r1.ebuild:
Move perl-core/DB_File -> virtual/perl-DB_File, perl-core/Storable ->
virtual/perl-Storable, perl-core/Time-HiRes -> virtual/perl-Time-HiRes
(#211629)
03 Jul 2007; Raúl Porcel
spamassassin-fuzzyocr-3.5.1-r1.ebuild:
Add ~alpha wrt #182519
27 Jun 2007; Lars Weiler
spamassassin-fuzzyocr-3.5.1-r1.ebuild:
Added ~ppc; bug #182519.
20 Jun 2007; Markus Rothe
spamassassin-fuzzyocr-3.5.1-r1.ebuild:
Added ~ppc64; bug #182519
*spamassassin-fuzzyocr-3.5.1-r1 (18 Jun 2007)
18 Jun 2007; Michael Cummings
+spamassassin-fuzzyocr-3.5.1-r1.ebuild:
bug 177224
03 Jun 2007; Raúl Porcel
spamassassin-fuzzyocr-3.5.1.ebuild:
Add ~alpha wrt #173114
29 Mar 2007; Andrej Kacian
spamassassin-fuzzyocr-2.3b.ebuild:
Stable on x86.
25 Mar 2007; Tobias Scherbaum
spamassassin-fuzzyocr-3.5.1.ebuild:
Added ~ppc, #170840
18 Mar 2007; Marius Mauch
spamassassin-fuzzyocr-2.3b.ebuild, spamassassin-fuzzyocr-3.5.1.ebuild:
Replacing einfo with elog
15 Mar 2007; Markus Rothe
spamassassin-fuzzyocr-3.5.1.ebuild:
Stable on ppc64; bug #170840
13 Mar 2007; Tom Knight
files/enabletesseract.patch:
Fixed conflicting patches
*spamassassin-fuzzyocr-3.5.1 (11 Mar 2007)
11 Mar 2007; Tom Knight
+files/disableocrad.patch, +files/enabletesseract.patch,
+files/fuzzyocr.logrotate, +spamassassin-fuzzyocr-3.5.1.ebuild:
Version bump to 3.5.1, thanks to everyone who helped out. Fixes bug #158445
08 Feb 2007; Patrick McLean
Add myself as co-maintainer.
12 Dec 2006; Gustavo Zacarias
spamassassin-fuzzyocr-2.3b.ebuild:
Keyworded ~sparc
08 Dec 2006; Chris Gianelloni
spamassassin-fuzzyocr-2.3b.ebuild:
Added ~x86.
*spamassassin-fuzzyocr-2.3b (05 Dec 2006)
05 Dec 2006; Tom Knight
+spamassassin-fuzzyocr-2.3b.ebuild:
Initial import. Fixes bug #154392
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
AUX disablegocr.patch 574 RMD160 78e1fb95a5758f7b4c0a9c9d40f4d4d9e1a04dbb SHA1 c6ffbdaaa1e794e3e94118501704978d1876b743 SHA256 71914e653efba7688f2edeb396c5ff99d98e42d3541190095041d17549f5812b
AUX disableocrad.patch 1165 RMD160 8162db6d5687852a914c84cdc200149361aa5c51 SHA1 e166fde2208c6a6a33b8374e03a92036a4e63f46 SHA256 93020dacb93ba6c462db685dfa9db79ffe28c155ab231b56aa538d544f9f5aa5
AUX enabletesseract.patch 656 RMD160 4b6452e84815fbe8d5b47e0cdcdc736c99cfa3dd SHA1 b31f8e9f5f9733bfe3faf08671807853508cfaa5 SHA256 e988dc3fbdf6250fbdd34f8933ffc3f9304e5bb428bb3a1de49a0ce87cab8b90
AUX fuzzyocr.logrotate 318 RMD160 2cc40d67746b344bd318b0672aef5425fd09499f SHA1 575f3a5a922bab997fd993dfca3da86c02075dff SHA256 22a03bf34157324ef7a0df2c539c526b71b649e5184f40461e4b36091cd8bf54
DIST fuzzyocr-2.3b.tar.gz 76411 RMD160 36b77add4645b462a7eb52540aba1212d55cd3f0 SHA1 e897ed9bcdfe313af78c6d89d09726dd5fb96ae5 SHA256 10db14b33a42249de40e347a8ad26cff150c2a6f6580246bce8689d8f1dc0a82
DIST fuzzyocr-3.5.1-devel.tar.gz 124418 RMD160 109f3ab8a6ecda5f2e0d737233faf54122f6d036 SHA1 52cb3b786d07b88b0c5c6bb8ab3c73a67321281e SHA256 75cf2c40824a0d151c495c687f33d76f09ccc01082407ba8bb7eeee7e7b16059
EBUILD spamassassin-fuzzyocr-2.3b.ebuild 1967 RMD160 24e60342860386d607d237ebb3c211bbc2a75011 SHA1 f761224c4d6c50a0df748a4420909ae8a1f512d9 SHA256 fd8b5251da27798a805f81c41bd290b5df38ffcd7b842ee56df6c2373168f0cb
EBUILD spamassassin-fuzzyocr-3.5.1-r1.ebuild 5415 RMD160 b15d14fd1ed10bed559200555b7c60ab2816567b SHA1 00b85d2d3da4eaa4af46ead5316af6f2e4a49054 SHA256 7d0da5bea86b0e76665e2093c961cc498d15f3ab8bba89c94e1b06c6ad2c54ee
EBUILD spamassassin-fuzzyocr-3.5.1.ebuild 5337 RMD160 c8aa41ae4061e048eed3534bd25b0c168272d0d1 SHA1 f0a6d3538c07db595e167f9490be5f98e072d185 SHA256 32d03948db631f0815dc4da57a968395b12192600789585103f71f32971e6141
MISC ChangeLog 2687 RMD160 6398344613c0b65a49c5bcee4ee23c9b85c6bf48 SHA1 952a8fe502012db9b8be6afa370c361d3ce42dc3 SHA256 bc52cc15120d1f90f75e2bc6215514e45bf10aa29b94c3d7088e4d0375316517
MISC metadata.xml 1118 RMD160 cc96d5c29744934090de9d578d96a5e6914f5364 SHA1 c3d56b7ea906ac53042750fb9a6eefcf62a4f933 SHA256 727c8496072e2af203a92dfb37f41c1ce1d0cc1c7a4da9bac885c1d4b1baf729
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
iEYEARECAAYFAkivqDAACgkQoeSe8B0zEfwPqQCdHTjXF94rAVs7f3Wm1JaNv37d
Wl4Amwebe1hpo7IcJLP7WuKljHFRzAHu
=oswf
-----END PGP SIGNATURE-----
image/jpeg or image/png attachments, using gocr (an optical character
recognition program).
This plugin can be used to detect spam that puts all the real spam
content in an attached image. The mail itself only random text and
random html, without any URL's or identifiable information.
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin-fuzzyocr/spamassassin-fuzzyocr-2.3b.ebuild,v 1.7 2007/07/15 02:43:38 mr_bones_ Exp $
inherit perl-module
MY_P="fuzzyocr-${PV}"
DESCRIPTION="SpamAssassin plugin for performing Optical Character Recognition (OCR) on attached images"
HOMEPAGE="http://fuzzyocr.own-hero.net/"
SRC_URI="http://users.own-hero.net/~decoder/fuzzyocr/${MY_P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~sparc x86"
IUSE=""
DEPEND="dev-lang/perl
>=mail-filter/spamassassin-3.0.0"
RDEPEND="${DEPEND}
media-libs/netpbm
media-gfx/imagemagick
media-libs/giflib
app-text/gocr
dev-perl/String-Approx
virtual/perl-Digest-MD5"
S="${WORKDIR}/FuzzyOcr-${PV}"
src_install() {
# called to get ${VENDOR_LIB}
perlinfo
local plugin_dir=${VENDOR_LIB}/Mail/SpamAssassin/Plugin
insinto ${plugin_dir}
doins FuzzyOcr.pm
insinto /etc/mail/spamassassin/
# Replace location of .pm file in config
sed -ie "s:FuzzyOcr.pm:${plugin_dir}/FuzzyOcr.pm:" FuzzyOcr.cf
# disable logging
sed -ie "s:^#focr_verbose 1:focr_verbose 0.0:" FuzzyOcr.cf
# if we're using spamassassin < 3.1.4 we need to set this variable
if has_version '
fi
doins FuzzyOcr.cf
newins FuzzyOcr.words.sample FuzzyOcr.words
dodoc FAQ
docinto samples
dodoc samples/*
}
pkg_postinst() {
elog "You need to restart spamassassin (as root) before this plugin will work:"
elog "/etc/init.d/spamd restart"
echo
ewarn "Certain images can cause giftext and gocr to segfault, patches are available"
ewarn "for both packages in bugzilla and should eventually find their way either"
ewarn "upstream or into the ebuilds. The patches can be found here:"
ewarn "gocr: https://bugs.gentoo.org/157138"
ewarn "giftext: https://bugs.gentoo.org/157142"
}
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin-fuzzyocr/spamassassin-fuzzyocr-3.5.1-r1.ebuild,v 1.6 2008/08/02 20:38:25 tove Exp $
inherit perl-module eutils
MY_P="${P#spamassassin-}"
DESCRIPTION="SpamAssassin plugin for performing Optical Character Recognition (OCR) on attached images"
HOMEPAGE="http://fuzzyocr.own-hero.net/"
SRC_URI="http://users.own-hero.net/~decoder/fuzzyocr/${MY_P}-devel.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
#KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="dbm gocr ocrad tesseract mysql logrotate amavis"
DEPEND="dev-lang/perl
dev-perl/Tie-Cache
>=mail-filter/spamassassin-3.1.4"
RDEPEND="${DEPEND}
gocr? ( >=app-text/gocr-0.43 )
ocrad? ( >=app-text/ocrad-0.14 )
tesseract? ( app-text/tesseract )
mysql? ( dev-perl/DBD-mysql dev-perl/DBI )
logrotate? ( app-admin/logrotate )
dbm? ( virtual/perl-DB_File dev-perl/MLDBM-Sync virtual/perl-Storable )
media-libs/netpbm
media-libs/giflib
dev-perl/String-Approx
virtual/perl-Time-HiRes
media-gfx/gifsicle"
# postgres? ( dev-perl/DBD-Pg )
S="${WORKDIR}/${MY_P/fuzzyocr/FuzzyOcr}"
pkg_setup() {
if ! use gocr && ! use ocrad && ! use tesseract ; then
eerror
eerror You did not specify an OCR engine. FuzzyOcr requires at least one
eerror OCR engine USE flag to be enabled. It is possible to enable all.
eerror
eerror The 3 OCR engines are: gocr ocrad tesseract
eerror Enable them in /etc/make.conf or /etc/portage/package.use
eerror
die "Configure failed"
fi
# create fuzzyocr group for logging and hashing
if use dbm || use logrotate ; then
use amavis || enewgroup fuzzyocr
fi
}
src_unpack() {
unpack ${A}
cd "${S}"
# If no ocrad USE flag, remove it from Fuzzyocr.scansets / jni
use ocrad || epatch "${FILESDIR}"/disableocrad.patch
# If tesseract USE flag is set, enable it in Fuzzyocr.scansets /jni
use tesseract && epatch "${FILESDIR}"/enabletesseract.patch
# If gocr USE flag is unset, enable disable gocr in Fuzzyocr.scansets /jni
use gocr || epatch "${FILESDIR}"/disablegocr.patch
# Apply PgSQL patchset if USE postgres /juan
#use postgres && epatch "${FILESDIR}"/postgresql.patch
}
src_install() {
# called to get ${VENDOR_LIB}
perlinfo
local plugin_dir=${VENDOR_LIB}/Mail/SpamAssassin/Plugin
insinto ${plugin_dir}
doins FuzzyOcr.pm
# Replace location of .pm file in config
sed -ie "s:FuzzyOcr.pm:${plugin_dir}/FuzzyOcr.pm:" FuzzyOcr.cf
# Enable logfile if logrotate
if use logrotate ; then
sed -ie "s:^#focr_verbose 3:focr_verbose 3:" FuzzyOcr.cf
sed -ie "s:^#focr_logfile /tmp/FuzzyOcr.log:focr_logfile /var/log/FuzzyOcr.log:" FuzzyOcr.cf
# Create the logfile with correct permissions /jni
if [ ! -e /var/log/FuzzyOcr.log ]; then
insinto /var/log
newins /dev/null FuzzyOcr.log
if use amavis ; then
fperms 600 /var/log/FuzzyOcr.log
fowners amavis:amavis /var/log/FuzzyOcr.log
else
fperms 660 /var/log/FuzzyOcr.log
fowners root:fuzzyocr /var/log/FuzzyOcr.log
fi
fi
diropts ""
dodir /etc/logrotate.d
insopts -m0644
insinto /etc/logrotate.d
newins "${FILESDIR}"/fuzzyocr.logrotate FuzzyOcr
fi
# Create needed dir for dbs and change FuzzyOcr.cf /jni
if use dbm ; then
dodir /var/lib/FuzzyOcr
keepdir /var/lib/FuzzyOcr
if use amavis ; then
fowners amavis:amavis /var/lib/FuzzyOcr
fperms 700 /var/lib/FuzzyOcr
else
fowners root:fuzzyocr /var/lib/FuzzyOcr
fperms 770 /var/lib/FuzzyOcr
fi
sed -ie "s:^#focr_digest_db /etc/mail/spamassassin/FuzzyOcr.hashdb:#focr_digest_db /var/lib/FuzzyOcr/FuzzyOcr.hashdb:" FuzzyOcr.cf
sed -ie "s:^#focr_db_hash /etc/mail/spamassassin/FuzzyOcr.db:#focr_db_hash /var/lib/FuzzyOcr/FuzzyOcr.db:" FuzzyOcr.cf
sed -ie "s:^#focr_db_safe /etc/mail/spamassassin/FuzzyOcr.safe.db:#focr_db_safe /var/lib/FuzzyOcr/FuzzyOcr.safe.db:" FuzzyOcr.cf
if ! use amavis ; then
insinto /var/lib/FuzzyOcr/
local hash_files="FuzzyOcr.hashdb FuzzyOcr.db FuzzyOcr.safe.db"
for file in ${hash_files}; do
if [ ! -e /var/lib/FuzzyOcr/${file} ]; then
newins /dev/null ${file}
fperms 660 /var/lib/FuzzyOcr/${file}
fowners root:fuzzyocr /var/lib/FuzzyOcr/${file}
fi
done
fi
fi
insinto /etc/mail/spamassassin/
doins FuzzyOcr.cf
doins FuzzyOcr.words
doins FuzzyOcr.scansets
doins FuzzyOcr.preps
insinto ${VENDOR_LIB}/FuzzyOcr
doins FuzzyOcr/*
docinto samples
dodoc samples/*
}
pkg_postinst() {
elog "You need to restart spamassassin (as root) before this plugin will work:"
elog "/etc/init.d/spamd restart"
echo
if use dbm || use logrotate ; then
local files=""
if use dbm ; then
files="/var/lib/FuzzyOcr"
fi
if use logrotate ; then
if [ -z ${files} ] ; then
files="/var/log/FuzzyOcr.log"
else
files="${files} /var/log/FuzzyOcr.log"
fi
fi
if use amavis ; then
elog "All permissions are set for the user amavis!"
else
elog "Permissions have been set for the fuzzyocr group, to enable"
elog "logging or hashing add any required users to this group"
fi
echo
ewarn "If you run spamassassin as another user, please make sure to"
ewarn "change permissions on" ${files/ / and }
echo
fi
}
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin-fuzzyocr/spamassassin-fuzzyocr-3.5.1.ebuild,v 1.7 2008/08/02 20:38:25 tove Exp $
inherit perl-module eutils
MY_P="${P#spamassassin-}"
DESCRIPTION="SpamAssassin plugin for performing Optical Character Recognition (OCR) on attached images"
HOMEPAGE="http://fuzzyocr.own-hero.net/"
SRC_URI="http://users.own-hero.net/~decoder/fuzzyocr/${MY_P}-devel.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="dbm gocr ocrad tesseract mysql logrotate amavis"
DEPEND="dev-lang/perl
>=mail-filter/spamassassin-3.1.4"
RDEPEND="${DEPEND}
gocr? ( >=app-text/gocr-0.43 )
ocrad? ( >=app-text/ocrad-0.14 )
tesseract? ( app-text/tesseract )
mysql? ( dev-perl/DBD-mysql dev-perl/DBI )
logrotate? ( app-admin/logrotate )
dbm? ( virtual/perl-DB_File dev-perl/MLDBM-Sync virtual/perl-Storable )
media-libs/netpbm
media-libs/giflib
dev-perl/String-Approx
virtual/perl-Time-HiRes
media-gfx/gifsicle"
# postgres? ( dev-perl/DBD-Pg )
S="${WORKDIR}/${MY_P/fuzzyocr/FuzzyOcr}"
pkg_setup() {
if ! use gocr && ! use ocrad && ! use tesseract ; then
eerror
eerror You did not specify an OCR engine. FuzzyOcr requires at least one
eerror OCR engine USE flag to be enabled. It is possible to enable all.
eerror
eerror The 3 OCR engines are: gocr ocrad tesseract
eerror Enable them in /etc/make.conf or /etc/portage/package.use
eerror
die "Configure failed"
fi
# create fuzzyocr group for logging and hashing
if use dbm || use logrotate ; then
use amavis || enewgroup fuzzyocr
fi
}
src_unpack() {
unpack ${A}
cd ${S}
# If no ocrad USE flag, remove it from Fuzzyocr.scansets / jni
use ocrad || epatch "${FILESDIR}"/disableocrad.patch
# If tesseract USE flag is set, enable it in Fuzzyocr.scansets /jni
use tesseract && epatch "${FILESDIR}"/enabletesseract.patch
# If gocr USE flag is unset, enable disable gocr in Fuzzyocr.scansets /jni
use gocr || epatch "${FILESDIR}"/disablegocr.patch
# Apply PgSQL patchset if USE postgres /juan
#use postgres && epatch "${FILESDIR}"/postgresql.patch
}
src_install() {
# called to get ${VENDOR_LIB}
perlinfo
local plugin_dir=${VENDOR_LIB}/Mail/SpamAssassin/Plugin
insinto ${plugin_dir}
doins FuzzyOcr.pm
# Replace location of .pm file in config
sed -ie "s:FuzzyOcr.pm:${plugin_dir}/FuzzyOcr.pm:" FuzzyOcr.cf
# Enable logfile if logrotate
if use logrotate ; then
sed -ie "s:^#focr_verbose 3:focr_verbose 3:" FuzzyOcr.cf
sed -ie "s:^#focr_logfile /tmp/FuzzyOcr.log:focr_logfile /var/log/FuzzyOcr.log:" FuzzyOcr.cf
# Create the logfile with correct permissions /jni
if [ ! -e /var/log/FuzzyOcr.log ]; then
insinto /var/log
newins /dev/null FuzzyOcr.log
if use amavis ; then
fperms 600 /var/log/FuzzyOcr.log
fowners amavis:amavis /var/log/FuzzyOcr.log
else
fperms 660 /var/log/FuzzyOcr.log
fowners root:fuzzyocr /var/log/FuzzyOcr.log
fi
fi
diropts ""
dodir /etc/logrotate.d
insopts -m0644
insinto /etc/logrotate.d
newins ${FILESDIR}/fuzzyocr.logrotate FuzzyOcr
fi
# Create needed dir for dbs and change FuzzyOcr.cf /jni
if use dbm ; then
dodir /var/lib/FuzzyOcr
keepdir /var/lib/FuzzyOcr
if use amavis ; then
fowners amavis:amavis /var/lib/FuzzyOcr
fperms 700 /var/lib/FuzzyOcr
else
fowners root:fuzzyocr /var/lib/FuzzyOcr
fperms 770 /var/lib/FuzzyOcr
fi
sed -ie "s:^#focr_digest_db /etc/mail/spamassassin/FuzzyOcr.hashdb:#focr_digest_db /var/lib/FuzzyOcr/FuzzyOcr.hashdb:" FuzzyOcr.cf
sed -ie "s:^#focr_db_hash /etc/mail/spamassassin/FuzzyOcr.db:#focr_db_hash /var/lib/FuzzyOcr/FuzzyOcr.db:" FuzzyOcr.cf
sed -ie "s:^#focr_db_safe /etc/mail/spamassassin/FuzzyOcr.safe.db:#focr_db_safe /var/lib/FuzzyOcr/FuzzyOcr.safe.db:" FuzzyOcr.cf
if ! use amavis ; then
insinto /var/lib/FuzzyOcr/
local hash_files="FuzzyOcr.hashdb FuzzyOcr.db FuzzyOcr.safe.db"
for file in ${hash_files}; do
if [ ! -e /var/lib/FuzzyOcr/${file} ]; then
newins /dev/null ${file}
fperms 660 /var/lib/FuzzyOcr/${file}
fowners root:fuzzyocr /var/lib/FuzzyOcr/${file}
fi
done
fi
fi
insinto /etc/mail/spamassassin/
doins FuzzyOcr.cf
doins FuzzyOcr.words
doins FuzzyOcr.scansets
doins FuzzyOcr.preps
insinto ${VENDOR_LIB}/FuzzyOcr
doins FuzzyOcr/*
docinto samples
dodoc samples/*
}
pkg_postinst() {
elog "You need to restart spamassassin (as root) before this plugin will work:"
elog "/etc/init.d/spamd restart"
echo
if use dbm || use logrotate ; then
local files=""
if use dbm ; then
files="/var/lib/FuzzyOcr"
fi
if use logrotate ; then
if [ -z ${files} ] ; then
files="/var/log/FuzzyOcr.log"
else
files="${files} /var/log/FuzzyOcr.log"
fi
fi
if use amavis ; then
elog "All permissions are set for the user amavis!"
else
elog "Permissions have been set for the fuzzyocr group, to enable"
elog "logging or hashing add any required users to this group"
fi
echo
ewarn "If you run spamassassin as another user, please make sure to"
ewarn "change permissions on" ${files/ / and }
echo
fi
}