Ticket #31330: ntop-4.1.0.diff
File ntop-4.1.0.diff, 10.8 KB (added by ryandesign (Ryan Carsten Schmidt), 13 years ago) |
---|
-
files/patch-autogen.sh.diff
1 --- autogen.sh.orig 2010-03-31 10:13:52.000000000 -0500 2 +++ autogen.sh 2011-09-11 00:47:04.000000000 -0500 3 @@ -202,15 +202,6 @@ 4 GNU_OR_DIE=0 5 } 6 7 -WGET=`find_command 'wget*'` 8 -($WGET --version) < /dev/null > /dev/null 2>&1 || 9 -{ 10 - echo 11 - echo "You must have wget installed to compile $progname." 12 - echo "Download the appropriate package for your distribution, or get the" 13 - echo "source tarball from ftp://ftp.gnu.org/pub/gnu/wget" 14 - GNU_OR_DIE=0 15 -} 16 17 if test "$GNU_OR_DIE" -eq 0; then 18 exit 1 19 @@ -311,9 +302,9 @@ 20 21 if [ ! -f libtool.m4.in ]; then 22 echo " Finding libtool.m4.in" 23 - if [ -f /usr/local/share/aclocal/libtool.m4 ]; then 24 - echo " .... found /usr/local/share/aclocal/libtool.m4" 25 - cp /usr/local/share/aclocal/libtool.m4 libtool.m4.in 26 + if [ -f __PREFIX__/share/aclocal/libtool.m4 ]; then 27 + echo " .... found __PREFIX__/share/aclocal/libtool.m4" 28 + cp __PREFIX__/share/aclocal/libtool.m4 libtool.m4.in 29 else 30 if [ -f /usr/share/aclocal/libtool.m4 ]; then 31 echo " .... found /usr/share/aclocal/libtool.m4" -
files/patch-external-geoip.diff
1 --- configure.in.orig 2009-08-05 19:30:31.141160363 +05302 +++ configure.in 2009-08-05 19:34:11.076160092 +05303 @@ -1962,40 +1962,23 @@4 }'`5 fi6 7 -dnl> GeoIP (http://www.maxmind.com/)8 -if test -f "GeoIP.tar.gz"; then9 - echo "GeoIP already present on this machine"10 -else11 - wget http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz12 -fi13 -tar xvfz GeoIP.tar.gz14 -GEO_DIR=`find $PWD -type d -name "GeoIP-*"`15 -cd $GEO_DIR; ./configure --prefix=${prefix}; make; cd ..16 -# OSX Fix17 -GEO_DYLIB="$GEO_DIR/libGeoIP/.libs/libGeoIP.dylib"18 -if test -f $GEO_DYLIB; then19 - ln -s $GEO_DYLIB .20 -fi21 -22 -if test -f "GeoLiteCity.dat"; then23 - echo "GeoLiteCity.dat already present"24 -else25 - wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz26 - gunzip GeoLiteCity.dat.gz27 -fi28 -29 -if test -f "GeoIPASNum.dat"; then30 - echo "GeoIPASNum.dat already present"31 -else32 - wget http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz33 - gunzip GeoIPASNum.dat.gz34 +#35 +#GeoIP36 +#37 +AC_CHECK_HEADERS(38 + [GeoIP.h],39 + [geoip_header="yes"],40 + [AC_MSG_FAILURE([GeoIP header file is missing])]41 +)42 +if test "$geoip_header" = "yes"; then43 + AC_CHECK_LIB(GeoIP, GeoIP_open,44 + [geoip_libs="yes"],45 + [AC_MSG_FAILURE([GeoIP library is missing])]46 + )47 +fi48 +if test "$geoip_libs" = "yes"; then49 + LDFLAGS="${LDFLAGS} -lGeoIP"50 fi51 -52 -53 -GEO_DIR=`find $PWD -type d -name "GeoIP-*"`54 -GEO_IP="$GEO_DIR/libGeoIP/"55 -CFLAGS="$CFLAGS -I$GEO_IP"56 -LDFLAGS="-L$GEO_IP.libs/ -lGeoIP $LDFLAGS"57 58 dnl> NTOPCONFIGDEBUG_SETTINGS([precet])59 -
files/ntop.sh
1 #!/bin/sh2 echo ntop will start in 60s3 sleep 604 __PREFIX__/bin/ntop @__PREFIX__/etc/ntop/ntop.conf -d5 -
files/patch-configure.in.diff
1 --- configure.in.orig 2011-08-15 03:34:28.000000000 -0500 2 +++ configure.in 2011-11-12 23:59:24.000000000 -0600 3 @@ -469,10 +469,6 @@ 4 LOCALEDIR="/usr/lib/locale" 5 fi 6 7 -dnl> Add /usr/local/ /opt/local 8 -CFLAGS="${CFLAGS} -I/usr/local/include -I/opt/local/include" 9 -CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/opt/local/include" 10 -LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/opt/local/lib" 11 12 PWD=`pwd` 13 14 @@ -1450,25 +1446,8 @@ 15 dnl> PYTHON 16 dnl> 17 AC_CHECK_TOOL(PYTHON, python-config) 18 - PYTHON_CONFIG="" 19 + PYTHON_CONFIG="$ac_cv_prog_ac_ct_PYTHON" 20 21 - if test "x$ac_cv_prog_ac_ct_PYTHON" != "xpython-config"; then 22 - if test -f "/etc/debian_version"; then 23 - AC_MSG_RESULT(Please install python-dev and rerun configure) 24 - exit 1 25 - else 26 - AC_MSG_RESULT(>>>> Unable to locate python-config: using workaround <<<<) 27 - dnl> Silly workaround for RedHat-like distro 28 - AC_CHECK_TOOL(PYTHON, python) 29 - if test "x$ac_cv_prog_ac_ct_PYTHON" = "xpython"; then 30 - PYTHON_CONFIG="./configureextra/python-config" 31 - else 32 - PYTHON_CONFIG="python-config" 33 - fi 34 - fi 35 - else 36 - PYTHON_CONFIG="python-config" 37 - fi 38 39 if test "x$PYTHON_CONFIG" != "x"; then 40 PYTHON_LIBS="`$PYTHON_CONFIG --libs`" 41 @@ -1480,7 +1459,7 @@ 42 43 dnl remove unecessary path 44 dnl line below workaround for OSX 10.6 (Snow Leopard)/10.7 (Lion) 45 - PYTHON_INCS=`$PYTHON_CONFIG --cflags | sed -e "s/-arch i386// | sed -e "s/-arch ppc// | sed -e "s/-arch x86_64//"` 46 + PYTHON_INCS=`$PYTHON_CONFIG --cflags | sed -e "s/-arch i386//" | sed -e "s/-arch ppc//" | sed -e "s/-arch x86_64//"` 47 INCS="${INCS} ${PYTHON_INCS}" 48 49 OLD_CFLAGS=$CFLAGS 50 @@ -1956,16 +1935,8 @@ 51 echo "#endif /* MEMORY_DEBUG */" >> version.c 52 53 case "${host}" in 54 - *darwin* ) 55 - echo 56 - echo "Copying patched versions of some configure-related files for Mac OS X" 57 - cp packages/MacOSX/lt* . 58 - rm -f libtool 59 - ln -s /usr/bin/glibtool libtool 60 - echo 61 - ;; 62 *) 63 - LIBTOOL_PATH="/usr/bin/libtool" 64 + LIBTOOL_PATH="${prefix}/bin/glibtool" 65 if test -x ${LIBTOOL_PATH}; then 66 rm -f libtool 67 ln -s ${LIBTOOL_PATH} libtool -
files/patch-Makefile.am.diff
1 --- Makefile.am.orig 20 09-04-17 17:27:57.000000000 -03002 +++ Makefile.am 20 09-09-15 13:07:19.000000000 -03003 @@ - 76,9 +76,7 @@1 --- Makefile.am.orig 2011-03-03 07:44:59.000000000 -0600 2 +++ Makefile.am 2011-11-12 23:33:32.000000000 -0600 3 @@ -67,9 +67,7 @@ 4 4 NTOPDATA = ntop-cert.pem \ 5 5 $(ETTER_PASSIVE) \ 6 6 oui.txt.gz \ … … 11 11 12 12 NTOPHTML = html html/*.js html/*.html html/*.gif html/*.jpg html/*.ico html/*.png \ 13 13 html/*.css html/*.dtd \ 14 @@ -270,8 +268,6 @@ 15 16 install: install-recursive 17 18 - cd @GEO_DIR@; make install 19 - 20 @mkdir -p $(DESTDIR)/$(CFG_DBFILE_DIR) 21 22 @echo "" 23 @@ -341,7 +337,6 @@ 14 @@ -328,7 +326,7 @@ 15 install-selinux-policy: 24 16 chcon -t textrel_shlib_t $(DESTDIR)$(libdir)/*ntop*.so 25 17 26 install-data-local: ntop.txt ntop.html faq.html 27 - @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)/plugins; 18 -install-data-local: ntop.txt ntop.html faq.html dnetter 19 +install-data-local: ntop.txt ntop.html faq.html 20 @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)/plugins; 28 21 @if ! test -d $(DESTDIR)/$(datadir)/ntop; then \ 29 22 $(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop; \ 30 touch $(DESTDIR)/$(datadir)/ntop/warnuser; \ -
Portfile
4 4 PortSystem 1.0 5 5 6 6 name ntop 7 version 3.3.10 8 revision 5 7 version 4.1.0 9 8 categories net 10 9 maintainers markd openmaintainer 11 10 description network traffic probe … … 14 13 usage, similar to what the popular top Unix command does. 15 14 16 15 homepage http://www.ntop.org/ 17 master_sites sourceforge 18 checksums md5 6e2ffa90d5f935c8f03d88a5dd19a866 16 master_sites sourceforge:project/ntop/ntop/Stable/ 19 17 20 patchfiles patch-external-geoip.diff\21 patch-Makefile.am.diff18 checksums rmd160 6f10e30e1b2870fc1ec327512e17cfbe0783faa4 \ 19 sha256 c71e5563879ec1866296825e1705f30b5a67eb87c9abfbd7dc1c5baeed0384a4 22 20 23 21 depends_build port:gawk \ 24 port:wget \ 22 port:automake \ 23 port:autoconf \ 24 port:libtool \ 25 25 port:rrdtool \ 26 26 port:libevent 27 27 28 depends_lib port:libpcap \ 28 29 port:gd2 \ 29 30 port:libpng \ 30 31 port:gdbm \ 31 port:libgeoip 32 port:libgeoip \ 33 port:python27 32 34 33 configure.cflags-append -I${prefix}/include 34 configure.args --mandir=${prefix}/share/man \ 35 --with-localedir=${prefix}/share/locale \ 36 --with-rrd-home=${prefix} \ 35 patchfiles patch-Makefile.am.diff \ 36 patch-autogen.sh.diff \ 37 patch-configure.in.diff 38 #patch-external-geoip.diff 39 40 post-patch { 41 reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/autogen.sh 42 } 43 44 use_autoconf yes 45 autoconf.cmd ${worksrcpath}/autogen.sh 46 autoconf.args --noconfig 47 48 configure.env LOCALEDIR=${prefix}/share/locale \ 49 PYTHON=${prefix}/bin/python2.7-config 50 51 configure.args --with-rrd-home=${prefix} \ 37 52 --without-ssl 38 53 39 use_autoconf yes40 54 build.type gnu 41 55 42 # Create a startupitem to start/stop the server 43 startupitem.create yes 44 startupitem.start "${prefix}/share/${name}/ntop.sh" 45 startupitem.stop "${prefix}/share/${name}/ntop.sh" 56 startupitem.create yes 57 startupitem.executable ${prefix}/bin/ntop @${prefix}/etc/ntop/ntop.conf 46 58 47 pre-configure { 48 system "cd ${worksrcpath} && ./autogen.sh --noconfig" 49 } 59 destroot.keepdirs ${destroot}${prefix}/var/ntop/rrd 50 60 51 61 post-destroot { 52 62 xinstall -m 755 -o nobody -d ${destroot}${prefix}/var/ntop \ 53 63 ${destroot}${prefix}/var/ntop/rrd 54 system "cd ${destroot}${prefix}/var/ntop && \55 touch addressQueue.db dnsCache.db macPrefix.db \56 ntop_pw.db prefsCache.db rrd/.turd"57 system "chown -R nobody ${destroot}${prefix}/var/ntop"58 64 59 65 xinstall -m 755 -d ${destroot}${prefix}/etc/ntop 60 66 xinstall -m 755 \ 61 67 ${worksrcpath}/packages/FreeBSD-ports/net/ntop/files/ntop.conf.sample \ 62 ${destroot}${prefix}/etc/ntop /ntop.conf68 ${destroot}${prefix}/etc/ntop 63 69 reinplace "s|%%DBDIR%%/ntop|${prefix}/var/ntop|g" \ 64 ${destroot}${prefix}/etc/ntop/ntop.conf 70 ${destroot}${prefix}/etc/ntop/ntop.conf.sample 65 71 reinplace "s|#--interface sis0|--interface en0|g" \ 66 ${destroot}${prefix}/etc/ntop/ntop.conf 72 ${destroot}${prefix}/etc/ntop/ntop.conf.sample 73 } 67 74 68 xinstall -m 755 ${filespath}/ntop.sh \ 69 ${destroot}${prefix}/share/ntop/ntop.sh 70 reinplace "s|__PREFIX__|${prefix}|g" \ 71 ${destroot}${prefix}/share/ntop/ntop.sh 75 post-activate { 76 foreach f {addressQueue.db dnsCache.db macPrefix.db ntop_pw.db prefsCache.db} { 77 if {![file exists ${prefix}/var/ntop/${f}]} { 78 touch ${prefix}/var/ntop/${f} 79 file attributes ${prefix}/var/ntop/${f} -owner nobody 80 } 81 } 82 if {![file exists ${prefix}/etc/ntop/ntop.conf]} { 83 copy ${prefix}/etc/ntop/ntop.conf.sample ${prefix}/etc/ntop/ntop.conf 84 } 72 85 } 73 86 74 # ticket #27472; check if this is still a problem when updating to 4.1.x75 universal_variant no76 77 87 livecheck.regex /${name}-(\[0-9.\]+)${extract.suffix}