forked from cbsd/reggae
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
180 lines (168 loc) · 4.7 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
BIN = /bin
PREFIX ?= /usr/local
REGGAE_DIR ?= share/reggae
TEMPLATE_DIR = /${REGGAE_DIR}/templates
MAKE_DIR = /${REGGAE_DIR}/mk
SCRIPTS_DIR = /${REGGAE_DIR}/scripts
CBSD_PROFILE_DIR = /${REGGAE_DIR}/cbsd-profile
FRAMEWORKS_DIR = /${REGGAE_DIR}/mk/frameworks
BIN_FILES = reggae
TEMPLATES = Makefile.project \
Makefile.service \
base-jail.conf \
cbsd.conf.tpl \
cbsd-bhyve.freebsd.conf.tpl \
cbsd-vnet.conf.tpl \
cloud-devops.sh \
cloud-initial.sh \
devfs.rules \
dhcpd-hook.sh \
dhcpd.conf \
dhcpd6.conf \
export-ports.sh \
freebsd-update.conf \
gitignore \
gitignore.project \
initenv.conf \
install-packages.sh \
ip-by-mac.sh \
linux.conf.tpl \
master.conf \
master.fstab \
mount-project.sh \
netif \
network \
network-jail.conf \
nsd.conf \
pf-jail.conf \
pf.conf \
pkg.conf \
reggae-register.sh \
resolvconf.conf \
rtadvd.conf \
rtsold \
setup-vm.sh \
sudoers \
unbound.conf \
unbound_control.conf \
unbound_reggae.conf \
xorg.sh
ANSIBLE_TEMPLATES = ansible/inventory.local.tpl ansible/inventory.remote.tpl
ANSIBLE_GROUP_TEMPLATES = ansible/group_vars/all.tpl
CLOUDINIT_TEMPLATES = cloud-init/meta-data \
cloud-init/user-data
MAKEFILES = ansible.mk \
base-jail.mk \
bhyve-service.mk \
cbsd-jail.mk \
chef.mk \
common.mk \
frameworks/freenit.project.mk \
frameworks/freenit.service.mk \
jail-service.mk \
project.mk \
puppet.mk \
salt.mk \
service.mk \
shell.mk \
use.mk
FRAMEWORKS_MAKEFILES = frameworks/freenit.project.mk \
frameworks/freenit.service.mk
SCRIPTS = apply-proxy.sh \
backend-init.sh \
base-init.sh \
base-network-init.sh \
bhyve-init.sh \
cbsd-init.sh \
cbsd-network-init.sh \
chef-provision.sh \
expect-run.sh \
export.sh \
get-config.sh \
get-ip.sh \
host-init.sh \
import.sh \
init.sh \
jexec.sh \
mkjail.sh \
network-init.sh \
pf.sh \
pkg-upgrade.sh \
project-init.sh \
puppet-provision.sh \
read-pass.sh \
rmjail.sh \
salt-provision.sh \
scp.sh \
service.sh \
shell-provision.sh \
ssh-ping.sh \
ssh.sh \
start.sh \
stop.sh \
update-base.sh \
update-profiles.sh \
utils.sh \
version.sh
MAN_FILES = reggae.1
CBSD_PROFILE_ITEMS = skel \
system \
reggae-jail.conf
all: compress_man
compress_man:
.for man_file in ${MAN_FILES}
gzip -f -k man/${man_file}
.endfor
install: install_bin install_templates install_makefiles install_scripts install_man install_profile install_frameworks
install -d ${DESTDIR}${PREFIX}/etc
install -m 0644 reggae.conf.sample ${DESTDIR}${PREFIX}/etc
install -m 0600 id_rsa id_rsa.pub ${DESTDIR}${PREFIX}/${REGGAE_DIR}
install -m 0644 scripts/default.conf ${DESTDIR}${PREFIX}${SCRIPTS_DIR}/default.conf
cp -r skel ${DESTDIR}${PREFIX}/${REGGAE_DIR}
install_bin:
install -d ${DESTDIR}${PREFIX}${BIN}
.for bin_file in ${BIN_FILES}
install -m 0755 bin/${bin_file} ${DESTDIR}${PREFIX}${BIN}
.endfor
install_templates:
install -d ${DESTDIR}${PREFIX}${TEMPLATE_DIR}
install -d ${DESTDIR}${PREFIX}${TEMPLATE_DIR}/ansible
install -d ${DESTDIR}${PREFIX}${TEMPLATE_DIR}/ansible/group_vars
install -d ${DESTDIR}${PREFIX}${TEMPLATE_DIR}/cloud-init
.for template_file in ${TEMPLATES}
install -m 0644 templates/${template_file} ${DESTDIR}${PREFIX}${TEMPLATE_DIR}
.endfor
.for template_file in ${ANSIBLE_TEMPLATES}
install -m 0644 templates/${template_file} ${DESTDIR}${PREFIX}${TEMPLATE_DIR}/ansible
.endfor
.for template_file in ${ANSIBLE_GROUP_TEMPLATES}
install -m 0644 templates/${template_file} ${DESTDIR}${PREFIX}${TEMPLATE_DIR}/ansible/group_vars
.endfor
.for template_file in ${CLOUDINIT_TEMPLATES}
install -m 0644 templates/${template_file} ${DESTDIR}${PREFIX}${TEMPLATE_DIR}/cloud-init
.endfor
install_makefiles:
install -d ${DESTDIR}${PREFIX}${MAKE_DIR}
.for make_file in ${MAKEFILES}
install -m 0644 mk/${make_file} ${DESTDIR}${PREFIX}${MAKE_DIR}
.endfor
install_scripts:
install -d ${DESTDIR}${PREFIX}${SCRIPTS_DIR}
.for script_file in ${SCRIPTS}
install -m 0755 scripts/${script_file} ${DESTDIR}${PREFIX}${SCRIPTS_DIR}
.endfor
install_man:
install -d ${DESTDIR}${PREFIX}/man/man1
.for man_file in ${MAN_FILES}
install -m 0644 man/${man_file}.gz ${DESTDIR}${PREFIX}/man/man1
.endfor
install_profile:
install -d ${DESTDIR}${PREFIX}${CBSD_PROFILE_DIR}
cp -r cbsd-profile/* ${DESTDIR}${PREFIX}${CBSD_PROFILE_DIR}/
install_frameworks:
install -d ${DESTDIR}${PREFIX}${FRAMEWORKS_DIR}
.for framework_file in ${FRAMEWORKS_MAKEFILES}
install -m 0644 mk/${framework_file} ${DESTDIR}${PREFIX}${FRAMEWORKS_DIR}
.endfor
clean:
rm man/*.gz