2021-05-30 00:14:47 +02:00
|
|
|
MSG=@
|
2021-09-01 14:47:30 +02:00
|
|
|
IGNORE_DOT_FILES=. .. .git .gitmodules .gitignore .config
|
|
|
|
DOT_FILES=$(filter-out $(IGNORE_DOT_FILES), $(wildcard .*) .ssh/config $(wildcard .config/*))
|
2021-05-30 00:14:47 +02:00
|
|
|
DOT_INSTALLED=$(foreach dot, $(DOT_FILES), $(HOME)/$(dot))
|
|
|
|
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
2021-09-01 14:47:30 +02:00
|
|
|
PKG_ARCH_BASE=aspell-en aspell-fr conky cscope ctags dunst eog firefox noto-fonts-emoji fzf git gmrun gnome-terminal genius gvim hunspell-fr hyphen-en hyphen-fr lightdm numlockx openssh polkit-gnome python3 sudo tint2 tmux unrar unzip udevil zsh xclip openbox obconf
|
|
|
|
PKG_ARCH_DEV=autopep8 bear cppcheck clang flake8 gcc hstr shellcheck strace gitk tig
|
|
|
|
|
|
|
|
PKG_UBUNTU_BASE=aspell-en aspell-fr conky cscope exuberant-ctags dunst eog firefox git gmrun gnome-terminal genius vim-gtk3 hunspell-fr hyphen-fr lightdm numlockx python3 sudo tint2 tmux unrar unzip udevil zsh openbox obconf
|
2021-09-13 11:45:17 +02:00
|
|
|
|
|
|
|
PKG_UBUNTU_DEV=bear cppcheck clang flake8 gcc shellcheck strace gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 libncurses5-dev lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig clangd-10 clang-tools gitk tig android-sdk-platform-tools-common cmake-curses-gui git-lfs
|
2021-05-30 00:14:47 +02:00
|
|
|
|
|
|
|
ifeq ($(USER), root)
|
|
|
|
$(info Should not be run as root)
|
|
|
|
$(info Put youself in wheel group and add \"%wheel ALL=(ALL) NOPASSWD: ALL\" to /etc/sudoers)
|
|
|
|
$(error Should not be run as root)
|
|
|
|
endif
|
|
|
|
|
2021-06-28 23:14:52 +02:00
|
|
|
all: conf
|
2021-05-30 00:14:47 +02:00
|
|
|
|
2021-06-28 23:14:52 +02:00
|
|
|
conf:$(DOT_INSTALLED)
|
2021-05-30 00:14:47 +02:00
|
|
|
git submodule update --init
|
|
|
|
|
2021-09-01 14:47:30 +02:00
|
|
|
%_all: conf %_install_base %_install_dev
|
2021-06-28 23:14:52 +02:00
|
|
|
vim -c :PluginInstall -c :xa
|
|
|
|
|
2021-05-30 00:14:47 +02:00
|
|
|
$(HOME)/%: $(ROOT_DIR)/%
|
|
|
|
$(MSG)echo "installing $@"
|
|
|
|
$(MSG)ln -s $< $@
|
|
|
|
|
2021-06-28 23:14:52 +02:00
|
|
|
.ONESHELL:
|
2021-05-30 00:14:47 +02:00
|
|
|
/usr/bin/yay:
|
|
|
|
sudo pacman -Sy --needed git base-devel
|
|
|
|
git clone https://aur.archlinux.org/yay.git
|
|
|
|
cd yay && makepkg -s -i
|
2021-06-28 23:14:52 +02:00
|
|
|
cd ..
|
2021-05-30 00:14:47 +02:00
|
|
|
rm -rf yay
|
|
|
|
|
2021-09-01 14:47:30 +02:00
|
|
|
ubuntu_install_base:
|
|
|
|
$(info going to install $(PKG_UBUNTU_BASE))
|
2021-09-06 16:29:29 +02:00
|
|
|
sudo apt install -y $(PKG_UBUNTU_BASE)
|
2021-09-01 14:47:30 +02:00
|
|
|
|
|
|
|
ubuntu_install_dev:
|
|
|
|
$(info going to install $(PKG_UBUNTU_DEV))
|
2021-09-06 16:29:29 +02:00
|
|
|
sudo apt install -y $(PKG_UBUNTU_DEV)
|
2021-09-01 14:47:30 +02:00
|
|
|
|
2021-05-30 00:14:47 +02:00
|
|
|
arch_install_base: /usr/bin/yay
|
|
|
|
$(info going to install $(PKG_ARCH_BASE))
|
|
|
|
yay -Sy --needed $(PKG_ARCH_BASE)
|
|
|
|
|
|
|
|
arch_install_dev: /usr/bin/yay
|
|
|
|
$(info going to install $(PKG_ARCH_DEV))
|
|
|
|
yay -Sy --needed $(PKG_ARCH_DEV)
|
|
|
|
|
|
|
|
|
|
|
|
udevil_install: arch_install_base
|
|
|
|
ifneq (,$(wildcard /etc/systemd/system/multi-user.target.wants/devmon@$(USER).service))
|
|
|
|
$(MSG)echo "udevil already installed"
|
|
|
|
else
|
|
|
|
sudo systemctl enable devmon@$(USER)
|
|
|
|
sudo systemctl start devmon@$(USER)
|
|
|
|
endif
|