summaryrefslogtreecommitdiff
blob: bc6226fa574d0d55b1c4c375f1324b9bcb9e67a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit eutils flag-o-matic toolchain-funcs

DEB_PV="1.5-6"
DESCRIPTION="Standard log daemons"
HOMEPAGE="http://www.infodrom.org/projects/sysklogd/"
SRC_URI="http://www.infodrom.org/projects/sysklogd/download/${P}.tar.gz
	mirror://debian/pool/main/s/sysklogd/${PN}_${DEB_PV}.diff.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86"
IUSE="logrotate"
RESTRICT="test"

DEPEND=""
RDEPEND="dev-lang/perl
	sys-apps/debianutils"

DOCS=( ANNOUNCE CHANGES NEWS README.1st README.linux )

PATCHES=(
	"${WORKDIR}"/${PN}_${DEB_PV}.diff

	"${FILESDIR}"/${PN}-1.5-debian-cron.patch
	"${FILESDIR}"/${PN}-1.5-build.patch

	# CAEN/OWL security patches
	"${FILESDIR}"/${PN}-1.4.2-caen-owl-syslogd-bind.diff
	"${FILESDIR}"/${PN}-1.4.2-caen-owl-syslogd-drop-root.diff
	"${FILESDIR}"/${PN}-1.4.2-caen-owl-klogd-drop-root.diff

	"${FILESDIR}"/${PN}-1.5-syslog-func-collision.patch #342601
	"${FILESDIR}"/${PN}-1.5-glibc-2.24.patch #604232
)

src_prepare() {
	epatch "${PATCHES[@]}"
}

src_configure() {
	append-lfs-flags
	tc-export CC
}

src_install() {
	dosbin syslogd klogd debian/syslog-facility debian/syslogd-listfiles
	doman *.[1-9] debian/syslogd-listfiles.8
	insinto /etc
	doins debian/syslog.conf
	if use logrotate ; then
		insinto /etc/logrotate.d
		newins "${FILESDIR}"/sysklogd.logrotate sysklogd
	else
		exeinto /etc/cron.daily
		newexe debian/cron.daily syslog
		exeinto /etc/cron.weekly
		newexe debian/cron.weekly syslog
	fi

	einstalldocs

	newinitd "${FILESDIR}"/sysklogd.rc7 sysklogd
	newconfd "${FILESDIR}"/sysklogd.confd sysklogd
}