Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 642674
Collapse All | Expand All

(-)a/sys-devel/icecream/files/confd-icecc-scheduler (+28 lines)
Line 0 Link Here
1
#
2
## Type: string
3
## Path: Applications/icecream
4
## Default: /var/log/icecream/scheduler
5
#
6
# icecream scheduler log file
7
#
8
ICECREAM_SCHEDULER_LOG_FILE="/var/log/icecream/scheduler"
9
10
#
11
## Type: string
12
## Path: Applications/icecream
13
## Default: ""
14
#
15
# Identification for the network the scheduler and daemon run on. 
16
# You can have several distinct icecream networks in the same LAN
17
# for whatever reason.
18
#
19
ICECREAM_NETNAME=""
20
21
#
22
## Type: string
23
## Path: Applications/icecream
24
## Default: ""
25
#
26
# Verbosity level -v to -vvv
27
# 
28
ICECREAM_VERBOSITY="-vv"
(-)a/sys-devel/icecream/files/confd-iceccd (+83 lines)
Line 0 Link Here
1
#
2
## Type: integer(0:19)
3
## Path: Applications/icecream
4
## Description: Icecream settings
5
## ServiceRestart: icecream
6
## Default: 5
7
#
8
# Nice level of running compilers
9
#
10
ICECREAM_NICE_LEVEL="5"
11
12
#
13
## Type: string
14
## Path: Applications/icecream
15
## Default: /var/log/icecream/iceccd
16
#
17
# icecream daemon log file
18
#
19
ICECREAM_LOG_FILE="/var/log/icecream/iceccd"
20
21
#
22
## Type: string
23
## Path: Applications/icecream
24
## Default: ""
25
#
26
# Identification for the network the scheduler and daemon run on. 
27
# You can have several distinct icecream networks in the same LAN
28
# for whatever reason.
29
#
30
ICECREAM_NETNAME=""
31
32
#
33
## Type: string
34
## Path: Applications/icecream
35
## Default: ""
36
#
37
# If the daemon can't find the scheduler by broadcast (e.g. because 
38
# of a firewall) you can specify it.
39
#
40
ICECREAM_SCHEDULER_HOST=""
41
42
#
43
## Type: integer
44
## Path: Applications/icecream
45
## Default: ""
46
# 
47
# You can overwrite here the number of jobs to run in parallel. Per
48
# default this depends on the number of (virtual) CPUs installed. 
49
#
50
# Note: a value of "0" is actually interpreted as "1", however it
51
# also sets ICECREAM_ALLOW_REMOTE="no".
52
#
53
ICECREAM_MAX_JOBS=""
54
55
#
56
## Type: yesno
57
## Path: Applications/icecream
58
## Default: "yes"
59
# 
60
# Specifies whether jobs submitted by other nodes are allowed to run on
61
# this one.
62
#
63
ICECREAM_ALLOW_REMOTE="yes"
64
65
#
66
## Type: string
67
## Path: Applications/icecream
68
## Default: "/var/cache/icecream"
69
#
70
# This is the directory where the icecream daemon stores the environments
71
# it compiles in. In a big network this can grow quite a bit, so use some
72
# path if your /tmp is small - but the user icecream has to write to it.
73
# 
74
ICECREAM_BASEDIR="/var/cache/icecream"
75
76
#
77
## Type: string
78
## Path: Applications/icecream
79
## Default: ""
80
#
81
# Verbosity level -v to -vvv
82
# 
83
ICECREAM_VERBOSITY="-vv"
(-)a/sys-devel/icecream/files/initd-icecc-scheduler (+27 lines)
Line 0 Link Here
1
#!/sbin/openrc-run
2
# Copyright 1999-2013 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
4
5
depend() {
6
        need net
7
}
8
9
start() {
10
	local netname=${ICECREAM_NETNAME:+"-n ${ICECREAM_NETNAME}"}
11
	local verbosity=${ICECREAM_VERBOSITY:-"-v"}
12
	local slogfile=${ICECREAM_SCHEDULER_LOG_FILE:-"/var/log/icecc_scheduler"}
13
14
	[[ ! -d /var/log/icecream/ ]] && mkdir -p /var/log/icecream/ && chown icecream:icecream /var/log/icecream/
15
16
	touch ${slogfile} && chown icecream:icecream ${slogfile}
17
	slogfile=${slogfile:+"-l ${slogfile}"}
18
	ebegin "Starting Distributed Compiler Scheduler"
19
	start-stop-daemon -u icecream --start --quiet --exec /usr/sbin/icecc-scheduler -- -d ${slogfile} ${netname} ${verbosity}
20
	eend ${?}
21
}
22
23
stop() {
24
	ebegin "Stopping Distributed Compiler Scheduler"
25
	start-stop-daemon --stop --quiet --name icecc-scheduler
26
	eend ${?}
27
}
(-)a/sys-devel/icecream/files/initd-iceccd (+29 lines)
Line 0 Link Here
1
#!/sbin/openrc-run
2
# Copyright 1999-2013 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
4
5
depend() {
6
        need net
7
}
8
9
start() {
10
	local basedir=${ICECREAM_BASEDIR:-"/var/cache/icecream"}
11
	local netname=${ICECREAM_NETNAME:+"-n ${ICECREAM_NETNAME}"}
12
	local logfile=${ICECREAM_LOG_FILE:+"-l ${ICECREAM_LOG_FILE}"}
13
	local nice=${ICECREAM_NICE_LEVEL:+"--nice ${ICECREAM_NICE_LEVEL}"}
14
	local maxjobs=${ICECREAM_MAX_JOBS:+"-m ${ICECREAM_MAX_JOBS}"}
15
	local verbosity=${ICECREAM_VERBOSITY:-"-v"}
16
17
	[[ ! -d /var/log/icecream/ ]] && mkdir -p /var/log/icecream/ && chown icecream:icecream /var/log/icecream/
18
19
	[[ ! -d ${basedir} ]] && mkdir -p ${basedir} && chown icecream:icecream ${basedir}
20
	ebegin "Starting Distributed Compiler Daemon"
21
	start-stop-daemon --start --quiet --exec /usr/sbin/iceccd -- -d ${logfile} ${nice} ${scheduler} ${netname} -u icecream -b "${basedir}" ${maxjobs} ${verbosity}
22
	eend ${?}
23
}
24
25
stop() {
26
	ebegin "Stopping Distributed Compiler Daemon"
27
	start-stop-daemon --stop --quiet --name iceccd
28
	eend ${?}
29
}
(-)a/sys-devel/icecream/icecream-9999.ebuild (+79 lines)
Line 0 Link Here
1
# Copyright 1999-2017 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
4
EAPI=6
5
6
inherit eutils user autotools
7
[[ "${PV}" == 9999* ]] && inherit git-r3
8
9
DESCRIPTION="Distributed compiling of C(++) code across several machines; based on distcc"
10
HOMEPAGE="https://github.com/icecc/icecream"
11
12
[[ "${PV}" != 9999* ]] && SRC_URI="https://github.com/icecc/icecream/archive/${PV}.tar.gz -> ${P}.tar.gz"
13
EGIT_REPO_URI="https://github.com/icecc/icecream.git"
14
15
LICENSE="GPL-2"
16
SLOT="0"
17
KEYWORDS="~amd64 ~x86"
18
IUSE="+man"
19
20
DEPEND="
21
	sys-libs/libcap-ng
