#!/bin/bash # # rrdtool.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # rrdtool.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="rrdtool" PACKAGE_EXT="gz" VERSION=${VERSION:=1.8.0} BUILD=${BUILD:=1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="https://github.com/oetiker/rrdtool-1.x/releases/download/v$VERSION/$SRC" get_source $SRC $URL unpack_source $SRC $PACKAGE-$VERSION CFLAGS="$SLKCFLAGS" ./configure \ --prefix=/usr \ --libdir=${LIBDIR} \ --mandir=/usr/man \ --docdir=/usr/doc/$PACKAGE-$VERSION \ --enable-static=no \ --enable-perl \ --enable-perl-site-install \ --with-perl-options='INSTALLDIRS=vendor' \ --disable-ruby \ --disable-python \ --build=$ARCH-slackware-linux || exit 1 # --with-perl-options='INSTALLDIRS=vendor' \ make -j3 || exit 2 # Correct man paths in the Perl bindings. sed -r -i 's|/usr/share/man|/usr/man|g' bindings/perl-piped/Makefile sed -r -i 's|/usr/share/man|/usr/man|g' bindings/perl-shared/Makefile make install DESTDIR=$PKG mv $PKG/usr/share/man/man3/* $PKG/usr/man/man3 rm -rf $PKG/usr/share/man mkdir -p $DOCS cp -a CHANGES CONTRIBUTORS COPY* LICENSE NEWS THREADS TODO $DOCS mv $PKG/usr/share/doc/rrdtool-$VERSION/* $DOCS mv $PKG/usr/share/rrdtool/examples $DOCS rm -rf $PKG/usr/share/doc $PKG/usr/share/rrdtool find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi