blob: f8879c87c56bbce2c498fd82dc0265a161ea14a6 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "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 ??= "${@bb.utils.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 = "git://github.com/distcc/distcc.git \
21 file://separatebuilddir.patch \
22 file://0001-zeroconf-Include-fcntl.h.patch \
23 file://default \
24 file://distccmon-gnome.desktop \
25 file://distcc \
26 file://distcc.service"
27SRCREV = "9a172d3d20042754a30c0cd9a5d63fd1a8120c31"
28S = "${WORKDIR}/git"
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}