Makefile 2.41 KB
Newer Older
1
all: help
2

3 4 5 6 7 8
ubuntu: basic pip setup ubuntu-neovim

debian: debian-sources debian-firmware debian-fonts \
	 	basic pip setup debian-neovim

basic:
9 10
	sudo apt-get install vim git tree dialog ctags curl tmux rsync colordiff \
		python3-tk
11

12
pip:
Nelso Jost's avatar
Nelso Jost committed
13 14 15 16
	wget https://bootstrap.pypa.io/get-pip.py
	sudo python3 get-pip.py
	sudo python get-pip.py
	rm get-pip.py
17

18 19 20 21 22
pio:
	sudo pip2 install platformio
	sudo usermod -a -G tty $$USER
	sudo usermod -a -G dialout $$USER

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
setup:
	rsync -rtv home/ ~/
	sudo rsync -rtv etc/default/keyboard /etc/default/keyboard

save:
	rsync -rtv --exclude "undo" ~/.config/nvim/ home/.config/nvim/
	cp -rfv ~/.bashrc ~/.inputrc ~/.tmux.conf home/
	git status

debian-sources:
	sudo cp etc/apt/preferences.d/* /etc/apt/preferences.d/
	sudo cp etc/apt/sources.list.d/* /etc/apt/sources.list.d/
	sudo apt-get update

debian-firmware:
	sudo apt-get install firmware-intelwimax firmware-iwlwifi \
		firmware-libertas firmware-realtek firmware-linux-nonfree \
		libgl1-mesa-dri xserver-xorg-video-ati

debian-fonts:
	sudo sh -c 'echo "$$INFINALITY_PPA" > /etc/apt/sources.list.d/infinality-ppa.list'
	sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E985B27B
	sudo apt-get update
	sudo apt-get install fontconfig-infinality
	sudo rm /etc/apt/sources.list.d/infinality-ppa.list
	wget http://mirrors.kernel.org/ubuntu/pool/main/u/ubuntu-font-family-sources/ttf-ubuntu-font-family_0.80-0ubuntu6_all.deb
	sudo dpkg -i ttf-ubuntu-font-family*.deb
	sudo rm ttf-ubuntu-font-family*.deb

debian-neovim:
	sudo apt-get install -t testing neovim
54 55
	sudo pip install neovim
	sudo pip3 install neovim
56
	$(MAKE) vimplug-nvim
57

58
ubuntu-neovim:
59
	sudo add-apt-repository ppa:neovim-ppa/stable
60
	sudo apt-get update || sudo apt-get install neovim
61
	$(MAKE) vimplug-nvim
62

63
vimplug-nvim:
64 65
	curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
		https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
66
	nvim +PlugInstall +qall
67

68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
help:
	@ echo "$$HELP_MAKEFILE"


define HELP_MAKEFILE
Usage:  make <target>   where <target> can be:

  debian       setup sources.list & install firmware + packages
  ubuntu       install basic packages

  setup        setup user home config files
  save         copy current user config to the repo
endef
export HELP_MAKEFILE


define INFINALITY_PPA
deb http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu trusty main
deb-src http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu trusty main
endef
export INFINALITY_PPA
89