diff options
Diffstat (limited to 'meta/recipes-devtools/distcc/files')
-rw-r--r-- | meta/recipes-devtools/distcc/files/default | 24 | ||||
-rwxr-xr-x | meta/recipes-devtools/distcc/files/distcc | 119 | ||||
-rw-r--r-- | meta/recipes-devtools/distcc/files/distcc.service | 11 | ||||
-rw-r--r-- | meta/recipes-devtools/distcc/files/distccmon-gnome.desktop | 12 | ||||
-rw-r--r-- | meta/recipes-devtools/distcc/files/separatebuilddir.patch | 21 |
5 files changed, 187 insertions, 0 deletions
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 | |||
9 | STARTDISTCC="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 | |||
19 | ALLOWEDNETS="192.168.7.0/24" | ||
20 | |||
21 | # | ||
22 | # OPTIONS is used for the systemd service file | ||
23 | # | ||
24 | OPTIONS="--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..e36f0fa695 --- /dev/null +++ b/meta/recipes-devtools/distcc/files/distcc | |||
@@ -0,0 +1,119 @@ | |||
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 | |||
23 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
24 | DAEMON=/usr/bin/distccd | ||
25 | NAME=distcc | ||
26 | DESC="Distributed Compiler Daemon" | ||
27 | DAEMON_ARGS="--pid-file=/var/run/$NAME.pid --daemon" | ||
28 | # please change those variables by overriding them in /etc/defaults/distcc | ||
29 | ALLOWEDNETS="127.0.0.1" | ||
30 | |||
31 | # Reads config file (will override defaults above) | ||
32 | [ -r /etc/default/distcc ] && . /etc/default/distcc | ||
33 | |||
34 | test -x $DAEMON || exit 0 | ||
35 | |||
36 | set -e | ||
37 | |||
38 | # Source function library. | ||
39 | . /etc/init.d/functions | ||
40 | |||
41 | # construct access list | ||
42 | ALLOW="" | ||
43 | for net in $ALLOWEDNETS | ||
44 | do | ||
45 | ALLOW="$ALLOW --allow $net" | ||
46 | done | ||
47 | |||
48 | should_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 | # we need permission to write to the pid file | ||
55 | touch /var/run/$NAME.pid | ||
56 | chown distcc /var/run/$NAME.pid | ||
57 | } | ||
58 | |||
59 | case "$1" in | ||
60 | start) | ||
61 | should_start | ||
62 | echo -n "Starting $DESC: $NAME" | ||
63 | start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ | ||
64 | --exec $DAEMON -- $DAEMON_ARGS $ALLOW || | ||
65 | { | ||
66 | code=$? | ||
67 | echo "$0: start failed with error code $code" >&2 | ||
68 | exit $code | ||
69 | } | ||
70 | echo "." | ||
71 | ;; | ||
72 | stop) | ||
73 | echo -n "Stopping $DESC: $NAME" | ||
74 | start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ | ||
75 | --exec $DAEMON || | ||
76 | { | ||
77 | code=$? | ||
78 | echo "$0: stop failed with error code $code" >&2 | ||
79 | exit $code | ||
80 | } | ||
81 | rm -f /var/run/$NAME.pid >/dev/null 2>&1 | ||
82 | echo "." | ||
83 | ;; | ||
84 | restart|force-reload) | ||
85 | # | ||
86 | # If the "reload" option is implemented, move the "force-reload" | ||
87 | # option to the "reload" entry above. If not, "force-reload" is | ||
88 | # just the same as "restart". | ||
89 | # | ||
90 | echo -n "Restarting $DESC: $NAME" | ||
91 | start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ | ||
92 | --exec $DAEMON | ||
93 | sleep 1 | ||
94 | should_start | ||
95 | start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ | ||
96 | --exec $DAEMON -- $DAEMON_ARGS $ALLOW || | ||
97 | { | ||
98 | code=$? | ||
99 | rm -f /var/run/$NAME.pid >/dev/null 2>&1 | ||
100 | echo "$0: restart failed with error code $code" >&2 | ||
101 | exit $code | ||
102 | } | ||
103 | echo "." | ||
104 | ;; | ||
105 | |||
106 | status) | ||
107 | status $DAEMON | ||
108 | exit $? | ||
109 | ;; | ||
110 | *) | ||
111 | N=/etc/init.d/$NAME | ||
112 | echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 | ||
113 | exit 1 | ||
114 | ;; | ||
115 | esac | ||
116 | |||
117 | exit 0 | ||
118 | |||
119 | |||
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] | ||
2 | Description=Distccd A Distributed Compilation Server | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | User=distcc | ||
7 | EnvironmentFile=-/etc/default/distcc | ||
8 | ExecStart=@BINDIR@/distccd --verbose --no-detach --daemon $OPTIONS | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=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] | ||
2 | Version=0.9.4 | ||
3 | Exec=distccmon-gnome | ||
4 | Name=distcc monitor | ||
5 | GenericName=Distributed Compile Monitor | ||
6 | Comment=Graphical view of distributed compile tasks | ||
7 | Icon=distccmon-gnome-icon | ||
8 | TryExec=distccmon-gnome | ||
9 | Terminal=false | ||
10 | Type=Application | ||
11 | Categories=GNOME;Development; | ||
12 | StartupNotify=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 @@ | |||
1 | When building with a separate build directory, make install fails, | ||
2 | unable to find the gnome_data files. This patch corrects the | ||
3 | patch and ensures the build works in this case. | ||
4 | |||
5 | RP 2013/3/8 | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Index: 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) | ||