Gentoo Archives: gentoo-commits

From: "Michael Orlitzky (mjo)" <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-antivirus/clamav-unofficial-sigs: clamav-unofficial-sigs-3.7.2.ebuild metadata.xml ChangeLog
Date: Fri, 27 Dec 2013 20:06:51
Message-Id: 20131227200646.4EE8A2004C@flycatcher.gentoo.org
1 mjo 13/12/27 20:06:46
2
3 Added: clamav-unofficial-sigs-3.7.2.ebuild metadata.xml
4 ChangeLog
5 Log:
6 New package: app-antivirus/clamav-unofficial-sigs, to download and install third-party clamav signatures. Fixes bug #272872.
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x6F48D3DA05C2DADB!)
9
10 Revision Changes Path
11 1.1 app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild?rev=1.1&content-type=text/plain
15
16 Index: clamav-unofficial-sigs-3.7.2.ebuild
17 ===================================================================
18 # Copyright 1999-2013 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild,v 1.1 2013/12/27 20:06:46 mjo Exp $
21
22 EAPI=5
23
24 DESCRIPTION="Downloads and installs third-party clamav signatures"
25 HOMEPAGE="http://sourceforge.net/projects/unofficial-sigs"
26 SRC_URI="mirror://sourceforge/unofficial-sigs/${P}.tar.gz"
27
28 LICENSE="BSD"
29 SLOT="0"
30 KEYWORDS="~amd64"
31 IUSE=""
32
33 # We need its user/group.
34 DEPEND="app-antivirus/clamav"
35
36 # The script relies on either net-misc/socat, or Perl's
37 # IO::Socket::UNIX. We already depend on Perl, and Gentoo's Perl ships
38 # with IO::Socket::UNIX, so we can leave out net-misc/socat here.
39 RDEPEND="${DEPEND}
40 app-crypt/gnupg
41 dev-lang/perl
42 net-dns/bind-tools
43 net-misc/curl"
44
45 src_prepare() {
46 # First, fix the paths contained in the configuration file. Eventually
47 # these should be moved under /run, but for now we keep them sync'ed
48 # with the default clamd.conf.
49 local pid_default="/var/run/clamd.pid"
50 local pid_gentoo="/var/run/clamav/clamd.pid"
51
52 # clamd listens on a local socket by default. The clamd_socket
53 # setting needs to be uncommented in the configuration file for it
54 # to take effect.
55 local socket_default="#clamd_socket=\"/var/run/clamd.socket\""
56 local socket_gentoo="clamd_socket=\"/var/run/clamav/clamd.sock\""
57
58 sed -i -e '$a\pkg_mgr="emerge"' \
59 -e "\$a\\pkg_rm=\"emerge -C ${PN}\"" \
60 -e "s~${socket_default}~${socket_gentoo}~" \
61 -e "s~${pid_default}~${pid_gentoo}~" \
62 "${PN}.conf" \
63 || die "failed to update paths in the ${PN}.conf file"
64
65 # Now, change the script's working directory to point to
66 # /var/lib/${PN}. We'll need to make this writable by the clamav
67 # user during src_install.
68 sed -i -e "s~/usr/unofficial-dbs~/var/lib/${PN}~" "${PN}.conf" \
69 || die "failed to update the work_dir variable in ${PN}.conf"
70
71 # Tell the script that it's been configured.
72 local cfged_default='user_configuration_complete="no"'
73 local cfged_gentoo='user_configuration_complete="yes"'
74 sed -i "s/${cfged_default}/${cfged_gentoo}/" "${PN}.conf" \
75 || die "failed to set user configuration completed in ${PN}.conf"
76 }
77
78 src_install() {
79 dosbin "${PN}.sh"
80
81 # We set the script's working directory to /var/lib/${PN} in
82 # src_compile, so make sure that the permissions are set correctly
83 # here. By default, it runs as clamav/clamav.
84 diropts -m 0755 -o clamav -g clamav
85 dodir "/var/lib/${PN}"
86
87 insinto /etc/logrotate.d
88 doins "${PN}-logrotate"
89
90 insinto /etc
91 doins "${PN}.conf"
92
93 doman "${PN}.8"
94 dodoc CHANGELOG INSTALL README
95 }
96
97 pkg_postinst() {
98 elog ''
99 elog "You will need to select databases in /etc/${PN}.conf."
100 elog "For details, please see the ${PN}(8) manual page."
101 elog ''
102 elog 'An up-to-date description of the available Sanesecurity'
103 elog 'databases is available at,'
104 elog ''
105 elog ' http://sanesecurity.com/usage/signatures/'
106 elog ''
107 }
108
109
110
111 1.1 app-antivirus/clamav-unofficial-sigs/metadata.xml
112
113 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-antivirus/clamav-unofficial-sigs/metadata.xml?rev=1.1&view=markup
114 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-antivirus/clamav-unofficial-sigs/metadata.xml?rev=1.1&content-type=text/plain
115
116 Index: metadata.xml
117 ===================================================================
118 <?xml version="1.0" encoding="UTF-8"?>
119 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
120 <pkgmetadata>
121 <maintainer>
122 <email>mjo@g.o</email>
123 </maintainer>
124 </pkgmetadata>
125
126
127
128 1.1 app-antivirus/clamav-unofficial-sigs/ChangeLog
129
130 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-antivirus/clamav-unofficial-sigs/ChangeLog?rev=1.1&view=markup
131 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-antivirus/clamav-unofficial-sigs/ChangeLog?rev=1.1&content-type=text/plain
132
133 Index: ChangeLog
134 ===================================================================
135 # ChangeLog for app-antivirus/clamav-unofficial-sigs
136 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
137 # $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav-unofficial-sigs/ChangeLog,v 1.1 2013/12/27 20:06:46 mjo Exp $
138
139 *clamav-unofficial-sigs-3.7.2 (27 Dec 2013)
140
141 27 Dec 2013; Michael Orlitzky <mjo@g.o>
142 +clamav-unofficial-sigs-3.7.2.ebuild, +metadata.xml:
143 New package: app-antivirus/clamav-unofficial-sigs, to download and install
144 third-party clamav signatures. Fixes bug #272872.