Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-filter/assp: ChangeLog assp-1.6.5.0.ebuild
Date: Sun, 21 Feb 2010 12:26:06
Message-Id: E1NjAss-0001Lv-Fw@stork.gentoo.org
1 patrick 10/02/21 12:26:02
2
3 Modified: ChangeLog
4 Added: assp-1.6.5.0.ebuild
5 Log:
6 Bump for #302887, thanks to dabbott for the fixes
7 (Portage version: 2.2_rc63/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.31 mail-filter/assp/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/assp/ChangeLog?rev=1.31&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/assp/ChangeLog?rev=1.31&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/assp/ChangeLog?r1=1.30&r2=1.31
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/mail-filter/assp/ChangeLog,v
19 retrieving revision 1.30
20 retrieving revision 1.31
21 diff -u -r1.30 -r1.31
22 --- ChangeLog 19 Dec 2009 18:54:45 -0000 1.30
23 +++ ChangeLog 21 Feb 2010 12:26:01 -0000 1.31
24 @@ -1,6 +1,11 @@
25 # ChangeLog for mail-filter/assp
26 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/assp/ChangeLog,v 1.30 2009/12/19 18:54:45 vostorga Exp $
28 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/assp/ChangeLog,v 1.31 2010/02/21 12:26:01 patrick Exp $
30 +
31 +*assp-1.6.5.0 (21 Feb 2010)
32 +
33 + 21 Feb 2010; Patrick Lauer <patrick@g.o> +assp-1.6.5.0.ebuild:
34 + Bump for #302887, thanks to dabbott for the fixes
35
36 19 Dec 2009; VĂ­ctor Ostorga <vostorga@g.o> assp-1.3.3.8-r2.ebuild:
37 Fixing wrong dohtml path, bug #297414
38
39
40
41 1.1 mail-filter/assp/assp-1.6.5.0.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/assp/assp-1.6.5.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/mail-filter/assp/assp-1.6.5.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: assp-1.6.5.0.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/mail-filter/assp/assp-1.6.5.0.ebuild,v 1.1 2010/02/21 12:26:01 patrick Exp $
51
52 inherit eutils
53
54 DESCRIPTION="Anti-Spam SMTP Proxy written in Perl."
55 HOMEPAGE="http://assp.sourceforge.net/"
56 MY_PN=ASSP_${PV}-Install
57 SRC_URI="mirror://sourceforge/${PN}/${MY_PN}.zip"
58 LICENSE="GPL-2"
59 SLOT="0"
60
61 KEYWORDS="~amd64 ~x86"
62
63 IUSE="ldap spf srs"
64
65 DEPEND="app-arch/unzip"
66
67 RDEPEND="dev-lang/perl
68 dev-perl/Net-DNS
69 dev-perl/File-ReadBackwards
70 virtual/perl-IO-Compress
71 dev-perl/Email-Valid
72 dev-perl/libwww-perl
73 virtual/perl-Digest-MD5
74 virtual/perl-Time-HiRes
75 spf? ( dev-perl/Mail-SPF )
76 srs? ( dev-perl/Mail-SRS )
77 ldap? ( dev-perl/perl-ldap )"
78
79 S=${WORKDIR}/${MY_PN}/ASSP
80
81 pkg_setup() {
82 enewgroup assp
83 enewuser assp -1 -1 /dev/null assp
84 }
85
86 src_unpack() {
87 unpack ${A}
88 cd "${S}"
89
90 local FILES="
91 assp.pl
92 move2num.pl
93 rebuildspamdb.pl
94 stat.pl
95 "
96 # just being safe
97 for file in ${FILES}; do
98 edos2unix ${file}
99 done
100
101 # portable changes via sed vs patch
102 sed -i -e 's|file:files/|file:/etc/assp/|' \
103 -e 's|$base/images|/usr/share/assp/images|' \
104 -e 's|logs/maillog.txt|/var/log/assp/maillog.txt|' \
105 -e 's|PID File'\'',40,textinput,'\''pid'\''|PID File'\'',40,textinput,'\''asspd.pid'\''|' \
106 -e 's|Daemon\*\*'\'',0,checkbox,0|Daemon\*\*'\'',0,checkbox,1|' \
107 -e 's|UID\*\*'\'',20,textinput,'\'''\''|UID\*\*'\'',20,textinput,'\''assp'\''|' \
108 -e 's|GID\*\*'\'',20,textinput,'\'''\''|GID\*\*'\'',20,textinput,'\''assp'\''|' \
109 -e 's|popFileEditor'\('\\'\''pb/pbdb\.\([^\.]*\)\.db\\'\'',|popFileEditor(\\'\''/var/lib/assp/pb/pbdb.\1.db\\'\'',|g' \
110 -e 's|$base/assp.cfg|/etc/assp/assp.cfg|g' \
111 -e 's|$base/$pidfile|/var/run/assp/asspd.pid|' \
112 -e 's|mkdir "$base/$logdir",0700 if $logdir;||' \
113 -e 's|mkdir "$base/$logdir",0700;||' \
114 -e 's|$base/$logfile|$logfile|' \
115 -e 's|$base/$logdir|$logdir|' \
116 -e 's|"maillog.log"|"/var/log/assp/maillog.log"|' \
117 -e 's|-d "$base/logs" or mkdir "$base/logs",0700;||' \
118 -e 's|-d "$base/notes" or mkdir "$base/notes",0700;||' \
119 -e 's|-d "$base/docs" or mkdir "$base/docs",0777;||' \
120 -e 's|$base/$archivelogfile|$archivelogfile|' \
121 -e 's|"$base/$file",$sub,"$this|"/etc/assp/$file",$sub,"$this|' \
122 -e 's|"$base/$file",'\'''\'',"$this|"/etc/assp/$file",'\'''\'',"$this|' \
123 -e 's|my $fil=$1; $fil="$base/$fil" if $fil!~/^\\Q$base\\E/i;|my $fil=$1;|' \
124 -e 's|$fil="$base/$fil" if $fil!~/^\\Q$base\\E/i;|$fil="/etc/assp/$fil" if $fil!~/^\\/etc\\/assp\\/\|\\/var\\/lib\\/assp\\/\/i;|' \
125 -e 's|$fil="$base/$fil" if $fil!~/^((\[a-z\]:)?\[\\/\\\\\]\|\\Q$base\\E)/;||' \
126 -e 's|if ($fil !~ /^\\Q$base\\E/i) {|if ($fil !~ /^\\/usr\\/share\\/assp\\//i) {|' \
127 -e 's|$fil="$base/$fil";|$fil="/usr/share/assp/$fil";|' \
128 -e 's|Q$base\\E|Q\\/etc\\/assp\\/\\E|' \
129 -e 's|$fil="$base/$fil"|$fil="/etc/assp/$fil"|' \
130 -e 's|$base/$bf|/etc/assp/$bf|g' \
131 -e 's|rebuildrun.txt|/var/lib/assp/rebuildrun.txt|' \
132 assp.pl || die
133
134 # questionable stuff
135 # -e 's|$fil="$base/$fil" if $fil!~/^\\Q$base\\E/i;|$fil="/etc/assp/$fil" if $fil!~/^\\Q\\/etc\\/assp\\/\\E/i;|' \
136 # -e 's|if ($fil !~ /^\\Q$base\\E/i) {|if ($fil !~ /^\\Q\\/usr\\/share\\/assp\\/\\E/i) {|' \
137 # -e 's|split('\'' '\'', $this|split('\''$base/'\'', $this|' \
138 # -e 's|split('\'' '\'',lc|split('\''$base/'\'',lc|' \
139 # -e 's|split('\'' '\'',$pat)|split('\''$base/'\'',$pat)|' \
140
141 # sed move2num.pl
142 sed -i -e 's|assp.cfg|/etc/assp/assp.cfg|' move2num.pl || die
143
144 # sed rebuildspamdb.pl
145 sed -i -e 's|assp.cfg|/etc/assp/assp.cfg|' \
146 -e 's|} && "$Config{base}/$Config{logfile}" \|\| '\''maillog.txt'\'';|};|' \
147 -e 's|tmaxtick('\''rebuild'\'');|tmaxtick('\''/var/lib/assp/rebuild'\'');|' \
148 -e 's|goodhosts|/var/lib/assp/goodhosts|g' \
149 -e 's|rebuildrun.txt|/var/lib/assp/rebuildrun.txt|' \
150 rebuildspamdb.pl || die
151
152 # remove windows stuff
153 rm "${S}/addservice.pl" || die "Could not remove ${S}/addservice.pl"
154 rm -f "${S}/Win32-quickstart-guide.txt" || die "Could not remove ${S}/Win32-quickstart-guide.txt"
155 }
156
157 src_install() {
158 # Configuration directory
159 dodir /etc/assp/notes
160
161 insinto /etc/assp
162 # Installs files that are used by assp for black/gray lists,
163 # and domain country lookup. To be changed by admin as needed.
164 doins files/*.txt || die
165
166 fowners assp:assp /etc/assp -R
167 fperms 770 /etc/assp /etc/assp/notes
168
169 # Setup directories for mail to be stored for filter
170 keepdir /var/lib/assp/spam /var/lib/assp/notspam
171 keepdir /var/lib/assp/errors/spam /var/lib/assp/errors/notspam
172
173 # Logs directory
174 keepdir /var/log/assp
175 fowners assp:assp -R /var/log/assp
176 fperms 770 /var/log/assp
177
178 # Install the app
179 exeinto /usr/share/assp
180 doexe *.pl *.sh || die
181 insinto /usr/share/assp
182 doins -r images/ || die
183
184 # Lock down the files/data
185 fowners assp:assp -R /usr/share/assp
186 fperms 770 /usr/share/assp
187
188 # Data storage
189 fowners assp:assp -R /var/lib/assp
190 fperms 770 /var/lib/assp
191
192 # PID directory
193 dodir /var/run/assp
194 keepdir /var/run/assp
195 fowners assp:assp -R /var/run/assp
196 fperms 770 /var/run/assp
197
198 # Install the init.d script to listen
199 newinitd "${FILESDIR}/asspd.init" asspd
200
201 dohtml docs/*.htm || die "Failed to install html docs"
202 }
203
204 pkg_postinst() {
205 elog
206 elog "To configure ASSP, start /etc/init.d/asspd then point"
207 elog "your browser to http://localhost:55555"
208 elog "Username: admin Password: nospam4me (CHANGE ASAP!)"
209 elog
210 elog "File permissions have been set to use assp:assp"
211 elog "with mode 770 on directories. When you configure"
212 elog "ASSP, make sure and use the user assp."
213 elog
214 elog "Don't change any path related options."
215 elog
216 elog "See the on-line docs for a complete tutorial."
217 elog "http://assp.sourceforge.net/docs.html"
218 elog
219 elog "If upgrading, please update your old config to set both"
220 elog "redre.txt and nodelay.txt path of /etc/assp. There are"
221 elog "also many new options that you should review."
222 elog
223 }