#!/bin/sh # Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PACKAGE="ngrep" PACKAGE_EXT="gz" VERSION=${VERSION:=1.47} BUILD=${BUILD:-1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="V1_47.tar.$PACKAGE_EXT" URL="http://prdownloads.sourceforge.net/ngrep/$SRC" URL="https://github.com/jpr5/ngrep/archive/$SRC" get_source $SRC $URL unpack_source $SRC ngrep-1_47 CFLAGS=$SLKCFLAGS \ ./configure \ --prefix=/usr \ --libdir=${LIBDIR} \ --mandir=/usr/man \ --sysconfdir=/etc \ --datadir=/usr/share \ --localstatedir=/var/lib \ --enable-ipv6 \ --with-pcap-includes=/usr/include/pcap \ --build=$ARCH-slackware-linux || exit 1 make make DESTDIR=$PKG install cd $PKG/usr mv share/man . rmdir share cd - mkdir -p $DOCS cp -a CHANGES *.md LICENSE $DOCS fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi