Commit 5a09b37e authored by Nicolas Michon's avatar Nicolas Michon

Add share directory for belr grammars and associated cmake files

parent 5b4b9f1e
......@@ -234,6 +234,8 @@ include_directories(
src/plugin
)
set(BELR_GRAMMARS_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/belr/grammars")
configure_file(${PROJECT_SOURCE_DIR}/cmake/flexisip-config.h.in ${PROJECT_BINARY_DIR}/flexisip-config.h)
set_source_files_properties(${PROJECT_BINARY_DIR}/flexisip-config.h PROPERTIES GENERATED ON)
add_definitions("-DHAVE_CONFIG_H")
......@@ -242,6 +244,7 @@ bc_init_compilation_flags(CPP_BUILD_FLAGS C_BUILD_FLAGS CXX_BUILD_FLAGS ENABLE_S
add_subdirectory(src)
add_subdirectory(scripts)
add_subdirectory(share)
# Packaging
add_subdirectory(build)
......@@ -39,3 +39,5 @@
/* Default log directory */
#define DEFAULT_LOG_DIR "@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/flexisip"
#define BELR_GRAMMARS_DIR "${BELR_GRAMMARS_DIR}"
set(GRAMMAR_FILES
authdb-file-grammar.txt
)
install(FILES ${GRAMMAR_FILES}
DESTINATION ${BELR_GRAMMARS_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
LWS = [*WSP CRLF] 1*WSP ; linear whitespace
ILF = [CR] LF ; Linefeed, optional CR
UTF8-CONT = %x80-BF
UTF8-NONASCII = %xC0-DF 1UTF8-CONT
/ %xE0-EF 2UTF8-CONT
/ %xF0-F7 3UTF8-CONT
/ %xF8-Fb 4UTF8-CONT
/ %xFC-FD 5UTF8-CONT
alphanum = ALPHA / DIGIT
token = 1*( alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / ":")
user-id = token
phone = token
user = token
domain = token
password = token
ctext = %x21-27 / %x2A-5B / %x5D-7E / UTF8-NONASCII / LWS
comment = "#" *ctext ILF
void = *WSP ILF
version-str = "version:"
version-number = DIGIT
version = version-str version-number ILF
algo = "clrtxt" / "md5" / "sha256"
pass-algo = algo ":" password
identity = user "@" domain
other-userinfo = [*WSP user-id] [*WSP phone] *WSP ILF
auth-line = identity 1*WSP 1*pass-algo 1*WSP ";" *WSP ( ILF / other-userinfo )
password-file = version *(comment / void / auth-line)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment