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