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