1 |
voyageur 10/07/29 21:15:43 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: spamassassin-fuzzyocr-3.6.0-r2.ebuild |
5 |
Removed: spamassassin-fuzzyocr-3.6.0-r1.ebuild |
6 |
Log: |
7 |
Update untaint patch, hope this finally fixes bug #313633 |
8 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.22 mail-filter/spamassassin-fuzzyocr/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/spamassassin-fuzzyocr/ChangeLog?rev=1.22&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/spamassassin-fuzzyocr/ChangeLog?rev=1.22&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/spamassassin-fuzzyocr/ChangeLog?r1=1.21&r2=1.22 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/mail-filter/spamassassin-fuzzyocr/ChangeLog,v |
20 |
retrieving revision 1.21 |
21 |
retrieving revision 1.22 |
22 |
diff -u -r1.21 -r1.22 |
23 |
--- ChangeLog 19 May 2010 15:22:39 -0000 1.21 |
24 |
+++ ChangeLog 29 Jul 2010 21:15:43 -0000 1.22 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for mail-filter/spamassassin-fuzzyocr |
27 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin-fuzzyocr/ChangeLog,v 1.21 2010/05/19 15:22:39 voyageur Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin-fuzzyocr/ChangeLog,v 1.22 2010/07/29 21:15:43 voyageur Exp $ |
30 |
+ |
31 |
+*spamassassin-fuzzyocr-3.6.0-r2 (29 Jul 2010) |
32 |
+ |
33 |
+ 29 Jul 2010; Bernard Cafarelli <voyageur@g.o> |
34 |
+ -spamassassin-fuzzyocr-3.6.0-r1.ebuild, |
35 |
+ +spamassassin-fuzzyocr-3.6.0-r2.ebuild, |
36 |
+ files/spamassassin-fuzzyocr-3.6.0-untaint_ocr_helper.patch: |
37 |
+ Update untaint patch, hope this finally fixes bug #313633 |
38 |
|
39 |
*spamassassin-fuzzyocr-3.6.0-r1 (19 May 2010) |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
1.1 mail-filter/spamassassin-fuzzyocr/spamassassin-fuzzyocr-3.6.0-r2.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/spamassassin-fuzzyocr/spamassassin-fuzzyocr-3.6.0-r2.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-filter/spamassassin-fuzzyocr/spamassassin-fuzzyocr-3.6.0-r2.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: spamassassin-fuzzyocr-3.6.0-r2.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2010 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin-fuzzyocr/spamassassin-fuzzyocr-3.6.0-r2.ebuild,v 1.1 2010/07/29 21:15:43 voyageur Exp $ |
54 |
|
55 |
EAPI=2 |
56 |
inherit perl-module eutils |
57 |
|
58 |
MY_P="${P#spamassassin-}" |
59 |
|
60 |
DESCRIPTION="SpamAssassin plugin for performing Optical Character Recognition (OCR) on attached images" |
61 |
HOMEPAGE="http://fuzzyocr.own-hero.net/" |
62 |
SRC_URI="http://users.own-hero.net/~decoder/fuzzyocr/${MY_P}.tar.gz" |
63 |
|
64 |
LICENSE="Apache-2.0" |
65 |
SLOT="0" |
66 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" |
67 |
IUSE="dbm gocr ocrad tesseract mysql logrotate amavis" |
68 |
|
69 |
DEPEND="dev-lang/perl |
70 |
dev-perl/Tie-Cache |
71 |
>=mail-filter/spamassassin-3.2.0" |
72 |
|
73 |
RDEPEND="${DEPEND} |
74 |
gocr? ( >=app-text/gocr-0.43 ) |
75 |
ocrad? ( >=app-text/ocrad-0.14 ) |
76 |
tesseract? ( app-text/tesseract ) |
77 |
!gocr? ( !ocrad? ( !tesseract? ( >=app-text/ocrad-0.14 ) ) ) |
78 |
mysql? ( dev-perl/DBD-mysql dev-perl/DBI ) |
79 |
logrotate? ( app-admin/logrotate ) |
80 |
dbm? ( virtual/perl-DB_File dev-perl/MLDBM-Sync virtual/perl-Storable ) |
81 |
media-libs/netpbm[jpeg,png,tiff] |
82 |
media-libs/giflib |
83 |
dev-perl/String-Approx |
84 |
virtual/perl-Time-HiRes |
85 |
media-gfx/gifsicle" |
86 |
# postgres? ( dev-perl/DBD-Pg ) |
87 |
|
88 |
S="${WORKDIR}/${MY_P/fuzzyocr/FuzzyOcr}" |
89 |
|
90 |
pkg_setup() { |
91 |
if ! use gocr && ! use ocrad && ! use tesseract ; then |
92 |
ewarn You did not specify an OCR engine. They can be |
93 |
ewarn enabled/disabled via the USE flags: |
94 |
ewarn gocr ocrad tesseract |
95 |
ewarn Defaulting to ocrad |
96 |
fi |
97 |
|
98 |
# create fuzzyocr group for logging and hashing |
99 |
if use dbm || use logrotate ; then |
100 |
use amavis || enewgroup fuzzyocr |
101 |
fi |
102 |
} |
103 |
|
104 |
src_prepare() { |
105 |
# Bug #174993 |
106 |
epatch "${FILESDIR}"/${P}-fix_falsepositives.patch |
107 |
# Bug #273183 |
108 |
epatch "${FILESDIR}"/${P}-fix_tmpdir.patch |
109 |
# Bug #313633 |
110 |
epatch "${FILESDIR}"/${P}-untaint_ocr_helper.patch |
111 |
|
112 |
# If no ocrad USE flag, remove it from Fuzzyocr.scansets / jni |
113 |
use ocrad || epatch "${FILESDIR}"/disableocrad.patch |
114 |
|
115 |
# If tesseract USE flag is set, enable it in Fuzzyocr.scansets /jni |
116 |
use tesseract && epatch "${FILESDIR}"/enabletesseract.patch |
117 |
|
118 |
# If gocr USE flag is unset, enable disable gocr in Fuzzyocr.scansets /jni |
119 |
use gocr || epatch "${FILESDIR}"/disablegocr.patch |
120 |
|
121 |
# Apply PgSQL patchset if USE postgres /juan |
122 |
#use postgres && epatch "${FILESDIR}"/postgresql.patch |
123 |
} |
124 |
|
125 |
src_install() { |
126 |
# called to get ${VENDOR_LIB} |
127 |
perlinfo |
128 |
|
129 |
local plugin_dir=${VENDOR_LIB}/Mail/SpamAssassin/Plugin |
130 |
|
131 |
insinto ${plugin_dir} |
132 |
doins FuzzyOcr.pm |
133 |
|
134 |
# Replace location of .pm file in config |
135 |
sed -ie "s:FuzzyOcr.pm:${plugin_dir}/FuzzyOcr.pm:" FuzzyOcr.cf |
136 |
|
137 |
# Enable logfile if logrotate |
138 |
if use logrotate ; then |
139 |
sed -ie "s:^#focr_verbose 3:focr_verbose 3:" FuzzyOcr.cf |
140 |
sed -ie "s:^#focr_logfile /tmp/FuzzyOcr.log:focr_logfile /var/log/FuzzyOcr.log:" FuzzyOcr.cf |
141 |
|
142 |
# Create the logfile with correct permissions /jni |
143 |
if [ ! -e /var/log/FuzzyOcr.log ]; then |
144 |
insinto /var/log |
145 |
newins /dev/null FuzzyOcr.log |
146 |
if use amavis ; then |
147 |
fperms 600 /var/log/FuzzyOcr.log |
148 |
fowners amavis:amavis /var/log/FuzzyOcr.log |
149 |
else |
150 |
fperms 660 /var/log/FuzzyOcr.log |
151 |
fowners root:fuzzyocr /var/log/FuzzyOcr.log |
152 |
fi |
153 |
fi |
154 |
|
155 |
diropts "" |
156 |
dodir /etc/logrotate.d |
157 |
insopts -m0644 |
158 |
insinto /etc/logrotate.d |
159 |
newins "${FILESDIR}"/fuzzyocr.logrotate FuzzyOcr |
160 |
fi |
161 |
|
162 |
# Create needed dir for dbs and change FuzzyOcr.cf /jni |
163 |
if use dbm ; then |
164 |
dodir /var/lib/FuzzyOcr |
165 |
keepdir /var/lib/FuzzyOcr |
166 |
if use amavis ; then |
167 |
fowners amavis:amavis /var/lib/FuzzyOcr |
168 |
fperms 700 /var/lib/FuzzyOcr |
169 |
else |
170 |
fowners root:fuzzyocr /var/lib/FuzzyOcr |
171 |
fperms 770 /var/lib/FuzzyOcr |
172 |
fi |
173 |
|
174 |
sed -ie "s:^#focr_digest_db /etc/mail/spamassassin/FuzzyOcr.hashdb:#focr_digest_db /var/lib/FuzzyOcr/FuzzyOcr.hashdb:" FuzzyOcr.cf |
175 |
sed -ie "s:^#focr_db_hash /etc/mail/spamassassin/FuzzyOcr.db:#focr_db_hash /var/lib/FuzzyOcr/FuzzyOcr.db:" FuzzyOcr.cf |
176 |
sed -ie "s:^#focr_db_safe /etc/mail/spamassassin/FuzzyOcr.safe.db:#focr_db_safe /var/lib/FuzzyOcr/FuzzyOcr.safe.db:" FuzzyOcr.cf |
177 |
|
178 |
if ! use amavis ; then |
179 |
insinto /var/lib/FuzzyOcr/ |
180 |
|
181 |
local hash_files="FuzzyOcr.hashdb FuzzyOcr.db FuzzyOcr.safe.db" |
182 |
|
183 |
for file in ${hash_files}; do |
184 |
if [ ! -e /var/lib/FuzzyOcr/${file} ]; then |
185 |
newins /dev/null ${file} |
186 |
fperms 660 /var/lib/FuzzyOcr/${file} |
187 |
fowners root:fuzzyocr /var/lib/FuzzyOcr/${file} |
188 |
fi |
189 |
done |
190 |
fi |
191 |
fi |
192 |
|
193 |
insinto /etc/mail/spamassassin/ |
194 |
|
195 |
doins FuzzyOcr.cf |
196 |
doins FuzzyOcr.words |
197 |
doins FuzzyOcr.scansets |
198 |
doins FuzzyOcr.preps |
199 |
insinto ${VENDOR_LIB}/FuzzyOcr |
200 |
doins FuzzyOcr/* |
201 |
|
202 |
docinto samples |
203 |
dodoc samples/* |
204 |
} |
205 |
|
206 |
pkg_postinst() { |
207 |
elog "You need to restart spamassassin (as root) before this plugin will work:" |
208 |
elog "/etc/init.d/spamd restart" |
209 |
echo |
210 |
if use dbm || use logrotate ; then |
211 |
local files="" |
212 |
|
213 |
if use dbm ; then |
214 |
files="/var/lib/FuzzyOcr" |
215 |
fi |
216 |
|
217 |
if use logrotate ; then |
218 |
if [ -z ${files} ] ; then |
219 |
files="/var/log/FuzzyOcr.log" |
220 |
else |
221 |
files="${files} /var/log/FuzzyOcr.log" |
222 |
fi |
223 |
fi |
224 |
|
225 |
if use amavis ; then |
226 |
elog "All permissions are set for the user amavis!" |
227 |
else |
228 |
elog "Permissions have been set for the fuzzyocr group, to enable" |
229 |
elog "logging or hashing add any required users to this group" |
230 |
fi |
231 |
|
232 |
echo |
233 |
ewarn "If you run spamassassin as another user, please make sure to" |
234 |
ewarn "change permissions on" ${files/ / and } |
235 |
echo |
236 |
fi |
237 |
} |