Gentoo Archives: gentoo-commits

From: "Thomas Raschbacher (lordvan)" <lordvan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-antivirus/clamav: clamav-0.95.ebuild ChangeLog
Date: Tue, 31 Mar 2009 13:26:28
Message-Id: E1Lodz0-00018L-4T@stork.gentoo.org
1 lordvan 09/03/31 13:26:26
2
3 Modified: ChangeLog
4 Added: clamav-0.95.ebuild
5 Log:
6 version bump
7 (Portage version: 2.1.6.7/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.322 app-antivirus/clamav/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/ChangeLog?rev=1.322&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/ChangeLog?rev=1.322&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/ChangeLog?r1=1.321&r2=1.322
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v
19 retrieving revision 1.321
20 retrieving revision 1.322
21 diff -u -r1.321 -r1.322
22 --- ChangeLog 8 Dec 2008 19:38:38 -0000 1.321
23 +++ ChangeLog 31 Mar 2009 13:26:26 -0000 1.322
24 @@ -1,6 +1,11 @@
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.321 2008/12/08 19:38:38 ranger Exp $
28 +# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.322 2009/03/31 13:26:26 lordvan Exp $
30 +
31 +*clamav-0.95 (31 Mar 2009)
32 +
33 + 31 Mar 2009; Thomas Raschbacher <lordvan@g.o> +clamav-0.95.ebuild:
34 + version bump
35
36 08 Dec 2008; Brent Baude <ranger@g.o> clamav-0.94.2.ebuild:
37 Marking clamav-0.94.2 ppc64 for bug 249833
38
39
40
41 1.1 app-antivirus/clamav/clamav-0.95.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/clamav-0.95.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/clamav-0.95.ebuild?rev=1.1&content-type=text/plain
45
46 Index: clamav-0.95.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.95.ebuild,v 1.1 2009/03/31 13:26:26 lordvan Exp $
51
52 inherit autotools eutils flag-o-matic fixheadtails multilib versionator
53
54 # for when rc1 is appended to release candidates:
55 MY_PV=$(replace_version_separator 3 '');
56 MY_P="${PN}-${MY_PV}"
57 S="${WORKDIR}/${MY_P}"
58
59 DESCRIPTION="Clam Anti-Virus Scanner"
60 HOMEPAGE="http://www.clamav.net/"
61 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
66 IUSE="bzip2 crypt iconv mailwrapper milter nls selinux ipv6"
67
68 COMMON_DEPEND="bzip2? ( app-arch/bzip2 )
69 crypt? ( >=dev-libs/gmp-4.1.2 )
70 milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
71 iconv? ( virtual/libiconv )
72 nls? ( sys-devel/gettext )
73 dev-libs/gmp
74 >=sys-libs/zlib-1.2.1-r3
75 >=sys-apps/sed-4"
76
77 DEPEND="${COMMON_DEPEND}
78 >=dev-util/pkgconfig-0.20"
79
80 RDEPEND="${COMMON_DEPEND}
81 selinux? ( sec-policy/selinux-clamav )
82 sys-apps/grep"
83
84 PROVIDE="virtual/antivirus"
85
86 RESTRICT="test"
87
88 pkg_setup() {
89 if use milter; then
90 if [ ! -e /usr/$(get_libdir)/libmilter.a ] ; then
91 ewarn "In order to enable milter support, clamav needs sendmail with enabled milter"
92 ewarn "USE flag, or mail-filter/libmilter package."
93 fi
94 fi
95
96 enewgroup clamav
97 enewuser clamav -1 -1 /dev/null clamav
98 }
99
100 src_unpack() {
101 unpack ${A}
102 cd "${S}"
103 # This newer version of ClamAV packages libtool.m4 and lt*.m4 in m4,
104 # while previous versions did not.
105 # Since autoreconf invokes libtoolize, a different version of ltmain.sh that doesn't
106 # match up with the version of the *.m4 files gets thrown into this directory.
107 # This problem showed up for me in the packages libtool's use of $ECHO while my
108 # system's libtool's instead used $echo internally, and the .m4 file provides the value of
109 # $echo or $ECHO.
110 einfo "removing possibly incompatible libtool-related m4 files"
111 rm m4/libtool.m4 m4/lt*.m4 || die "unable to remove possibly incompatible libtool-related m4 files"
112 #epatch "${FILESDIR}"/${PN}-0.94.1-buildfix.patch
113 #epatch "${FILESDIR}"/${PN}-0.94-nls.patch
114
115 # If nls flag is disabled, gettext may not be available, but eautoreconf
116 # needs this file (bug #218892).
117 use nls || cp "${FILESDIR}"/lib-ld.m4 m4/
118
119 AT_M4DIR="m4" eautoreconf
120 }
121
122 src_compile() {
123 has_version =sys-libs/glibc-2.2* && filter-lfs-flags
124
125 local myconf
126
127 # we depend on fixed zlib, so we can disable this check to prevent redundant
128 # warning (bug #61749)
129 myconf="${myconf} --disable-zlib-vcheck"
130 # use id utility instead of /etc/passwd parsing (bug #72540)
131 myconf="${myconf} --enable-id-check"
132 use milter && {
133 myconf="${myconf} --enable-milter"
134 use mailwrapper && \
135 myconf="${myconf} --with-sendmail=/usr/sbin/sendmail.sendmail"
136 }
137
138 ht_fix_file configure
139 econf ${myconf} \
140 $(use_enable bzip2) \
141 $(use_enable nls) \
142 $(use_enable ipv6) \
143 $(use_with iconv) \
144 --disable-experimental \
145 --with-dbdir=/var/lib/clamav || die
146 emake || die
147 }
148
149 src_install() {
150 make DESTDIR="${D}" install || die
151 dodoc AUTHORS BUGS NEWS README ChangeLog FAQ
152 newconfd "${FILESDIR}"/clamd.conf clamd
153 newinitd "${FILESDIR}"/clamd.rc clamd
154 dodoc "${FILESDIR}"/clamav-milter.README.gentoo
155
156 dodir /var/run/clamav
157 keepdir /var/run/clamav
158 fowners clamav:clamav /var/run/clamav
159 dodir /var/log/clamav
160 keepdir /var/log/clamav
161 fowners clamav:clamav /var/log/clamav
162
163 # Change /etc/clamd.conf to be usable out of the box
164 sed -i -e "s:^\(Example\):\# \1:" \
165 -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \
166 -e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \
167 -e "s:.*\(User\) .*:\1 clamav:" \
168 -e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \
169 -e "s:^\#\(LogTime\).*:\1 yes:" \
170 -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
171 "${D}"/etc/clamd.conf
172
173 # Do the same for /etc/freshclam.conf
174 sed -i -e "s:^\(Example\):\# \1:" \
175 -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \
176 -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
177 -e "s:^\#\(UpdateLogFile\) .*:\1 /var/log/clamav/freshclam.log:" \
178 -e "s:^\#\(NotifyClamd\).*:\1 /etc/clamd.conf:" \
179 -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
180 -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
181 "${D}"/etc/freshclam.conf
182
183 if use milter ; then
184 echo "
185 START_MILTER=no
186 MILTER_NICELEVEL=19" \
187 >> "${D}"/etc/conf.d/clamd
188 echo "MILTER_SOCKET=\"/var/run/clamav/clmilter.sock\"" \
189 >>"${D}"/etc/conf.d/clamd
190 echo "MILTER_OPTS=\"-m 10 --timeout=0\"" \
191 >>"${D}"/etc/conf.d/clamd
192 fi
193
194 diropts ""
195 dodir /etc/logrotate.d
196 insopts -m0644
197 insinto /etc/logrotate.d
198 newins "${FILESDIR}"/${PN}.logrotate ${PN}
199 }
200
201 pkg_postinst() {
202 echo
203 if use milter ; then
204 elog "For simple instructions how to setup the clamav-milter"
205 elog "read /usr/share/doc/${PF}/clamav-milter.README.gentoo.gz"
206 echo
207 fi
208 ewarn "The soname for libclamav has changed in clamav-0.94."
209 ewarn "If you have upgraded from that or earlier version, it is"
210 ewarn "recommended to run revdep-rebuild, in order to fix anything"
211 ewarn "that links against libclamav.so library."
212 echo
213 }