summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/distcc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/distcc')
-rw-r--r--meta/recipes-devtools/distcc/distcc_3.1.bb74
-rw-r--r--meta/recipes-devtools/distcc/files/default24
-rwxr-xr-xmeta/recipes-devtools/distcc/files/distcc114
-rw-r--r--meta/recipes-devtools/distcc/files/distcc.service11
-rw-r--r--meta/recipes-devtools/distcc/files/distccmon-gnome.desktop12
-rw-r--r--meta/recipes-devtools/distcc/files/separatebuilddir.patch21
6 files changed, 256 insertions, 0 deletions
diff --git a/meta/recipes-devtools/distcc/distcc_3.1.bb b/meta/recipes-devtools/distcc/distcc_3.1.bb
new file mode 100644
index 0000000000..c69643c973
--- /dev/null
+++ b/meta/recipes-devtools/distcc/distcc_3.1.bb
@@ -0,0 +1,74 @@
1SUMMARY = "A parallel build system"
2DESCRIPTION = "distcc is a parallel build system that distributes \
3compilation of C/C++/ObjC code across machines on a network."
4SECTION = "devel"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
7
8DEPENDS = "avahi"
9
10GTKCONFIG = "gtk"
11GTKCONFIG_libc-uclibc = ""
12
13PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', '${GTKCONFIG}', '', d)} popt"
14PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk --without-gnome,gtk+"
15# use system popt by default
16PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt"
17
18RRECOMMENDS_${PN} = "avahi-daemon"
19
20SRC_URI = "http://distcc.googlecode.com/files/${BPN}-${PV}.tar.bz2 \
21 file://separatebuilddir.patch \
22 file://default \
23 file://distccmon-gnome.desktop \
24 file://distcc \
25 file://distcc.service"
26
27SRC_URI[md5sum] = "a1a9d3853df7133669fffec2a9aab9f3"
28SRC_URI[sha256sum] = "f55dbafd76bed3ce57e1bbcdab1329227808890d90f4c724fcd2d53f934ddd89"
29
30inherit autotools pkgconfig update-rc.d useradd systemd
31
32EXTRA_OECONF += "--disable-Werror PYTHON=/dev/null"
33
34USERADD_PACKAGES = "${PN}"
35USERADD_PARAM_${PN} = "--system \
36 --home /dev/null \
37 --no-create-home \
38 --gid nogroup \
39 distcc"
40
41INITSCRIPT_NAME = "distcc"
42
43SYSTEMD_PACKAGES = "${PN}"
44SYSTEMD_SERVICE_${PN} = "distcc.service"
45
46do_install_append() {
47 install -d ${D}${sysconfdir}/init.d/
48 install -d ${D}${sysconfdir}/default
49 install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
50 install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
51 install -d ${D}${systemd_unitdir}/system/
52 install -m 0644 ${WORKDIR}/distcc.service ${D}${systemd_unitdir}/system
53 sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distcc.service
54 ${DESKTOPINSTALL}
55}
56DESKTOPINSTALL = ""
57DESKTOPINSTALL_libc-glibc () {
58 install -d ${D}${datadir}/distcc/
59 install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
60}
61PACKAGES += "distcc-distmon-gnome"
62
63FILES_${PN} = " ${sysconfdir} \
64 ${bindir}/distcc \
65 ${bindir}/lsdistcc \
66 ${bindir}/distccd \
67 ${bindir}/distccmon-text \
68 ${systemd_unitdir}/system/distcc.service"
69FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \
70 ${datadir}/distcc"
71
72pkg_postrm_${PN} () {
73 deluser distcc || true
74}
diff --git a/meta/recipes-devtools/distcc/files/default b/meta/recipes-devtools/distcc/files/default
new file mode 100644
index 0000000000..63c4159b9d
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/default
@@ -0,0 +1,24 @@
1# Defaults for distcc initscript
2# sourced by /etc/init.d/distcc
3
4#
5# should distcc be started on boot?
6#
7# STARTDISTCC="true"
8
9STARTDISTCC="true"
10
11#
12# Which networks/hosts should be allowed to connect to the daemon?
13# You can list multiple hosts/networks separated by spaces.
14# Networks have to be in CIDR notation, f.e. 192.168.1.0/24
15# Hosts are represented by a single IP Adress
16#
17# ALLOWEDNETS="127.0.0.1"
18
19ALLOWEDNETS="192.168.7.0/24"
20
21#
22# OPTIONS is used for the systemd service file
23#
24OPTIONS="--allow 192.168.7.0/24"
diff --git a/meta/recipes-devtools/distcc/files/distcc b/meta/recipes-devtools/distcc/files/distcc
new file mode 100755
index 0000000000..c7c414d829
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distcc
@@ -0,0 +1,114 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: distcc
4# Required-Start: $remote_fs $syslog
5# Required-Stop: $remote_fs $syslog
6# Default-Start: 2 3 4 5
7# Default-Stop: 1
8# Short-Description: simple distributed compiler client and server
9### END INIT INFO
10#
11# distccd Debian init.d script contributed by Jason Thomas. (Debian #161136)
12#
13# skeleton example file to build /etc/init.d/ scripts.
14# This file should be used to construct scripts for /etc/init.d.
15#
16# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
17# Modified for Debian GNU/Linux
18# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
19#
20# Version: @(#)skeleton 1.9.1 08-Apr-2002 miquels@cistron.nl
21#
22
23PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
24DAEMON=/usr/bin/distccd
25NAME=distcc
26DESC="Distributed Compiler Daemon"
27DAEMON_ARGS="--pid-file=/var/run/$NAME.pid --daemon"
28# please change those variables by overriding them in /etc/defaults/distcc
29ALLOWEDNETS="127.0.0.1"
30
31# Reads config file (will override defaults above)
32[ -r /etc/default/distcc ] && . /etc/default/distcc
33
34test -x $DAEMON || exit 0
35
36set -e
37
38# Source function library.
39. /etc/init.d/functions
40
41# construct access list
42ALLOW=""
43for net in $ALLOWEDNETS
44do
45 ALLOW="$ALLOW --allow $net"
46done
47
48should_start() {
49 if [ "$STARTDISTCC" != "true" ] && [ "$STARTDISTCC" != "YES" ]; then
50 echo "STARTDISTCC is set to false in /etc/default/distcc"
51 echo "$DAEMON not starting"
52 exit 0
53 fi
54}
55
56case "$1" in
57 start)
58 should_start
59 echo -n "Starting $DESC: $NAME"
60 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
61 --exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
62 {
63 code=$?
64 echo "$0: start failed with error code $code" >&2
65 exit $code
66 }
67 echo "."
68 ;;
69 stop)
70 echo -n "Stopping $DESC: $NAME"
71 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
72 --exec $DAEMON ||
73 {
74 code=$?
75 echo "$0: stop failed with error code $code" >&2
76 exit $code
77 }
78 echo "."
79 ;;
80 restart|force-reload)
81 #
82 # If the "reload" option is implemented, move the "force-reload"
83 # option to the "reload" entry above. If not, "force-reload" is
84 # just the same as "restart".
85 #
86 echo -n "Restarting $DESC: $NAME"
87 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
88 --exec $DAEMON
89 sleep 1
90 should_start
91 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
92 --exec $DAEMON -- $DAEMON_ARGS $ALLOW ||
93 {
94 code=$?
95 echo "$0: restart failed with error code $code" >&2
96 exit $code
97 }
98 echo "."
99 ;;
100
101 status)
102 status $DAEMON
103 exit $?
104 ;;
105 *)
106 N=/etc/init.d/$NAME
107 echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
108 exit 1
109 ;;
110esac
111
112exit 0
113
114
diff --git a/meta/recipes-devtools/distcc/files/distcc.service b/meta/recipes-devtools/distcc/files/distcc.service
new file mode 100644
index 0000000000..0253ddf52a
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distcc.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Distccd A Distributed Compilation Server
3After=network.target
4
5[Service]
6User=distcc
7EnvironmentFile=-/etc/default/distcc
8ExecStart=@BINDIR@/distccd --verbose --no-detach --daemon $OPTIONS
9
10[Install]
11WantedBy=multi-user.target
diff --git a/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop b/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop
new file mode 100644
index 0000000000..7b5d85ce4e
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/distccmon-gnome.desktop
@@ -0,0 +1,12 @@
1[Desktop Entry]
2Version=0.9.4
3Exec=distccmon-gnome
4Name=distcc monitor
5GenericName=Distributed Compile Monitor
6Comment=Graphical view of distributed compile tasks
7Icon=distccmon-gnome-icon
8TryExec=distccmon-gnome
9Terminal=false
10Type=Application
11Categories=GNOME;Development;
12StartupNotify=true
diff --git a/meta/recipes-devtools/distcc/files/separatebuilddir.patch b/meta/recipes-devtools/distcc/files/separatebuilddir.patch
new file mode 100644
index 0000000000..b9e3e42ddf
--- /dev/null
+++ b/meta/recipes-devtools/distcc/files/separatebuilddir.patch
@@ -0,0 +1,21 @@
1When building with a separate build directory, make install fails,
2unable to find the gnome_data files. This patch corrects the
3patch and ensures the build works in this case.
4
5RP 2013/3/8
6
7Upstream-Status: Pending
8
9Index: distcc-3.1/Makefile.in
10===================================================================
11--- distcc-3.1.orig/Makefile.in 2008-12-02 21:50:31.000000000 +0000
12+++ distcc-3.1/Makefile.in 2013-03-08 10:49:24.224400937 +0000
13@@ -1088,7 +1088,7 @@
14 install-gnome-data: $(gnome_data)
15 $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
16 for p in $(gnome_data); do \
17- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
18+ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
19 done
20
21 install-conf: $(conf_files) $(default_files)