forked from inverse-inc/packetfence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mk
107 lines (94 loc) · 3.4 KB
/
config.mk
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
#==============================================================================
# PacketFence application
#==============================================================================
#
# Base directories
#
PREFIX = /usr/local
PF_PREFIX = $(PREFIX)/pf
BINDIR = $(PF_PREFIX)/bin
SBINDIR = $(PF_PREFIX)/sbin
TESTDIR = $(PF_PREFIX)/t
# source dirs
# hack to get directory of config.mk from any Makefile in source tree
# even if make is called with -C
SRC_ROOT_DIR = $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
SRC_RPMDIR = $(SRC_ROOT_DIR)/rpm
SRC_DEBDIR = $(SRC_ROOT_DIR)/debian
SRC_CIDIR = $(SRC_ROOT_DIR)/ci
SRC_CI_TESTDIR = $(SRC_CIDIR)/lib/test
SRC_GODIR = $(SRC_ROOT_DIR)/go
SRC_TESTDIR= $(SRC_ROOT_DIR)/t
SRC_RELATIVE_TESTDIR = t
#
# Golang
#
GOVERSION = go1.16.4
PF_BINARIES = pfhttpd pfdhcp pfdns pfstats pfdetect galera-autofix pfacct pfcertmanager pfcron
#
# PF versions
#
PF_RELEASE_PATH=$(shell readlink -e $(SRC_ROOT_DIR)/conf/pf-release)
# X.Y
PF_MINOR_RELEASE=$(shell perl -ne 'print $$1 if (m/.*?(\d+\.\d+)./)' $(PF_RELEASE_PATH))
# X.Y.Z
PF_PATCH_RELEASE=$(shell perl -ne 'print $$1 if (m/.*?(\d+\.\d+\.\d+)/)' $(PF_RELEASE_PATH))
# SRC HTML dirs
SRC_HTMLDIR = html
SRC_HTML_CPDIR = $(SRC_HTMLDIR)/captive-portal
SRC_HTML_COMMONDIR = $(SRC_HTMLDIR)/common
SRC_HTML_PARKINGDIR = $(SRC_HTMLDIR)/parking
SRC_HTML_PFAPPDIR = $(SRC_HTMLDIR)/pfappserver
SRC_HTML_PFAPPDIR_ROOT = $(SRC_HTMLDIR)/pfappserver/root
SRC_HTML_PFAPPDIR_LIB = $(SRC_HTML_PFAPPDIR)/lib/pfappserver
SRC_HTML_PFAPPDIR_I18N = $(SRC_HTML_PFAPPDIR_LIB)/I18N
# Installed HTLML dirs
HTMLDIR = $(PF_PREFIX)/html
HTML_CPDIR = $(HTMLDIR)/captive-portal
HTML_COMMONDIR = $(HTMLDIR)/common
HTML_PARKINGDIR = $(HTMLDIR)/parking
HTML_PFAPPDIR = $(HTMLDIR)/pfappserver
HTML_PFAPPDIR_ROOT = $(HTMLDIR)/pfappserver/root
HTML_PFAPPDIR_LIB = $(HTML_PFAPPDIR)/lib/pfappserver
HTML_PFAPPDIR_I18N = $(HTML_PFAPPDIR_LIB)/I18N
# parking files
parking_files = $(shell find $(SRC_HTML_PARKINGDIR) \
-type f)
# common files
# exclude node_modules dir and subdirs
common_files = $(shell find $(SRC_HTML_COMMONDIR) \
-type f \
-not -path "$(SRC_HTML_COMMONDIR)/node_modules/*")
# captive portal files
cp_files = $(shell find $(SRC_HTML_CPDIR) \
-type f \
-not -path "$(SRC_HTML_CPDIR)/content/node_modules/*" \
-not -path "$(SRC_HTML_CPDIR)/profile-templates/*" \
-not -path "$(SRC_HTML_CPDIR)/t/*")
# pfappserver files without root
pfapp_files = $(shell find $(SRC_HTML_PFAPPDIR) \
-type f \
-not -name "Changes" \
-not -path "$(SRC_HTML_PFAPPDIR)/root-custom*" \
-not -path "$(SRC_HTML_PFAPPDIR)/t/*" \
-not -path "$(SRC_HTML_PFAPPDIR_ROOT)*")
pfapp_alt_files = $(shell find $(SRC_HTML_PFAPPDIR_ROOT) \
-type f \
-not -path "$(SRC_HTML_PFAPPDIR_ROOT)/node_modules/*")
symlink_files = $(shell find $(SRC_HTML_PFAPPDIR) \
-type l \
-not -path "$(SRC_HTML_PFAPPDIR_ROOT)/node_modules/*")
# all directories and files to include in packetfence package
# $(SRC_ROOT_DIR)/* to exclude SRC_ROOT_DIR himself
files_to_include = $(shell find $(SRC_ROOT_DIR)/* \
-maxdepth 0 \
-not -path "$(SRC_CIDIR)" \
-not -path "$(SRC_DEBDIR)" \
-not -path "$(SRC_ROOT_DIR)/packetfence-$(PF_PATCH_RELEASE)" \
-not -path "$(SRC_ROOT_DIR)/public" \
-not -path "$(SRC_RPMDIR)" \
-not -path "$(SRC_TESTDIR)" )
# all directories and files to include in packetfence-test package
# $(SRC_ROOT_DIR)/* to exclude SRC_ROOT_DIR himself
pf_test_files_to_include = $(shell find $(SRC_TESTDIR) \
-maxdepth 0)