-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
74 lines (64 loc) · 1.88 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
#Debian 12 Minimal System Global Makefile Install
TPMTL_PATH = ./template
BASEDIR:=$(shell dab basedir)
global: info/init_ok sysinst addpkg base_config end
end:
# ========================
# Create OpenVZ Appliance
# ========================
dab finalize --compressor zstd-max
info/init_ok: dab.conf
dab init
touch $@
sysinst:
# =======================
# Sys Install
#========================
# Minimal debootstrap
@dab bootstrap --minimal
# locales
@dab install locales
@sed -e 's/^# it_IT.UTF-8/it_IT.UTF-8/' -i ${BASEDIR}/etc/locale.gen
@sed -e 's/^# it_IT@euro/it_IT@euro/' -i ${BASEDIR}/etc/locale.gen
@dab exec dpkg-reconfigure locales
# default locale to it_IT UTF8
@echo "LANG=it_IT.UTF-8" > ${BASEDIR}/etc/default/locale
# Set timezone to Europe/Rome
@echo "Europe/Rome" > ${BASEDIR}/etc/timezone
@dab exec rm -f /etc/localtime
@dab exec cp -f /usr/share/zoneinfo/Europe/Paris /etc/localtime
addpkg:
# =========================
# Add pkg
# =========================
@dab install debian-archive-keyring
@dab install debian-keyring
@dab install sudo
@dab install git
@dab install htop
@dab install unattended-upgrades
@dab install wget
@dab install apt-transport-https
@dab install net-tools
@dab install pciutils
@dab install screenfetch
@dab install ncdu
@dab install python3-pip
@dab install libpq-dev
@dab install curl
base_config:
# =====================
# Sys Config
# =====================
install -m 0644 $(TPMTL_PATH)/profile ${BASEDIR}/etc/profile
install -m 0644 $(TPMTL_PATH)/bash.bashrc ${BASEDIR}/etc/bash.bashrc
# Network config sample
install -m 0644 $(TPMTL_PATH)/interfaces.static ${BASEDIR}/etc/network/interfaces.static
.PHONY: clean
clean:
dab clean
rm -f *~
.PHONY: dist-clean
dist-clean:
dab dist-clean
rm -f *~