Skip to content

Instantly share code, notes, and snippets.

@jaypeche
Created November 30, 2014 22:16
Show Gist options
  • Save jaypeche/c8355c97764c63fb82e2 to your computer and use it in GitHub Desktop.
Save jaypeche/c8355c97764c63fb82e2 to your computer and use it in GitHub Desktop.
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
EAPI="4"
inherit eutils linux-info
DESCRIPTION="clamav-realtime: ClamAV realtime scanner"
HOMEPAGE="http://wiki.pingwho.org"
SRC_URI="http://www.pingwho.org/pub/gentoo/ftp/overlay/distfiles/${P}.tar.bz2"
RESTRICT="nomirror"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+X +gtk"
DEPEND="sys-libs/glibc
x11-libs/gtk+
>=x11-libs/libnotify-0.7.5-r1
>=app-antivirus/clamav-0.97.8-r2
>=sys-fs/inotify-tools-3.13-r1"
RDEPEND="${DEPEND}"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${P}-gentoo.diff" || die "epatch failed !"
}
pkg_setup() {
if ! linux_config_exists; then
eerror "Kernel configuration file doesn't exist."
elif ! linux_chkconfig_present INOTIFY_USER; then
eerror "WARNING : CONFIG_INOTIFY_USER not enabled in kernel."
fi
}
src_compile() {
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
emake || die "emake failed"
fi
}
src_install() {
emake DESTDIR="${D}" install || die "Install failed"
dodoc INSTALL README TODO ChangeLog Copying || die "dodoc failed"
}
pkg_postinst() {
einfo
einfo "NOTE: clamav-realtime was installed in /usr/local/bin"
einfo " For security, and for a better graphical integration,"
einfo " it must be run as user !"
einfo
}
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
EAPI="4"
inherit eutils linux-info
DESCRIPTION="clamav-realtime: ClamAV realtime scanner"
HOMEPAGE="http://wiki.pingwho.org"
SRC_URI="http://www.pingwho.org/pub/gentoo/ftp/overlay/distfiles/${P}.tar.xz"
RESTRICT="nomirror"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+X +gtk"
DEPEND="sys-libs/glibc
x11-libs/gtk+
>=x11-libs/libnotify-0.7.5-r1
>=app-antivirus/clamav-0.97.8-r2
>=sys-fs/inotify-tools-3.13-r1"
RDEPEND="${DEPEND}"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${P}-gentoo.patch" || die "epatch failed !"
}
pkg_setup() {
if ! linux_config_exists; then
eerror "Kernel configuration file doesn't exist."
elif ! linux_chkconfig_present INOTIFY_USER; then
eerror "WARNING : CONFIG_INOTIFY_USER not enabled in kernel."
fi
}
src_compile() {
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
emake || die "emake failed"
fi
}
src_install() {
emake DESTDIR="${D}" install || die "Install failed"
}
pkg_postinst() {
einfo
einfo "NOTE: clamav-realtime was installed in /usr/local/bin"
einfo " For security, and for a better graphical integration,"
einfo " it must be run as user !"
einfo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment