# fss-0002

main:
  sed -i -e "s|/usr/bin/env python|$(type -p python)|g" zenmap/zenmap
  find -type f -name '*.py' -exec sed -i -e "s|/usr/bin/env python|$(type -p python)|g" '{}' ';'
  ./configure $CONF --with-libpcap=/ --with-openssl=/ --with-libpcre=/ --without-ndiff $TARGET 
  sed -i -e 's|libdnet-stripped/src/.libs/libdnet.a|libdnet-stripped/src/.libs/libdnet.so|' Makefile
  sed -i -e 's|libdnet-stripped/src/.libs/libdnet.a|libdnet-stripped/src/.libs/libdnet.so|' nping/Makefile
  sed -i -e '/rpl_malloc/d' -e '/rpl_realloc/d' ncat/config.h
  sed -i -e 's|$(LIBPCAPDIR)/libpcap.a|-lpcap|' nping/Makefile
  tkis_local_push program libdnet-stripped
  sed -i -e 's|eth-none|eth-linux|g' Makefile include/dnet/Makefile src/Makefile include/Makefile
  make
  tkis_local_push program
  make
  make install
  cp -vP libdnet-stripped/src/.libs/libdnet.so* /lib/
  tkis_local_pop
  chgrp e_network_admin -R /share/nmap /bin/nmap /lib/libdnet.so* /bin/zenmap /share/zenmap /bin/nping
  chmod o-rx -R /share/nmap /bin/nmap /lib/libdnet.so* /bin/zenmap /share/zenmap /bin/nping
  find /share/nmap /share/zenmap -type d -exec chmod g+s '{}' ';'
  rm -Rf /bin/uninstall_zenmap /bin/nmapfe
  cp -v ${PR}network_scanner.desktop /share/applications/
  chgrp e_network /bin/ncat /share/ncat
  chmod o-rx /bin/ncat /share/ncat
  find /share/ncat -type d -exec chmod g+s '{}' ';'
  rm -vf /share/applications/zenmap{-root,}.desktop
