Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [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 binutils" |
| 9 | |
| 10 | PACKAGECONFIG ??= "popt" |
| 11 | PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk --without-gnome,gtk+" |
| 12 | # use system popt by default |
| 13 | PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt" |
| 14 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 15 | RRECOMMENDS_${PN}-server = "avahi-daemon" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 16 | |
| 17 | SRC_URI = "git://github.com/distcc/distcc.git \ |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 18 | file://fix-gnome.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | file://separatebuilddir.patch \ |
| 20 | file://default \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | file://distcc \ |
| 22 | file://distcc.service" |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 23 | SRCREV = "4cde9bcfbda589abd842e3bbc652ce369085eaae" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 24 | S = "${WORKDIR}/git" |
| 25 | |
| 26 | inherit autotools pkgconfig update-rc.d useradd systemd |
| 27 | |
| 28 | ASNEEDED = "" |
| 29 | |
| 30 | EXTRA_OECONF += "--disable-Werror PYTHON='' --disable-pump-mode" |
| 31 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 32 | PACKAGE_BEFORE_PN = "${PN}-distmon-gnome ${PN}-server" |
| 33 | |
| 34 | USERADD_PACKAGES = "${PN}-server" |
| 35 | USERADD_PARAM_${PN}-server = "--system \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | --home /dev/null \ |
| 37 | --no-create-home \ |
| 38 | --gid nogroup \ |
| 39 | distcc" |
| 40 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 41 | UPDATERCPN = "${PN}-server" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | INITSCRIPT_NAME = "distcc" |
| 43 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 44 | SYSTEMD_PACKAGES = "${PN}-server" |
| 45 | SYSTEMD_SERVICE_${PN}-server = "distcc.service" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 46 | |
| 47 | do_install() { |
| 48 | # Improve reproducibility: compress w/o timestamps |
| 49 | oe_runmake 'DESTDIR=${D}' "GZIP_BIN=gzip -n" install |
| 50 | install -d ${D}${sysconfdir}/init.d/ |
| 51 | install -d ${D}${sysconfdir}/default |
| 52 | install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/ |
| 53 | install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc |
| 54 | install -d ${D}${systemd_unitdir}/system/ |
| 55 | install -m 0644 ${WORKDIR}/distcc.service ${D}${systemd_unitdir}/system |
| 56 | sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distcc.service |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 57 | } |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 58 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 59 | FILES_${PN}-server = "${sysconfdir} \ |
| 60 | ${bindir}/distccd \ |
| 61 | ${sbindir}" |
| 62 | FILES_${PN}-distmon-gnome = "${bindir}/distccmon-gnome \ |
| 63 | ${datadir}/applications \ |
| 64 | ${datadir}/pixmaps" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 65 | |
| 66 | # |
| 67 | # distcc upstream dropped the 3.2 branch which we reference in older project releases |
| 68 | # the revisions are there, just the branch is not. In order to be able to continue |
| 69 | # to build those old releases, adjust any mirror tarball to contain the missing branch |
| 70 | # |
| 71 | fixup_distcc_mirror_tarball () { |
| 72 | TBALL=${DL_DIR}/git2_github.com.distcc.distcc.git.tar.gz |
| 73 | if [ -f $TBALL ]; then |
| 74 | TDIR=`mktemp -d` |
| 75 | cd $TDIR |
| 76 | tar -xzf $TBALL |
| 77 | set +e |
| 78 | git rev-parse --verify 3.2 |
| 79 | if [ "$?" != "0" ]; then |
| 80 | git branch 3.2 d8b18df3e9dcbe4f092bed565835d3975e99432c |
| 81 | tar -czf $TBALL * |
| 82 | fi |
| 83 | set -e |
| 84 | rm -rf $TDIR/* |
| 85 | fi |
| 86 | } |
| 87 | do_fetch[postfuncs] += "fixup_distcc_mirror_tarball" |