libdaq3,snort3: install/use libdaq3 in its own dir
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Wed, 20 Jan 2021 01:06:34 +0000 (22:06 -0300)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Fri, 26 Feb 2021 06:37:41 +0000 (07:37 +0100)
If used with default paths, libdaq 2.x and libdaq 3.x will overwrite
some of the other version's files.  Install them in different places to
avoid trouble.

Snort is the only package that uses libdaq, so update it at the same
time to avoid creating a failing commit.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 92cdc620b6a6e9974b1a0d69a482ae02f1dd4d5d)

libs/libdaq3/Makefile
net/snort3/Makefile

index e0f2866762d895e655cbc272d2b2df7a3e6ce45f..5cfef76ab977777bbbcd893eddc362bc6f26414d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdaq3
 PKG_VERSION:=3.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=libdaq-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
@@ -46,14 +46,12 @@ CONFIGURE_ARGS+= \
        --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(STAGING_DIR)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include/
-       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib/
-       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/daq
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/daq/* $(STAGING_DIR)/usr/lib/daq/
-       $(INSTALL_DIR) $(STAGING_DIR)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(STAGING_DIR)/usr/bin/
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/include/daq3
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/. $(STAGING_DIR)/usr/include/daq3/
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/daq3
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib/daq3/
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/daq3/daq
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/daq/* $(STAGING_DIR)/usr/lib/daq3/daq/
 endef
 
 define Package/libdaq3/install
index 149667b8147677071691fe4705bdf08224826ddc..4530596a82a3f715b78749913997b2e7582c7b03 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=snort3
 PKG_VERSION:=3.1.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.snort.org/downloads/snortplus/
@@ -45,6 +45,8 @@ endef
 CMAKE_OPTIONS += \
        -DUSE_TIRPC:BOOL=YES \
        -DENABLE_STATIC_DAQ:BOOL=NO \
+       -DDAQ_INCLUDE_DIR=$(STAGING_DIR)/usr/include/daq3 \
+       -DDAQ_LIBRARIES_DIR_HINT:PATH=$(STAGING_DIR)/usr/lib/daq3 \
        -DENABLE_COREFILES:BOOL=NO \
        -DENABLE_GDB:BOOL=NO \
        -DMAKE_DOC:BOOL=NO \
@@ -54,8 +56,8 @@ CMAKE_OPTIONS += \
        -DHAVE_LIBUNWIND=OFF \
        -DHAVE_LZMA=OFF
 
-TARGET_CFLAGS  += -I$(STAGING_DIR)/usr/include/tirpc
-TARGET_LDFLAGS += -ltirpc
+TARGET_CFLAGS  += -I$(STAGING_DIR)/usr/include/daq3 -I$(STAGING_DIR)/usr/include/tirpc
+TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/daq3 -ltirpc
 
 define Package/snort3/conffiles
 /etc/config/snort