Alex 'AdUser' Z
8 years ago
14 changed files with 56 additions and 44 deletions
@ -1,2 +1,2 @@ |
|||||||
[source:files] |
[source:files] |
||||||
load = libf2b_source_files.so |
load = f2b/sources/files.so |
||||||
|
@ -1,5 +1,5 @@ |
|||||||
[source:portknock] |
[source:portknock] |
||||||
load = libf2b_source_portknock.so |
load = f2b/sources/portknock.so |
||||||
; listen = 0.0.0.0:23 # telnet |
; listen = 0.0.0.0:23 # telnet |
||||||
; listen = 0.0.0.0:5060 # sip |
; listen = 0.0.0.0:5060 # sip |
||||||
; listen = 0.0.0.0:6667 # irc |
; listen = 0.0.0.0:6667 # irc |
||||||
|
@ -1,2 +1,2 @@ |
|||||||
[backend:ipset] |
[backend:ipset] |
||||||
load = libf2b_backend_ipset.so |
load = f2b/backends/ipset.so |
||||||
|
@ -1,4 +1,4 @@ |
|||||||
[backend:mcast] |
[backend:mcast] |
||||||
load = libf2b_backend_mcast.so |
load = f2b/backends/mcast.so |
||||||
; group = 239.255.186.1 |
; group = 239.255.186.1 |
||||||
; port = 3370 |
; port = 3370 |
||||||
|
@ -1,5 +1,5 @@ |
|||||||
[filter:pcre] |
[filter:pcre] |
||||||
load = libf2b_filter_pcre.so |
load = f2b/filters/pcre.so |
||||||
icase = yes |
icase = yes |
||||||
study = yes |
study = yes |
||||||
usejit = no |
usejit = no |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
[filter:preg] |
[filter:preg] |
||||||
load = libf2b_filter_preg.so |
load = f2b/filters/preg.so |
||||||
icase = yes |
icase = yes |
||||||
|
@ -1,30 +1,34 @@ |
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
||||||
|
unset(CMAKE_SHARED_MODULE_PREFIX) |
||||||
set(BACKENDS "") |
set(BACKENDS "") |
||||||
|
|
||||||
add_library("f2b_backend_exec" MODULE "exec.c" "../strlcpy.c") |
add_library("b_exec" MODULE "exec.c" "../strlcpy.c") |
||||||
list(APPEND BACKENDS "f2b_backend_exec") |
list(APPEND BACKENDS "exec") |
||||||
|
|
||||||
if (WITH_MCAST) |
if (WITH_MCAST) |
||||||
add_library("f2b_backend_mcast" MODULE "mcast.c" "../strlcpy.c" |
add_library("b_mcast" MODULE "mcast.c" "../strlcpy.c" |
||||||
"../commands.c" "../cmsg.c" "../csocket.c") |
"../commands.c" "../cmsg.c" "../csocket.c") |
||||||
list(APPEND BACKENDS "f2b_backend_mcast") |
list(APPEND BACKENDS "mcast") |
||||||
endif () |
endif () |
||||||
|
|
||||||
find_library(REDIS_FOUND "hiredis") |
find_library(REDIS_FOUND "hiredis") |
||||||
if (WITH_REDIS AND REDIS_FOUND) |
if (WITH_REDIS AND REDIS_FOUND) |
||||||
add_library("f2b_backend_redis" MODULE "redis.c" "../strlcpy.c") |
add_library("b_redis" MODULE "redis.c" "../strlcpy.c") |
||||||
target_link_libraries("f2b_backend_redis" "hiredis") |
target_link_libraries("b_redis" "hiredis") |
||||||
list(APPEND BACKENDS "f2b_backend_redis") |
list(APPEND BACKENDS "redis") |
||||||
endif () |
endif () |
||||||
|
|
||||||
find_library(IPSET_FOUND "ipset") |
find_library(IPSET_FOUND "ipset") |
||||||
if (WITH_IPSET AND IPSET_FOUND) |
if (WITH_IPSET AND IPSET_FOUND) |
||||||
add_library("f2b_backend_ipset" MODULE "ipset.c" "../strlcpy.c") |
add_library("b_ipset" MODULE "ipset.c" "../strlcpy.c") |
||||||
target_link_libraries("f2b_backend_ipset" "ipset") |
target_link_libraries("b_ipset" "ipset") |
||||||
list(APPEND BACKENDS "f2b_backend_ipset") |
list(APPEND BACKENDS "ipset") |
||||||
endif () |
endif () |
||||||
|
|
||||||
message(STATUS "- Backends : ${BACKENDS}") |
set(LIB_PATH "${CMAKE_INSTALL_LIBDIR}/f2b/backends") |
||||||
|
foreach (BACKEND IN LISTS BACKENDS) |
||||||
|
set_target_properties("b_${BACKEND}" PROPERTIES OUTPUT_NAME ${BACKEND}) |
||||||
|
install(TARGETS "b_${BACKEND}" LIBRARY DESTINATION ${LIB_PATH}) |
||||||
|
endforeach () |
||||||
|
|
||||||
install(TARGETS ${BACKENDS} |
message(STATUS "- Backends : ${BACKENDS}") |
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
|
||||||
|
@ -1,17 +1,21 @@ |
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
||||||
|
unset(CMAKE_SHARED_MODULE_PREFIX) |
||||||
set(FILTERS "") |
set(FILTERS "") |
||||||
|
|
||||||
add_library("f2b_filter_preg" MODULE "preg.c" "../strlcpy.c") |
add_library("f_preg" MODULE "preg.c" "../strlcpy.c") |
||||||
list(APPEND FILTERS "f2b_filter_preg") |
list(APPEND FILTERS "preg") |
||||||
|
|
||||||
find_library(PCRE_FOUND "pcre") |
find_library(PCRE_FOUND "pcre") |
||||||
if (WITH_PCRE AND PCRE_FOUND) |
if (WITH_PCRE AND PCRE_FOUND) |
||||||
add_library("f2b_filter_pcre" MODULE "pcre.c" "../strlcpy.c") |
add_library("f_pcre" MODULE "pcre.c" "../strlcpy.c") |
||||||
target_link_libraries("f2b_filter_pcre" "pcre") |
target_link_libraries("f_pcre" "pcre") |
||||||
list(APPEND FILTERS "f2b_filter_pcre") |
list(APPEND FILTERS "pcre") |
||||||
endif () |
endif () |
||||||
|
|
||||||
message(STATUS "- Filters : ${FILTERS}") |
set(LIB_PATH "${CMAKE_INSTALL_LIBDIR}/f2b/filters") |
||||||
|
foreach (FILTER IN LISTS FILTERS) |
||||||
|
set_target_properties("f_${FILTER}" PROPERTIES OUTPUT_NAME ${FILTER}) |
||||||
|
install(TARGETS "f_${FILTER}" LIBRARY DESTINATION ${LIB_PATH}) |
||||||
|
endforeach () |
||||||
|
|
||||||
install(TARGETS ${FILTERS} |
message(STATUS "- Filters : ${FILTERS}") |
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
|
||||||
|
@ -1,26 +1,30 @@ |
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
||||||
|
unset(CMAKE_SHARED_MODULE_PREFIX) |
||||||
set(SOURCES "") |
set(SOURCES "") |
||||||
|
|
||||||
add_library("f2b_source_files" MODULE "files.c" "../strlcpy.c") |
add_library("s_files" MODULE "files.c" "../strlcpy.c") |
||||||
list(APPEND SOURCES "f2b_source_files") |
list(APPEND SOURCES "files") |
||||||
|
|
||||||
add_library("f2b_source_portknock" MODULE "portknock.c" "../strlcpy.c") |
add_library("s_portknock" MODULE "portknock.c" "../strlcpy.c") |
||||||
list(APPEND SOURCES "f2b_source_portknock") |
list(APPEND SOURCES "portknock") |
||||||
|
|
||||||
if (WITH_MCAST) |
if (WITH_MCAST) |
||||||
add_library("f2b_source_mcast" MODULE "mcast.c" "../strlcpy.c" |
add_library("s_mcast" MODULE "mcast.c" "../strlcpy.c" |
||||||
"../commands.c" "../cmsg.c" "../csocket.c") |
"../commands.c" "../cmsg.c" "../csocket.c") |
||||||
list(APPEND SOURCES "f2b_source_mcast") |
list(APPEND SOURCES "mcast") |
||||||
endif () |
endif () |
||||||
|
|
||||||
find_library(REDIS_FOUND "hiredis") |
find_library(REDIS_FOUND "hiredis") |
||||||
if (WITH_REDIS AND REDIS_FOUND) |
if (WITH_REDIS AND REDIS_FOUND) |
||||||
add_library("f2b_source_redis" MODULE "redis.c" "../strlcpy.c") |
add_library("s_redis" MODULE "redis.c" "../strlcpy.c") |
||||||
target_link_libraries("f2b_source_redis" "hiredis") |
target_link_libraries("s_redis" "hiredis") |
||||||
list(APPEND SOURCES "f2b_source_redis") |
list(APPEND SOURCES "redis") |
||||||
endif () |
endif () |
||||||
|
|
||||||
message(STATUS "- Sources : ${SOURCES}") |
set(LIB_PATH "${CMAKE_INSTALL_LIBDIR}/f2b/sources") |
||||||
|
foreach (SOURCE IN LISTS SOURCES) |
||||||
|
set_target_properties("s_${SOURCE}" PROPERTIES OUTPUT_NAME ${SOURCE}) |
||||||
|
install(TARGETS "s_${SOURCE}" LIBRARY DESTINATION ${LIB_PATH}) |
||||||
|
endforeach () |
||||||
|
|
||||||
install(TARGETS ${SOURCES} |
message(STATUS "- Sources : ${SOURCES}") |
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
|
||||||
|
Loading…
Reference in new issue