distcc_3.3.3.bb 2.9 KB

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