22
	dev-libs/lzo
23
	man? ( app-text/docbook2X )
24
"
25
RDEPEND="
26
	${DEPEND}
27
	dev-util/shadowman
28
"
29
30
#PATCHES=(
31
#	"${FILESDIR}/${P}-gentoo-multilib.patch"
32
#)
33
34
pkg_setup() {
35
	enewgroup icecream
36
	enewuser icecream -1 -1 /var/cache/icecream icecream
37
}
38
39
src_prepare() {
40
#	[[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
41
	eapply_user
42
	eautoreconf
43
}
44
45
src_configure() {
46
	econf \
47
		--enable-shared --disable-static \
48
		--enable-clang-wrappers \
49
		--enable-clang-rewrite-includes \
50
		$(use_with man)
51
}
52
53
src_install() {
54
	default
55
	find "${D}" -name '*.la' -delete || die
56
57
	newconfd "${FILESDIR}"/confd-iceccd iceccd
58
	newconfd "${FILESDIR}"/confd-icecc-scheduler icecc-scheduler
59
	newinitd "${FILESDIR}"/initd-iceccd iceccd
60
	newinitd "${FILESDIR}"/initd-icecc-scheduler icecc-scheduler
61
62
	insinto /etc/logrotate.d
63
	newins suse/logrotate icecream
64
65
	insinto /usr/share/shadowman/tools
66
	newins - icecc <<<'/usr/libexec/icecc/bin'
67
}
68
69
pkg_prerm() {
70
	if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
71
		eselect compiler-shadow remove icecc
72
	fi
73
}
74
75
pkg_postinst() {
76
	if [[ ${ROOT} == / ]]; then
77
		eselect compiler-shadow update icecc
78
	fi
79
}

Return to bug 642674