summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 3781a6f7147c0bf56448ee17f0a33bd22a0261d7 (plain)
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
#!/usr/bin/make -f

DIR := debian/vyos-1x
VYOS_SBIN_DIR := opt/vyatta/sbin/
VYOS_BIN_DIR := opt/vyatta/bin/
VYOS_LIBEXEC_DIR := opt/vyatta/libexec
VYOS_CFG_TMPL_DIR := /opt/vyatta/share/vyatta-cfg/templates
VYOS_OP_TMPL_DIR := /opt/vyatta/share/vyatta-op/templates

%:
	dh $@ --with python3, --with quilt

override_dh_auto_build:
	make all

override_dh_auto_install:
	dh_install -pvyos-1x
	cd python; python3 setup.py install --install-layout=deb --root ../$(DIR); cd ..

	# Install scripts
	mkdir -p $(DIR)/$(VYOS_SBIN_DIR)
	mkdir -p $(DIR)/$(VYOS_BIN_DIR)
	cp -r src/conf_mode/* $(DIR)/$(VYOS_SBIN_DIR)
	cp -r src/op_mode/* $(DIR)/$(VYOS_BIN_DIR)

	# Install validators
	mkdir -p $(DIR)/$(VYOS_LIBEXEC_DIR)/validators
	cp -r src/validators/* $(DIR)/$(VYOS_LIBEXEC_DIR)/validators

	# Install helper scripts
	cp -r src/helpers/* $(DIR)/$(VYOS_LIBEXEC_DIR)/

	mkdir -p $(DIR)/$(VYOS_CFG_TMPL_DIR)
	cp -r templates-cfg/* $(DIR)/$(VYOS_CFG_TMPL_DIR)

	mkdir -p $(DIR)/$(VYOS_OP_TMPL_DIR)
	cp -r templates-op/* $(DIR)/$(VYOS_OP_TMPL_DIR)