# SliTaz package receipt. PACKAGE="collectd" VERSION="5.12.0" CATEGORY="network" SHORT_DESC="System Statistics Collection Daemon." MAINTAINER="erjo@slitaz.org" LICENSE="GPL2" WEB_SITE="https://collectd.org" TARBALL="$PACKAGE-$VERSION.tar.bz2" WGET_URL="https://collectd.org/files/$TARBALL" DEPENDS="flex perl rrdtool" BUILD_DEPENDS="rrdtool-dev slitaz-toolchain" CONFIG_FILES="/etc/collectd/collectd.conf" # What is the latest version available today? current_version() { wget -O - $WEB_SITE 2>/dev/null | \ sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q } # Rules to configure and make the package. compile_rules() { ./configure \ --prefix=/usr \ --localstatedir=/var \ --sysconfdir=/etc/collectd \ --enable-cpu \ --enable-csv \ --enable-disk \ --enable-interface \ --enable-load \ --enable-logfile \ --enable-rrdtool \ --enable-syslog \ --with-librrdtool=/usr/include \ --disable-all-plugins \ $CONFIGURE_ARGS && make && make DESTDIR=$DESTDIR install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/lib/collectd mkdir -p $fs/usr/share mkdir -p $fs/etc/init.d cp -a $install/etc $fs cp -a $install/usr/share/collectd $fs/usr/share cp -a $install/usr/bin $fs/usr cp -a $install/usr/sbin $fs/usr cp -a $install/usr/lib/*.so* $fs/usr/lib cp -a $install/usr/lib/collectd/*.so $fs/usr/lib/collectd cp -a $install/usr/lib/perl5 $fs/usr/lib cp -a $install/var $fs # Add init script and fixes install -g root -o root -m 0755 $stuff/collectd \ $fs/etc/init.d chmod 0644 $fs/etc/collectd/* }