blob: 63cdb7aee6015c9880502dfe12db1220d001f363 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001SUMMARY = "High performance data logging and graphing system for time series data"
2HOMEPAGE = "http://oss.oetiker.ch/rrdtool/"
3
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3349111ed0533471494beec99715bc9d"
6
7DEPENDS = "libpng zlib cairo pango glib-2.0 libxml2 groff-native python-setuptools-native"
8
9SRCREV = "34e6ff6218bb0372eb545f886dec96dd3d20be47"
10PV = "1.7.1"
11
12SRC_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
19S = "${WORKDIR}/git"
20
21inherit cpan autotools-brokensep gettext pythonnative python-dir systemd
22
23BBCLASSEXTEND = "native"
24
25SYSTEMD_PACKAGES = "rrdcached"
26SYSTEMD_SERVICE_rrdcached = "rrdcached.socket rrdcached.service"
27
28EXTRA_AUTORECONF = "-I m4 --exclude=autopoint"
29
30PACKAGECONFIG ??= "python perl ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
31
32PACKAGECONFIG[python] = "--enable-python=yes \
33am_cv_python_pythondir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages \
34am_cv_python_pyexecdir=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/site-packages,\
35--disable-python,python,"
36
37PACKAGECONFIG[perl] = \
38"--enable-perl=yes --with-perl-options='INSTALLDIRS="vendor"' \
39ac_cv_path_PERL_CC='${CC}', \
40--disable-perl,perl,"
41
42PACKAGECONFIG[dbi] = "--enable-libdbi,--disable-libdbi,libdbi"
43
44PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
45
46EXTRA_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
59export STAGING_LIBDIR
60export STAGING_INCDIR
61
62# emulate cpan_do_configure
63EXTRA_OEMAKE = ' PERL5LIB="${PERL_ARCHLIB}" '
64# Avoid do_configure error on some hosts
65
66do_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
107PACKAGES =+ "${PN}-perl ${PN}-python"
108PACKAGES =+ "rrdcached"
109
110DESCRIPTION_rrdcached = \
111"The rrdcached package contains the data caching daemon for RRDtool."
112
113FILES_rrdcached = "${bindir}/rrdcached \
114 ${systemd_unitdir}/system/rrdcached.service \
115 ${systemd_unitdir}/system/rrdcached.socket"
116
117FILES_${PN}-doc += "${datadir}/rrdtool/examples"
118
119DESCRIPTION_${PN}-perl = \
120"The ${PN}-perl package includes RRDtool bindings for perl."
121FILES_${PN}-perl = "${libdir}/perl/vendor_perl/*/*.pm \
122 ${libdir}/perl/vendor_perl/*/auto/RRDs/RRDs.*"
123RDEPENDS_${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
126DESCRIPTION_${PN}-python = \
127"The ${PN}-python package includes RRDtool bindings for python."
128FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
129RDEPENDS_${PN}-python = "python"
130
131FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/RRDs/.debug \
132 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug"