rrdtool_1.7.2.bb 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. SUMMARY = "High performance data logging and graphing system for time series data"
  2. HOMEPAGE = "http://oss.oetiker.ch/rrdtool/"
  3. LICENSE = "GPLv2"
  4. LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39df84cfd8a5e18bf988f277f7946676"
  5. DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2 groff-native python3-setuptools-native"
  6. SRCREV = "56a83f4f52e6745cd4352f9ee008be3183a6dedf"
  7. PV = "1.7.2"
  8. SRC_URI = "\
  9. git://github.com/oetiker/rrdtool-1.x.git;branch=master;protocol=http; \
  10. "
  11. S = "${WORKDIR}/git"
  12. inherit cpan autotools-brokensep gettext python3native python3-dir systemd
  13. BBCLASSEXTEND = "native"
  14. SYSTEMD_PACKAGES = "rrdcached"
  15. SYSTEMD_SERVICE_rrdcached = "rrdcached.socket rrdcached.service"
  16. EXTRA_AUTORECONF = "-I m4 --exclude=autopoint"
  17. PACKAGECONFIG ??= "perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
  18. PACKAGECONFIG[python] = "--enable-python=yes \
  19. am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
  20. am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\
  21. --disable-python,python,"
  22. PACKAGECONFIG[perl] = \
  23. "--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor" CCFLAGS="${CFLAGS}" NO_PACKLIST=1 NO_PERLLOCAL=1' \
  24. ac_cv_path_PERL_CC='${CC}', \
  25. --disable-perl,perl,"
  26. PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi"
  27. PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
  28. EXTRA_OECONF = " \
  29. --enable-shared \
  30. --disable-libwrap \
  31. --program-prefix='' \
  32. rd_cv_ieee_works=yes \
  33. --disable-ruby \
  34. --disable-lua \
  35. --disable-tcl \
  36. --disable-rpath \
  37. --enable-nls=${USE_NLS} \
  38. --disable-docs \
  39. "
  40. export STAGING_LIBDIR
  41. export STAGING_INCDIR
  42. # emulate cpan_do_configure
  43. EXTRA_OEMAKE = ' PERL5LIB="${PERL_ARCHLIB}" '
  44. # Avoid do_configure error on some hosts
  45. do_configure() {
  46. unset PERLHOSTLIB
  47. #fix the pkglib problem with newer automake
  48. #perl
  49. sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \
  50. ${S}/bindings/perl-shared/Makefile.PL
  51. #python
  52. sed -i -e '/PYTHON_INCLUDES="-I${/c \
  53. PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \
  54. ${S}/m4/acinclude.m4
  55. #remove the useless RPATH from the rrdtool.so
  56. sed -i -e 's|LD_RUN_PATH=$(libdir)||g' ${S}/bindings/Makefile.am
  57. autotools_do_configure
  58. #modify python sitepkg
  59. #remove the dependency of perl-shared:Makefile
  60. #or perl-shared/Makefile will be regenerated
  61. #if any code touch bindings/Makefile after below perl bindings code
  62. sed -i -e "s:python/setup.py install:python/setup.py install \
  63. --install-lib=${PYTHON_SITEPACKAGES_DIR}:" \
  64. -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \
  65. ${B}/bindings/Makefile
  66. #redo the perl bindings
  67. (
  68. cd ${S}/bindings/perl-shared;
  69. perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc";
  70. cd ../../bindings/perl-piped;
  71. perl Makefile.PL INSTALLDIRS="vendor";
  72. )
  73. #change the interpreter in file
  74. sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \
  75. ${B}/examples/Makefile
  76. sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \
  77. ${B}/examples/*.pl
  78. }
  79. PACKAGES =+ "${PN}-perl ${PN}-python"
  80. PACKAGES =+ "rrdcached"
  81. DESCRIPTION_rrdcached = \
  82. "The rrdcached package contains the data caching daemon for RRDtool."
  83. FILES_rrdcached = "${bindir}/rrdcached \
  84. ${systemd_unitdir}/system/rrdcached.service \
  85. ${systemd_unitdir}/system/rrdcached.socket"
  86. FILES_${PN}-doc += "${datadir}/rrdtool/examples"
  87. DESCRIPTION_${PN}-perl = \
  88. "The ${PN}-perl package includes RRDtool bindings for perl."
  89. FILES_${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm \
  90. ${libdir}/perl/vendor_perl/*/auto/RRDs/RRDs.*"
  91. RDEPENDS_${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module-time-hires \
  92. perl-module-io-file perl-module-ipc-open2 perl-module-io-socket"
  93. DESCRIPTION_${PN}-python = \
  94. "The ${PN}-python package includes RRDtool bindings for python."
  95. FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
  96. RDEPENDS_${PN}-python = "python3"
  97. FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \
  98. ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"