| 1 |
vapier |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
|
|
# $Header: /var/cvsroot/gentoo-x86/app-admin/metalog/metalog-2.ebuild,v 1.10 2012/07/15 22:21:32 vapier Exp $
|
| 4 |
|
|
|
| 5 |
|
|
EAPI="3"
|
| 6 |
|
|
|
| 7 |
|
|
inherit eutils
|
| 8 |
|
|
|
| 9 |
|
|
DESCRIPTION="A highly configurable replacement for syslogd/klogd"
|
| 10 |
|
|
HOMEPAGE="http://metalog.sourceforge.net/"
|
| 11 |
|
|
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
|
| 12 |
|
|
|
| 13 |
|
|
LICENSE="GPL-2"
|
| 14 |
|
|
SLOT="0"
|
| 15 |
|
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
| 16 |
|
|
IUSE="unicode"
|
| 17 |
|
|
|
| 18 |
|
|
RDEPEND=">=dev-libs/libpcre-3.4"
|
| 19 |
|
|
DEPEND="${RDEPEND}
|
| 20 |
|
|
app-arch/xz-utils"
|
| 21 |
|
|
|
| 22 |
|
|
src_prepare() {
|
| 23 |
|
|
epatch "${FILESDIR}"/${PN}-0.9-metalog-conf.patch
|
| 24 |
|
|
}
|
| 25 |
|
|
|
| 26 |
|
|
src_configure() {
|
| 27 |
|
|
econf $(use_with unicode)
|
| 28 |
|
|
}
|
| 29 |
|
|
|
| 30 |
|
|
src_install() {
|
| 31 |
|
|
emake DESTDIR="${D}" install || die "make install failed"
|
| 32 |
|
|
dodoc AUTHORS ChangeLog README NEWS metalog.conf
|
| 33 |
|
|
|
| 34 |
|
|
into /
|
| 35 |
|
|
dosbin "${FILESDIR}"/consolelog.sh || die
|
| 36 |
|
|
|
| 37 |
|
|
newinitd "${FILESDIR}"/metalog.initd metalog
|
| 38 |
|
|
newconfd "${FILESDIR}"/metalog.confd metalog
|
| 39 |
|
|
}
|
| 40 |
|
|
|
| 41 |
|
|
pkg_preinst() {
|
| 42 |
|
|
if [[ -d "${ROOT}"/etc/metalog ]] && [[ ! -e "${ROOT}"/etc/metalog.conf ]] ; then
|
| 43 |
|
|
mv -f "${ROOT}"/etc/metalog/metalog.conf "${ROOT}"/etc/metalog.conf
|
| 44 |
|
|
rmdir "${ROOT}"/etc/metalog
|
| 45 |
|
|
export MOVED_METALOG_CONF=true
|
| 46 |
|
|
else
|
| 47 |
|
|
export MOVED_METALOG_CONF=false
|
| 48 |
|
|
fi
|
| 49 |
|
|
}
|
| 50 |
|
|
|
| 51 |
|
|
pkg_postinst() {
|
| 52 |
|
|
if ${MOVED_METALOG_CONF} ; then
|
| 53 |
|
|
ewarn "The default metalog.conf file has been moved"
|
| 54 |
|
|
ewarn "from /etc/metalog/metalog.conf to just"
|
| 55 |
|
|
ewarn "/etc/metalog.conf. If you had a standard"
|
| 56 |
|
|
ewarn "setup, the file has been moved for you."
|
| 57 |
|
|
fi
|
| 58 |
|
|
}
|