-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
154 lines (119 loc) · 3.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
SUDO = sudo
MKDIR = mkdir --parents
LINK = ln --symbolic --force
PACMAN_FLAGS = --sync --refresh --needed --noconfirm
MAKE = make
TOUCH = touch
PACKAGES = \
telegram-desktop \
git \
ttf-dejavu \
ttf-droid \
ttf-bitstream-vera \
zip \
unzip \
unrar \
p7zip \
httpie \
vlc \
ntp \
deluge \
python \
python-pip \
mongodb \
gparted \
ack \
gvim \
zsh \
tmux \
xclip \
xorg-xrandr \
xscreensaver \
aws-cli \
docker
.PHONY: install yaourt packages git ack irssi tmux vim zsh
install: yaourt packages git ack irssi tmux vim zsh
yaourt: $(HOME)/.yaourt
$(HOME)/.yaourt:
echo | $(SUDO) tee --append /etc/pacman.conf
echo '[archlinuxfr]' | $(SUDO) tee --append /etc/pacman.conf
echo 'SigLevel = Never' | $(SUDO) tee --append /etc/pacman.conf
echo 'Server = http://repo.archlinux.fr/$$arch' | $(SUDO) tee --append /etc/pacman.conf
$(SUDO) pacman $(PACMAN_FLAGS) yaourt
$(TOUCH) $(HOME)/.yaourt
packages:
yaourt $(PACMAN_FLAGS)
yaourt --sync --needed $(PACKAGES)
# Install PHP and dependencies
php: $(HOME)/.php.5.6 php-pear-dependencies php-pecl-dependencies
.PHONY: php-pear-dependencies
php-pear-dependencies: $(HOME)/.php.5.6
$(SUDO) pear install -f PHP_CodeSniffer
.PHONY: php-pecl-dependencies
php-pecl-dependencies: $(HOME)/.php.5.6 $(HOME)/.xdebug
$(HOME)/.xdebug:
$(SUDO) pecl install -f xdebug
$(SUDO) $(LINK) $(CURDIR)/php/php.ini /etc/php/conf.d/php.ini
$(SUDO) $(LINK) $(CURDIR)/php/php-debug /usr/bin/php-debug
$(TOUCH) $(HOME)/.xdebug
$(HOME)/.php.5.6:
yaourt $(PACMAN_FLAGS) php php-pear php-composer
$(TOUCH) $(HOME)/.php.5.6
# Install Ruby 2.1.2
ruby: $(HOME)/.ruby.2.1.2
$(HOME)/.ruby.2.1.2: $(HOME)/.ruby-install
$(SUDO) ruby-install ruby 2.1.2
$(TOUCH) $(HOME)/.ruby.2.1.2
# Install ruby-install
$(HOME)/.ruby-install:
$(SUDO) wget -O /tmp/ruby-install-0.5.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.5.0.tar.gz
$(SUDO) tar -xzvf /tmp/ruby-install-0.5.0.tar.gz -C /tmp/ruby-install-0.5.0
$(SUDO) $(MAKE) -C /tmp/ruby-install-0.5.0/ install
$(TOUCH) $(HOME)/.ruby-install
# Configure git
git: $(HOME)/.gitconfig $(HOME)/.gitignore
$(HOME)/.gitconfig:
$(LINK) $(CURDIR)/git/config $(HOME)/.gitconfig
$(HOME)/.gitignore:
$(LINK) $(CURDIR)/git/ignore $(HOME)/.gitignore
# Configure Ack
ack: $(HOME)/.ack
$(HOME)/.ack:
$(LINK) $(CURDIR)/ack/config $(HOME)/.ack
# Configure Ctags
ctags: $(HOME)/.ctags
$(HOME)/.ctags:
$(LINK) $(CURDIR)/ctags/config $(HOME)/.ctags
# Configure IRSSI
irssi: $(HOME)/.irssi
$(HOME)/.irssi:
$(LINK) $(CURDIR)/irssi $(HOME)/.irssi
# Configure Tmux
tmux: $(HOME)/.tmux $(HOME)/.tmux.conf
$(HOME)/.tmux:
$(MKDIR) $(HOME)/.tmux
$(HOME)/.tmux.conf:
$(LINK) $(CURDIR)/tmux/config $(HOME)/.tmux/config
$(LINK) $(CURDIR)/tmux/tmux.conf $(HOME)/.tmux.conf
# Configure Vim
vim: $(HOME)/.vim/autoload/plug.vim $(HOME)/.vim/config $(HOME)/.vimrc update-vim-plugins
$(HOME)/.vim/autoload/plug.vim:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
$(HOME)/.vim/config:
$(LINK) $(CURDIR)/vim/config $(HOME)/.vim/config
$(HOME)/.vimrc:
$(MKDIR) $(HOME)/.vim
$(LINK) $(CURDIR)/vim/vimrc $(HOME)/.vimrc
.PHONY: update-vim-plugins
update-vim-plugins:
vim +PlugInstall
# Configure oh-my-zsh
zsh: $(HOME)/.zsh $(HOME)/.zshrc $(HOME)/.oh-my-zsh
$(HOME)/.zshrc:
$(LINK) $(HOME)/.oh-my-zsh/zshrc $(HOME)/.zshrc
$(HOME)/.zsh:
chsh -s /bin/zsh
$(TOUCH) $(HOME)/.zsh
$(HOME)/.oh-my-zsh:
git clone git://github.com/stupied4ever/oh-my-zsh.git $(HOME)/.oh-my-zsh