#!/bin/sh

# little things
sudo adduser $USER dialout
sudo adduser $USER plugdev

ver=`uname -r`
echo "Build packages:"
sudo apt-get install -y build-essential
sudo apt-get install -y linux-headers-$ver
echo

# Must have
echo "Essentials:"
sudo apt-get install -y --ignore-missing git git-extras git-cola subversion subversion-tools openssh-server imagemagick bc ddd flip tcpdump zip unzip minicom netcat putty filezilla vlc terminator guake exfat-fuse exfat-utils openssh-server x11vnc xtightvncviewer geeqie okular ocaml
echo

echo "Network:"
sudo apt-get install -y --ignore-missing nfs-common nfs-kernel-server net-tools chkrootkit secure-delete hashdeep kismet kismet-plugins netcat socat cryptcat dsniff etherape socat spectools tcpdump tshark wireshark nethogs wifite tcpreplay bittwist ethtool
echo

echo "Bluetooth (install libbtbb and ubertooth manually):"
sudo apt-get install -y --ignore-missing bluez-tools bluez-tests bluez-hcidump ubertooth-firmware spectools bluedevil blueman bluewho btscanner
echo ""

echo "Virtual:"
sudo apt-get install -y --ignore-missing docker docker.io qemu qemu-kvm qemu-user qemu-system qemu-utils virtualbox virtualbox-guest-additions-iso
echo

sudo adduser $USER docker
echo "==========="

# Development
echo "C/C++ Development:"
sudo apt-get install -y --ignore-missing libboost-dev libbz2-dev libgd-dev libmuparser-dev libmysqlclient-dev libxml2-dev xutils-dev libbz2-dev libkml-dev libmuparser-dev libmuparserx-dev liburiparser-dev libpopt-dev libpcap-dev libsodium-dev libxml2-dev mingw-w64 clang diffutils doxygen doxygen-gui graphviz patch ctags radare2 autoconf qt5-qmake qtbase5-dev kdevelop qt5-default qtcreator pyqt5-dev pyqt5-dev-tools protobuf-c-compiler protobuf-compiler cmake libjson-c-dev
echo

echo "32 bit Development"
sudo apt-get install -y --ignore-missing libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
echo

echo "Java:"
sudo apt-get install -y --ignore-missing netbeans

echo "Other languages:"
sudo apt-get install -y --ignore-missing golang julia lua5.3 rustc ruby-full
echo

echo "Python 3 packages:"
sudo apt-get install -y --ignore-missing python3-all python3-pip python3-dev python3-tk idle3 spyder3 python3-numpy python3-serial python3-can virtualenv virtualenvwrapper
sudo apt-get install -y --ignore-missing python3-pil.imagetk glade python3-gi pyqt5-dev pyqt5-dev-tools
sudo -H pip install --upgrade pip

for i in pyserial numpy pyasn1 matplotlib pyqt5 scapy pyside2
do
  echo $i
  echo -----------
  sudo -H pip install $i
done
echo "=================="
echo

# Packages
echo "Automotive CAN/GPS:"
sudo apt-get install -y --ignore-missing can-utils gis-gps gpsbabel gpsbabel-gui gpsman maptool marble navit viking gpsd gpsd-clients
echo

echo "GNU/SDR Radio"
sudo apt-get install -y --ignore-missing airspy bladerf hackrf gnuradio gr-air-modes gr-fosphor gr-osmosdr gqrx-sdr inspectrum osmo-sdr rtl-sdr quisk librtlsdr-dev
echo

echo "HAM Radio:"
sudo apt-get install -y --ignore-missing hamradio-antenna hamradio-datamodes hamradio-digitalvoice hamradio-logging hamradio-packetmodes hamradio-rigcontrol hamradio-satellite hamradio-sdr hamradio-tasks hamradio-tools icom chirp fldigi grig gpredict wsjtx
echo

echo "Debian Science:"
#sudo apt-get install -y --ignore-missing science-astronomy science-electronics science-engineering science-mathematics science-physics science-viewing
sudo apt-get install -y --ignore-missing freemat scilab octave
echo

echo "Cryptography:"
sudo apt-get install -y --ignore-missing codecrypt libsodium-dev libcrypto++-dev
echo

echo "Embedded:"
sudo apt-get install -y --ignore-missing arduino avrdude avarice gdb-avr binutils-avr avr-libc crasm d52 pasmo sdcc sdcc-libraries as31 dis51 emu8051 mcu8051ide s51dude gcc-m68hc1x binutils-m68hc1x z80asm z80dasm libnewlib-dev flashrom openocd usbprog usbprog-gui setserial
echo

echo "Robotics:"
sudo apt-get install -y --ignore-missing brickos lnpd nbc nqc
echo

echo "Emulators:"
echo
sudo apt-get install -y --ignore-missing bochs bochsbios cpmtools dosbox dosemu wine-stable

# Snap
#for i in pycharm-community
#do
#   snap install $i --classic
#done

# Cleanup
sudo apt-get autoremove
sudo apt-get clean

# Tweaks
git config --global user.email "nprobert@probestar.net"
git config --global user.name "Neal Probert"
git config --global credential.helper cache
