Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [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 python-setuptools-native" |
| 8 | |
| 9 | SRCREV = "34e6ff6218bb0372eb545f886dec96dd3d20be47" |
| 10 | PV = "1.7.1" |
| 11 | |
| 12 | SRC_URI = "\ |
| 13 | git://github.com/oetiker/rrdtool-1.x.git;branch=master;protocol=http; \ |
| 14 | file://0001-add-missing-etc-rrdcached-default-lsb.in-to-tarball-.patch \ |
| 15 | file://0002-properly-add-etc-files-via-EXTRA_DIST-fixes-956-some.patch \ |
| 16 | file://0003-Fixed-No-rule-to-make-target-etc-rrdcached.socket.patch \ |
| 17 | " |
| 18 | |
| 19 | S = "${WORKDIR}/git" |
| 20 | |
| 21 | inherit cpan autotools-brokensep gettext pythonnative python-dir systemd |
| 22 | |
| 23 | BBCLASSEXTEND = "native" |
| 24 | |
| 25 | SYSTEMD_PACKAGES = "rrdcached" |
| 26 | SYSTEMD_SERVICE_rrdcached = "rrdcached.socket rrdcached.service" |
| 27 | |
| 28 | EXTRA_AUTORECONF = "-I m4 --exclude=autopoint" |
| 29 | |
| 30 | PACKAGECONFIG ??= "python perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
| 31 | |
| 32 | PACKAGECONFIG[python] = "--enable-python=yes \ |
| 33 | am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \ |
| 34 | am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\ |
| 35 | --disable-python,python," |
| 36 | |
| 37 | PACKAGECONFIG[perl] = \ |
| 38 | "--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \ |
| 39 | ac_cv_path_PERL_CC='${CC}', \ |
| 40 | --disable-perl,perl," |
| 41 | |
| 42 | PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi" |
| 43 | |
| 44 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd," |
| 45 | |
| 46 | EXTRA_OECONF = " \ |
| 47 | --enable-shared \ |
| 48 | --disable-libwrap \ |
| 49 | --program-prefix='' \ |
| 50 | rd_cv_ieee_works=yes \ |
| 51 | --disable-ruby \ |
| 52 | --disable-lua \ |
| 53 | --disable-tcl \ |
| 54 | --disable-rpath \ |
| 55 | --enable-nls=${USE_NLS} \ |
| 56 | --disable-docs \ |
| 57 | " |
| 58 | |
| 59 | export STAGING_LIBDIR |
| 60 | export STAGING_INCDIR |
| 61 | |
| 62 | # emulate cpan_do_configure |
| 63 | EXTRA_OEMAKE = ' PERL5LIB="${PERL_ARCHLIB}" ' |
| 64 | # Avoid do_configure error on some hosts |
| 65 | |
| 66 | do_configure() { |
| 67 | unset PERLHOSTLIB |
| 68 | #fix the pkglib problem with newer automake |
| 69 | #perl |
| 70 | sed -i -e "s|-Wl,--rpath -Wl,\$rp||g" \ |
| 71 | ${S}/bindings/perl-shared/Makefile.PL |
| 72 | |
| 73 | #python |
| 74 | sed -i -e '/PYTHON_INCLUDES="-I${/c \ |
| 75 | PYTHON_INCLUDES="-I=/usr/include/python${PYTHON_BASEVERSION}"' \ |
| 76 | ${S}/m4/acinclude.m4 |
| 77 | #remove the useless RPATH from the rrdtool.so |
| 78 | sed -i -e 's|LD_RUN_PATH=$(libdir)||g' ${S}/bindings/Makefile.am |
| 79 | |
| 80 | autotools_do_configure |
| 81 | |
| 82 | #modify python sitepkg |
| 83 | #remove the dependency of perl-shared:Makefile |
| 84 | #or perl-shared/Makefile will be regenerated |
| 85 | #if any code touch bindings/Makefile after below perl bindings code |
| 86 | sed -i -e "s:python/setup.py install:python/setup.py install \ |
| 87 | --install-lib=${PYTHON_SITEPACKAGES_DIR}:" \ |
| 88 | -e "s:perl-shared/Makefile.PL Makefile:perl-shared/Makefile.PL:" \ |
| 89 | ${B}/bindings/Makefile |
| 90 | |
| 91 | #redo the perl bindings |
| 92 | ( |
| 93 | cd ${S}/bindings/perl-shared; |
| 94 | perl Makefile.PL INSTALLDIRS="vendor" INSTALLPRIVLIB="abc"; |
| 95 | |
| 96 | cd ../../bindings/perl-piped; |
| 97 | perl Makefile.PL INSTALLDIRS="vendor"; |
| 98 | ) |
| 99 | |
| 100 | #change the interpreter in file |
| 101 | sed -i -e "s|^PERL = ${STAGING_BINDIR_NATIVE}/.*|PERL = /usr/bin/perl|g" \ |
| 102 | ${B}/examples/Makefile |
| 103 | sed -i -e "s|${STAGING_BINDIR_NATIVE}/perl-native/perl|/usr/bin/perl|g" \ |
| 104 | ${B}/examples/*.pl |
| 105 | } |
| 106 | |
| 107 | PACKAGES =+ "${PN}-perl ${PN}-python" |
| 108 | PACKAGES =+ "rrdcached" |
| 109 | |
| 110 | DESCRIPTION_rrdcached = \ |
| 111 | "The rrdcached package contains the data caching daemon for RRDtool." |
| 112 | |
| 113 | FILES_rrdcached = "${bindir}/rrdcached \ |
| 114 | ${systemd_unitdir}/system/rrdcached.service \ |
| 115 | ${systemd_unitdir}/system/rrdcached.socket" |
| 116 | |
| 117 | FILES_${PN}-doc += "${datadir}/rrdtool/examples" |
| 118 | |
| 119 | DESCRIPTION_${PN}-perl = \ |
| 120 | "The ${PN}-perl package includes RRDtool bindings for perl." |
| 121 | FILES_${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm \ |
| 122 | ${libdir}/perl/vendor_perl/*/auto/RRDs/RRDs.*" |
| 123 | RDEPENDS_${PN}-perl = "perl perl-module-lib perl-module-getopt-long perl-module-time-hires \ |
| 124 | perl-module-io-file perl-module-ipc-open2 perl-module-io-socket" |
| 125 | |
| 126 | DESCRIPTION_${PN}-python = \ |
| 127 | "The ${PN}-python package includes RRDtool bindings for python." |
| 128 | FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" |
| 129 | RDEPENDS_${PN}-python = "python" |
| 130 | |
| 131 | FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \ |
| 132 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug" |