PATCH_LIST="decode-l4.diff silence-dropped-privs.diff" #PATCH_LIST="tcpdump-add-chroot-option.diff rpc-moved-to-netdb.diff" FILE_LIST= SRC_FETCH_METHOD=http SRC_FETCH_PATH=http://www.tcpdump.org/release/tcpdump-4.7.4.tar.gz MAKEDEPENDS=( "libpcap-1.7.4-*:::*.h *.a" ) function do_config { # this configure script is totally buggy, it messes with $prefix to check # for compile-time libraries. CC="$CC" CXX="$CXX" LD="$LD" \ RANLIB="$RANLIB" AR="$AR" AS="$AS" NM="$NM" OBJDUMP="$OBJDUMP" \ CFLAGS="$GCC_ARCH_CURRENT $GCC_CPU_CURRENT $GCC_OPT_FAST" \ CPPFLAGS="-I${FLXROOTDIR}/usr/include" \ LDFLAGS="-L${FLXROOTDIR}/usr/lib" \ LIBS="-lpcap" \ td_cv_buggygetaddrinfo=no \ ac_cv_path_PCAP_CONFIG=/bin/false \ ac_cv_linux_vers=2 \ ./configure --prefix=$FLXROOTDIR/usr --host=$FLXTARG --build=$FLXHOST --enable-ipv6 --with-user=nobody --without-cap-ng } function do_compile_only { $FLXPMAKE } function do_prepack { $FLXMAKE install DESTDIR=$ROOTDIR prefix=/usr set_default_perm $ROOTDIR # remove the second executable suffixed by the version rm -f $ROOTDIR/usr/sbin/tcpdump.* # change group to netpkt (91) chgrp 91 $ROOTDIR/usr/sbin/tcpdump chmod g-r,g+sx $ROOTDIR/usr/sbin/tcpdump }