-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
208 lines (153 loc) · 5.52 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#
TEUNIX = `pwd`
SHELLS = csh tcsh bash zsh
# kubuntu (22) packages we really need to bootstrap teunix
UP = git emacs tcsh wget curl unzip openssh-server \
build-essential gfortran cmake pgplot5 pgplot5-dev xorg-dev libncurses-dev \
meld htop gitg gitk git-cvs \
exfat-fuse tkcvs net-tools ncftp autoconf \
python-is-python3 libtirpc-dev time libpng-dev
UP2 = plasma-widgets-addons kio-gdrive
# fedora packages
FP = make gcc gcc-gfortran gcc-g++ tcsh ncurses-devel libtirpc-devel libXext-devel libpng-devel
FP1 = pgplot pgplot-devel
URL1 = https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git
URL2 = https://github.com/torvalds/uemacs
URL3 = https://github.com/astroumd/sysadmin
URL4 = https://github.com/teuben/nemo
## help: This Help for given HOST
help : Makefile
@echo "HOST: `hostname`"
@sed -n 's/^##//p' $<
install:
@echo Some typical install notes
@echo teunix=$(TEUNIX)
## dpkg: 0. make a listing of the after installed packages
dpkg: dpkg0.list
## apt: 1a. My personal list of generic ubuntu packages I need
apt:
sudo apt install $(UP) -y
@echo If you have KDE, also "make apt2"
## apt2: 1b. My kubuntu addons (on regular ubuntu this would cause an avalanche)
apt2:
sudo apt install $(UP2) -y
## apt3: 1c. DIY list of URLs to download from
apt3:
@echo 'This is a DIY list:'
@echo 'ZOOM: https://zoom.us/download?os=linux'
## apt4: 1d. Enable universe
apt4:
sudo add-apt-repository universe
sudo apt-get update
## dnf0: bootstrap RPMFUSION for fedora (takes a while)
dnf0:
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$$(rpm -E %fedora).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$$(rpm -E %fedora).noarch.rpm
sudo dnf upgrade --refresh
sudo dnf groupupdate core
## dnf00 bootstrap RPMFUSION for redhat (takes a while)
dnf00:
sudo dnf install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$$(rpm -E %rhel).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$$(rpm -E %rhel).noarch.rpm
sudo dnf upgrade --refresh
sudo dnf groupupdate core
## dnf: basic packages
dnf:
sudo dnf install $(FP) -y
## dnf1: additional packages
dnf1:
sudo dnf install $(FP1) -y
all: $(SHELLS)
csh:
@test -f $(HOME)/.cshrc && echo You have a csh
tcsh:
@test -f $(HOME)/.tcshrc && echo You have a tcsh
bash:
@test -f $(HOME)/.bashrc && echo You have a bashrc
@test -f $(HOME)/.bash_login && echo You have a bash_login
zsh:
@if test -f $(HOME)/.zshrc; then\
echo You have a zshrc;\
echo 'test -f ~/teunix/Env/aliases.sh && source ~/teunix/Env/aliases.sh' ;\
fi
foo:
@test -f $(HOME)/.foo && echo You have a
## rc: 3. bootstrap the rc files
rc: $(HOME)/rc
@echo Now in rc:
@(cd ~/rc; ls *.rc)
$(HOME)/rc:
@if [ ! -d ~/rc ]; then mkdir ~/rc; fi
@touch ~/rc/none.rc
# See various comments in Env/README
## env: 4. Various environment patches
## env0: make apt-cache0.list a dpkg0.list
## env1: aliases.sh for .bashrc
## env2: .emacs
## env3: .git
## env4: ~/bin to PATH
## env5: .ssh/config
##
env: env0 env1 env2 env3 env4 env5 env6 env9 rc
env0: apt-cache0.list apt-cache1.list dpkg0.list
env1:
-@echo '[ -e ~/teunix/Env/aliases.sh ] && source ~/teunix/Env/aliases.sh' >> ~/.bashrc
env2:
-@[ ! -e ~/.emacs ] && ln -s ~/teunix/Env/dotemacs ~/.emacs
env3:
-@[ ! -e ~/.gitconfig ] && ln -s ~/teunix/Env/dotgitconfig ~/.gitconfig
env4:
-@[ ! -d ~/bin ] && ln -s ~/teunix/Env/bin ~/bin
env5:
-@mkdir -p ~/.ssh
ln -s ~/teunix/Env/ssh/config ~/.ssh/config
env6:
-@mkdir -p ~/.ipython/profile_default/startup
ln -s ~/teunix/Env/python/90-numpy.py ~/.ipython/profile_default/startup
env9:
@echo Do the /etc/hosts manually
## uemacs: 2. micro-emacs quick source install
uemacs:
git clone $(URL2)
@echo "Needs package libncurses-dev on Ubuntu"
@echo " ncurses-devel on Fedora"
@echo 'cd uemacs; make'
## mem: 2. install micro-emacs at ~/bin/mem
mem: uemacs ~/bin
(cd uemacs; make clean; make)
cp -a uemacs/em ~/bin/mem
## nemo: 8. simple NEMO bootstrap install [YAPP=pgplot]
YAPP = pgplot
nemo:
git clone $(URL4)
(cd nemo; ./configure --with-yapp=$(YAPP); make build check bench5)
apt-cache0.list:
apt-cache search . > apt-cache0.list
apt-cache1.list:
apt-cache pkgnames > apt-cache1.list
dpkg0.list:
dpkg --list > dpkg0.list
## sysadmin: 9. some private repo sysadmin stuff
sysadmin:
git clone $(URL3)
## hosts: 10. update your local /etc/hosts file (need root permission)
hosts:
(cd Env; sed -n '/HOSTSLOCAL/q;p' /etc/hosts > hosts; cat hosts.local >> hosts; sudo cp hosts /etc)
## pjt: 11. My super short reminder for my KDE desktop setup
pjt:
cat README.pjt
## diary: 12. My diary/yraid
diary:
mkdir -p ~/Diary
(cd ~/Diary; git clone https://github.com/teuben/yraid)
## brew: 13. Install Homebrew
brew:
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > brew.sh
bash brew.sh
# - run these two commmands
# (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/teuben/.bashrc
# eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
## zsh2: 14. Install oh-my-zsh
zsh2:
sh -c `wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -`
#sh -c `curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh`