blob: d2ea9c8a6ae20a24da8c65ed52a1b71dbdb38479 [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 Bishop1a4b7ee2018-12-16 17:11:34 -080018 file://default \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080019 file://distcc \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060020 file://distcc.service \
21 "
22SRCREV = "8572e2a1af39e69b2a2d74622fed6d2dd7dca9b7"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023S = "${WORKDIR}/git"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060024UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025
26inherit autotools pkgconfig update-rc.d useradd systemd
27
28ASNEEDED = ""
29
30EXTRA_OECONF += "--disable-Werror PYTHON='' --disable-pump-mode"
31
Brad Bishop00e122a2019-10-05 11:10:57 -040032PACKAGE_BEFORE_PN = "${PN}-distmon-gnome ${PN}-server"
33
34USERADD_PACKAGES = "${PN}-server"
35USERADD_PARAM_${PN}-server = "--system \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036 --home /dev/null \
37 --no-create-home \
38 --gid nogroup \
39 distcc"
40
Brad Bishop00e122a2019-10-05 11:10:57 -040041UPDATERCPN = "${PN}-server"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042INITSCRIPT_NAME = "distcc"
43
Brad Bishop00e122a2019-10-05 11:10:57 -040044SYSTEMD_PACKAGES = "${PN}-server"
45SYSTEMD_SERVICE_${PN}-server = "distcc.service"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080046
47do_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 Bishop1a4b7ee2018-12-16 17:11:34 -080057}
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080058
Brad Bishop00e122a2019-10-05 11:10:57 -040059FILES_${PN}-server = "${sysconfdir} \
60 ${bindir}/distccd \
61 ${sbindir}"
62FILES_${PN}-distmon-gnome = "${bindir}/distccmon-gnome \
63 ${datadir}/applications \
64 ${datadir}/pixmaps"
Brad Bishop19323692019-04-05 15:28:33 -040065
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#
71fixup_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}
87do_fetch[postfuncs] += "fixup_distcc_mirror_tarball"