Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "A parallel build system" |
| 2 | DESCRIPTION = "distcc is a parallel build system that distributes \ |
| 3 | compilation of C/C++/ObjC code across machines on a network." |
| 4 | SECTION = "devel" |
| 5 | LICENSE = "GPLv2" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
| 7 | |
| 8 | DEPENDS = "avahi" |
| 9 | |
| 10 | GTKCONFIG = "gtk" |
| 11 | GTKCONFIG_libc-uclibc = "" |
| 12 | |
| 13 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${GTKCONFIG}', '', d)} popt" |
| 14 | PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk --without-gnome,gtk+" |
| 15 | # use system popt by default |
| 16 | PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt" |
| 17 | |
| 18 | RRECOMMENDS_${PN} = "avahi-daemon" |
| 19 | |
| 20 | SRC_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" |
| 27 | SRCREV = "9a172d3d20042754a30c0cd9a5d63fd1a8120c31" |
| 28 | S = "${WORKDIR}/git" |
| 29 | |
| 30 | inherit autotools pkgconfig update-rc.d useradd systemd |
| 31 | |
| 32 | EXTRA_OECONF += "--disable-Werror PYTHON=/dev/null" |
| 33 | |
| 34 | USERADD_PACKAGES = "${PN}" |
| 35 | USERADD_PARAM_${PN} = "--system \ |
| 36 | --home /dev/null \ |
| 37 | --no-create-home \ |
| 38 | --gid nogroup \ |
| 39 | distcc" |
| 40 | |
| 41 | INITSCRIPT_NAME = "distcc" |
| 42 | |
| 43 | SYSTEMD_PACKAGES = "${PN}" |
| 44 | SYSTEMD_SERVICE_${PN} = "distcc.service" |
| 45 | |
| 46 | do_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 | } |
| 56 | DESKTOPINSTALL = "" |
| 57 | DESKTOPINSTALL_libc-glibc () { |
| 58 | install -d ${D}${datadir}/distcc/ |
| 59 | install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/ |
| 60 | } |
| 61 | PACKAGES += "distcc-distmon-gnome" |
| 62 | |
| 63 | FILES_${PN} = " ${sysconfdir} \ |
| 64 | ${bindir}/distcc \ |
| 65 | ${bindir}/lsdistcc \ |
| 66 | ${bindir}/distccd \ |
| 67 | ${bindir}/distccmon-text \ |
| 68 | ${systemd_unitdir}/system/distcc.service" |
| 69 | FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \ |
| 70 | ${datadir}/distcc" |
| 71 | |
| 72 | pkg_postrm_${PN} () { |
| 73 | deluser distcc || true |
| 74 | } |