Commit c8477976 authored by lu43jih's avatar lu43jih
Browse files

Adding mariadb connector dependency

parent 53a60288
......@@ -11,6 +11,7 @@ GCRYPT_VERSION = 1.8.4
GPG-ERROR_VERSION = 1.36
NET-SNMP_VERSION = 5.8
OPENCV_VERSION = 4.1.0
MARIADBCONNECTOR_VERSION = 3.1.3
BOOST_VERSION_U = $(subst .,_,$(BOOST_VERSION))
......@@ -25,7 +26,10 @@ DISTFILES = apache-cassandra-$(CASSANDRA_VERSION).tar.gz;http://archive.apache.o
libgcrypt-$(GCRYPT_VERSION).tar.gz;https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$(GCRYPT_VERSION).tar.gz \
freeipmi-$(FREEIPMI_VERSION).tar.gz;http://ftp.gnu.org/gnu/freeipmi/freeipmi-$(FREEIPMI_VERSION).tar.gz \
net-snmp-$(NET-SNMP_VERSION).tar.gz;https://sourceforge.net/projects/net-snmp/files/net-snmp/$(NET-SNMP_VERSION)/net-snmp-$(NET-SNMP_VERSION).tar.gz/download \
opencv-$(OPENCV_VERSION).tar.gz;https://github.com/opencv/opencv/archive/$(OPENCV_VERSION).tar.gz
opencv-$(OPENCV_VERSION).tar.gz;https://github.com/opencv/opencv/archive/$(OPENCV_VERSION).tar.gz \
mariadb-connector-c-$(MARIADBCONNECTOR_VERSION)-src.tar.gz;https://downloads.mariadb.com/Connectors/c/connector-c-$(MARIADBCONNECTOR_VERSION)/mariadb-connector-c-$(MARIADBCONNECTOR_VERSION)-src.tar.gz
DISTFILES_HASHES = apache-cassandra-3.0.18.tar.gz|94dbdaa58b366166c53f881b8e266bc8;\
mosquitto-1.5.5.tar.gz|a17dffc6f63b2a4ab2eb5c51139e60e9;\
......@@ -38,7 +42,8 @@ DISTFILES_HASHES = apache-cassandra-3.0.18.tar.gz|94dbdaa58b366166c53f881b8e266b
libgpg-error-1.36.tar.gz|f2283e22959ef71f44d8be3d0987a96b;\
freeipmi-1.6.3.tar.gz|b2d97e20db9b81b460ce1b9dad5bf54e;\
net-snmp-5.8.tar.gz|63bfc65fbb86cdb616598df1aff6458a; \
opencv-4.1.0.tar.gz|b80c59c7e4feee6a00608315e02b0b73;
opencv-4.1.0.tar.gz|b80c59c7e4feee6a00608315e02b0b73; \
mariadb-connector-c-3.1.3-src.tar.gz|384817d60cd890f83c5c9673bfa11a8b;
CASSANDRA_CLUSTER_NAME = Datacenter Monitor Database
CASSANDRA_FLUSH_LARGEST_MEMTABLES_AT = 0.5
......@@ -54,7 +59,7 @@ FETCH = wget -c --no-check-certificate -O
MD5 = $(if $(shell which md5 2>/dev/null),md5,$(if $(shell md5sum --tag Makefile 2&> /dev/null || true),md5sum --tag,openssl md5))
DISTFILESNAMES = $(foreach f,$(DISTFILES),$(shell echo "$(f)" | sed 's/;.*//'))
DISTFILESPATHS_FULL = $(foreach f,$(DISTFILES),$(shell echo "$(f)" | sed 's/.tar.gz;.*//; s/.tgz;.*//; s/.zip;.*//' ))
DISTFILESPATHS = apache-cassandra-$(CASSANDRA_VERSION) mosquitto-$(MOSQUITTO_VERSION) boost_$(BOOST_VERSION_U) openssl-$(OPENSSL_VERSION) libuv-v$(LIBUV_VERSION) cpp-driver-$(CPPDRV_VERSION) opencv-$(OPENCV_VERSION)
DISTFILESPATHS = apache-cassandra-$(CASSANDRA_VERSION) mosquitto-$(MOSQUITTO_VERSION) boost_$(BOOST_VERSION_U) openssl-$(OPENSSL_VERSION) libuv-v$(LIBUV_VERSION) cpp-driver-$(CPPDRV_VERSION) opencv-$(OPENCV_VERSION) mariadb-connector-c-$(MARIADBCONNECTOR_VERSION)-src
ifneq (,$(findstring bacnet,$(PLUGINS)))
DISTFILESPATHS += bacnet-stack-$(BACNET-STACK_VERSION)
endif
......@@ -65,6 +70,7 @@ ifneq (,$(findstring snmp,$(PLUGINS)))
DISTFILESPATHS += net-snmp-$(NET-SNMP_VERSION)
endif
# If cross-compiling for ARM, adjust the build settings
ifeq ("$(ARCH)", "arm")
OPENSSL_TARGET = "linux-generic32"
......@@ -284,3 +290,22 @@ $(DCDBDEPSPATH)/opencv-$(OPENCV_VERSION)/.installed: $(DCDBDEPSPATH)/opencv-$(OP
@echo ""
@echo "Installing OpenCV library..."
cd $(@D) && cd build && make install && touch $(@)
#### CARLA
$(DCDBDEPSPATH)/mariadb-connector-c-$(MARIADBCONNECTOR_VERSION)-src/.built: $(DCDBDEPSPATH)/mariadb-connector-c-$(MARIADBCONNECTOR_VERSION)-src/.patched
@echo ""
@echo "Building MariaDB Connector...";
mkdir -p $(@D)/build;
cd $(@D)/build && \
CC=$(FULL_CC) CXX=$(FULL_CXX) cmake $(CMAKE_CROSS_FLAGS) \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$(DCDBDEPLOYPATH)/ \
$(@D) && \
make -j $(MAKETHREADS) && \
touch $(@)
$(DCDBDEPSPATH)/mariadb-connector-c-$(MARIADBCONNECTOR_VERSION)-src/.installed: $(DCDBDEPSPATH)/mariadb-connector-c-$(MARIADBCONNECTOR_VERSION)-src/.built | $(DCDBDEPLOYPATH)
@echo "Installing Maria DB Connector library..."
cd $(@D)/build && make install && touch $(@)
Supports Markdown
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