Gentoo Archives: gentoo-commits

From: "Andrej Kacian (ticho)" <ticho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-antivirus/clamav: ChangeLog clamav-0.92.1-r1.ebuild
Date: Fri, 29 Feb 2008 23:46:49
Message-Id: E1JVEwA-0003ca-Q5@stork.gentoo.org
1 ticho 08/02/29 23:46:46
2
3 Modified: ChangeLog
4 Added: clamav-0.92.1-r1.ebuild
5 Log:
6 Add support for setting process niceness in conf.d file. Suggestion by Jens Weibler <gentoo-bugzilla at jensthebrain de>, bug #211397.
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.282 app-antivirus/clamav/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/ChangeLog?rev=1.282&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/ChangeLog?rev=1.282&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/ChangeLog?r1=1.281&r2=1.282
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v
19 retrieving revision 1.281
20 retrieving revision 1.282
21 diff -u -r1.281 -r1.282
22 --- ChangeLog 23 Feb 2008 22:37:23 -0000 1.281
23 +++ ChangeLog 29 Feb 2008 23:46:46 -0000 1.282
24 @@ -1,6 +1,13 @@
25 # ChangeLog for app-antivirus/clamav
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.281 2008/02/23 22:37:23 ticho Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.282 2008/02/29 23:46:46 ticho Exp $
29 +
30 +*clamav-0.92.1-r1 (29 Feb 2008)
31 +
32 + 29 Feb 2008; Andrej Kacian <ticho@g.o> files/clamd.conf,
33 + files/clamd.rc, +clamav-0.92.1-r1.ebuild:
34 + Add support for setting process niceness in conf.d file. Suggestion by Jens
35 + Weibler <gentoo-bugzilla at jensthebrain de>, bug #211397.
36
37 23 Feb 2008; Andrej Kacian <ticho@g.o> clamav-0.92.1.ebuild:
38 Enable AllowSupplementaryGroups option by default for better integration
39
40
41
42 1.1 app-antivirus/clamav/clamav-0.92.1-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/clamav-0.92.1-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/clamav-0.92.1-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: clamav-0.92.1-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.92.1-r1.ebuild,v 1.1 2008/02/29 23:46:46 ticho Exp $
52
53 inherit autotools eutils flag-o-matic fixheadtails multilib
54
55 DESCRIPTION="Clam Anti-Virus Scanner"
56 HOMEPAGE="http://www.clamav.net/"
57 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
58
59 LICENSE="GPL-2"
60 SLOT="0"
61 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
62 IUSE="bzip2 crypt mailwrapper milter nls selinux"
63
64 DEPEND="virtual/libc
65 bzip2? ( app-arch/bzip2 )
66 crypt? ( >=dev-libs/gmp-4.1.2 )
67 milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
68 nls? ( sys-devel/gettext )
69 dev-libs/gmp
70 >=sys-libs/zlib-1.2.1-r3
71 >=sys-apps/sed-4"
72 RDEPEND="${DEPEND}
73 selinux? ( sec-policy/selinux-clamav )
74 sys-apps/grep"
75 PROVIDE="virtual/antivirus"
76
77 pkg_setup() {
78 if use milter; then
79 if [ ! -e /usr/$(get_libdir)/libmilter.a ] ; then
80 ewarn "In order to enable milter support, clamav needs sendmail with enabled milter"
81 ewarn "USE flag, or mail-filter/libmilter package."
82 fi
83 fi
84
85 enewgroup clamav
86 enewuser clamav -1 -1 /dev/null clamav
87 }
88
89 src_unpack() {
90 unpack ${A}
91 cd "${S}"
92 epatch "${FILESDIR}"/${PN}-0.90-nls.patch
93 eautoreconf
94 }
95
96 src_compile() {
97 has_version =sys-libs/glibc-2.2* && filter-lfs-flags
98
99 local myconf
100
101 # we depend on fixed zlib, so we can disable this check to prevent redundant
102 # warning (bug #61749)
103 myconf="${myconf} --disable-zlib-vcheck"
104 # use id utility instead of /etc/passwd parsing (bug #72540)
105 myconf="${myconf} --enable-id-check"
106 use milter && {
107 myconf="${myconf} --enable-milter"
108 use mailwrapper && \
109 myconf="${myconf} --with-sendmail=/usr/sbin/sendmail.sendmail"
110 }
111
112 ht_fix_file configure
113 econf ${myconf} \
114 $(use_enable bzip2) \
115 $(use_enable nls) \
116 --disable-experimental \
117 --with-dbdir=/var/lib/clamav || die
118 emake || die
119 }
120
121 src_install() {
122 make DESTDIR="${D}" install || die
123 dodoc AUTHORS BUGS NEWS README ChangeLog FAQ
124 newconfd "${FILESDIR}"/clamd.conf clamd
125 newinitd "${FILESDIR}"/clamd.rc clamd
126 dodoc "${FILESDIR}"/clamav-milter.README.gentoo
127
128 dodir /var/run/clamav
129 keepdir /var/run/clamav
130 fowners clamav:clamav /var/run/clamav
131 dodir /var/log/clamav
132 keepdir /var/log/clamav
133 fowners clamav:clamav /var/log/clamav
134
135 # Change /etc/clamd.conf to be usable out of the box
136 sed -i -e "s:^\(Example\):\# \1:" \
137 -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \
138 -e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \
139 -e "s:.*\(User\) .*:\1 clamav:" \
140 -e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \
141 -e "s:^\#\(LogTime\).*:\1 yes:" \
142 -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
143 "${D}"/etc/clamd.conf
144
145 # Do the same for /etc/freshclam.conf
146 sed -i -e "s:^\(Example\):\# \1:" \
147 -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \
148 -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
149 -e "s:^\#\(UpdateLogFile\) .*:\1 /var/log/clamav/freshclam.log:" \
150 -e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:" \
151 -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
152 -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
153 "${D}"/etc/freshclam.conf
154
155 if use milter ; then
156 echo "
157 START_MILTER=no
158 MILTER_NICELEVEL=19" \
159 >> "${D}"/etc/conf.d/clamd
160 echo "MILTER_SOCKET=\"/var/run/clamav/clmilter.sock\"" \
161 >>"${D}"/etc/conf.d/clamd
162 echo "MILTER_OPTS=\"-m 10 --timeout=0\"" \
163 >>"${D}"/etc/conf.d/clamd
164 fi
165
166 diropts ""
167 dodir /etc/logrotate.d
168 insopts -m0644
169 insinto /etc/logrotate.d
170 newins "${FILESDIR}"/${PN}.logrotate ${PN}
171 }
172
173 pkg_postinst() {
174 echo
175 if use milter ; then
176 elog "For simple instructions how to setup the clamav-milter"
177 elog "read /usr/share/doc/${PF}/clamav-milter.README.gentoo.gz"
178 echo
179 fi
180 ewarn "WARNING: In 0.92.1, the logic in the scanner limits have been reworked. This"
181 ewarn "results in different command line options to clamscan, different config"
182 ewarn "options to clamd and, overall, a different behaviour."
183 echo
184 ewarn "The soname for libclamav has changed in clamav-0.92."
185 ewarn "If you have upgraded from that or earlier version, it is recommended to run:"
186 ewarn "\trevdep-rebuild --library libclamav.so.2"
187 ewarn "This will fix linking errors caused by this change."
188 echo
189 }
190
191
192
193 --
194 gentoo-commits@l.g.o mailing list