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