X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mjo-overlay.git;a=blobdiff_plain;f=app-antivirus%2Fclamav-unofficial-sigs%2Fclamav-unofficial-sigs-3.7.2.ebuild;h=043ff52711e712ecf4d2ab5b096f97cf5c8ba8ed;hp=0cc6c61de0a750ef1ac3bce780e966d398407cf1;hb=ddeae2b68e9a58a1cf9d74995ba209e9c1a35d2f;hpb=75da6eebc0e779e7fa9aa633b6faccaa3144e419 diff --git a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild index 0cc6c61..043ff52 100644 --- a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild +++ b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild @@ -25,11 +25,17 @@ RDEPEND="${DEPEND} net-misc/curl" src_compile() { - # First, fix the paths contained in the configuration file. + # First, fix the paths contained in the configuration file. Eventually + # these should be moved under /run, but for now we keep them sync'ed + # with the default clamd.conf. local pid_default="/var/run/clamd.pid" - local pid_gentoo="/run/clamav/clamd.pid" - local socket_default="/var/run/clamd.socket" - local socket_gentoo="/run/clamav/clamd.sock" + local pid_gentoo="/var/run/clamav/clamd.pid" + + # clamd listens on a local socket by default. The clamd_socket + # setting needs to be uncommented in the configuration file for it + # to take effect. + local socket_default="#clamd_socket=\"/var/run/clamd.socket\"" + local socket_gentoo="clamd_socket=\"/var/run/clamav/clamd.sock\"" sed -i -e '$a\pkg_mgr="emerge"' \ -e "\$a\\pkg_rm=\"emerge -C ${PN}\"" \ @@ -42,7 +48,13 @@ src_compile() { # /var/lib/${PN}. We'll need to make this writable by the clamav # user during src_install. sed -i -e "s~/usr/unofficial-dbs~/var/lib/${PN}~" "${PN}.conf" \ - || die 'failed to update the work_dir variable' + || die "failed to update the work_dir variable in ${PN}.conf" + + # Tell the script that it's been configured. + local cfged_default='user_configuration_complete="no"' + local cfged_gentoo='user_configuration_complete="yes"' + sed -i "s/${cfged_default}/${cfged_gentoo}/" "${PN}.conf" \ + || die "failed to set user configuration completed in ${PN}.conf" } src_install() { @@ -65,14 +77,13 @@ src_install() { } pkg_postinst() { - elog "You will need to set up your /etc/${PN}.conf file." + elog '' + elog "You will need to select databases in /etc/${PN}.conf." elog "For details, please see the ${PN}(8) manual page." - elog "" - elog "Don't forget to set user_configuration_complete=\"yes\"." - elog "" - elog "An up-to-date description of the available SaneSecurity" - elog "databases is available at," - elog "" - elog " http://sanesecurity.com/usage/signatures/" - elog "" + elog '' + elog 'An up-to-date description of the available Sanesecurity' + elog 'databases is available at,' + elog '' + elog ' http://sanesecurity.com/usage/signatures/' + elog '' }