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