From 797fc0e06bb170aaf71c26ef37b3538eb107c901 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 11 Jan 2023 08:19:49 -0500 Subject: [PATCH] MT#55283 provide "make install" targets Provide the targets for the two /bin/ components. Adapt .install debhelper files. Adapt iptables module install location to use the environment variable. Change-Id: I963feba5f60f53773e497121d8947e7b4997d687 --- Makefile | 10 ++++++++++ daemon/Makefile | 3 +++ debian/ngcp-rtpengine-daemon.install | 2 +- debian/ngcp-rtpengine-iptables.install | 2 +- debian/ngcp-rtpengine-recording-daemon.install | 2 +- iptables-extension/Makefile | 4 +++- recording-daemon/Makefile | 3 +++ 7 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index dfa4ed623..58601d32c 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,13 @@ ifeq ($(with_transcoding),yes) endif $(MAKE) -C iptables-extension +install: + $(MAKE) -C daemon install +ifeq ($(with_transcoding),yes) + $(MAKE) -C recording-daemon install +endif + $(MAKE) -C iptables-extension install + coverity: $(MAKE) -C daemon ifeq ($(with_transcoding),yes) @@ -36,6 +43,9 @@ endif with-kernel: all $(MAKE) -C kernel-module +install-with-kernel: all install + $(MAKE) -C kernel-module install + distclean clean: $(MAKE) -C daemon clean $(MAKE) -C recording-daemon clean diff --git a/daemon/Makefile b/daemon/Makefile index 71ef31ddd..e5b39aa62 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -93,3 +93,6 @@ PODS= rtpengine.pod MANS= $(PODS:.pod=.8) include ../lib/common.Makefile + +install: $(TARGET) + install -m 0755 -D $(TARGET) $(DESTDIR)/usr/bin/$(TARGET) diff --git a/debian/ngcp-rtpengine-daemon.install b/debian/ngcp-rtpengine-daemon.install index e00f63bdb..9f5eff1e8 100644 --- a/debian/ngcp-rtpengine-daemon.install +++ b/debian/ngcp-rtpengine-daemon.install @@ -1,3 +1,3 @@ -daemon/rtpengine /usr/bin/ debian/ngcp-rtpengine-iptables-setup /usr/sbin etc/rtpengine.conf /etc/rtpengine/ +usr/bin/rtpengine diff --git a/debian/ngcp-rtpengine-iptables.install b/debian/ngcp-rtpengine-iptables.install index 3475985fd..7934279cc 100644 --- a/debian/ngcp-rtpengine-iptables.install +++ b/debian/ngcp-rtpengine-iptables.install @@ -1 +1 @@ -iptables-extension/libxt_RTPENGINE.so ${env:XTABLES_DIR} +${env:XTABLES_DIR}/libxt_RTPENGINE.so ${env:XTABLES_DIR} diff --git a/debian/ngcp-rtpengine-recording-daemon.install b/debian/ngcp-rtpengine-recording-daemon.install index 83a9d39d9..34165077d 100644 --- a/debian/ngcp-rtpengine-recording-daemon.install +++ b/debian/ngcp-rtpengine-recording-daemon.install @@ -1,3 +1,3 @@ debian/ngcp-rtpengine-recording-nfs-setup /usr/sbin/ etc/rtpengine-recording.conf /etc/rtpengine/ -recording-daemon/rtpengine-recording /usr/bin/ +usr/bin/rtpengine-recording diff --git a/iptables-extension/Makefile b/iptables-extension/Makefile index cf70fd646..1bca49aef 100644 --- a/iptables-extension/Makefile +++ b/iptables-extension/Makefile @@ -37,6 +37,8 @@ ifeq ($(XTABLES),1) WORK=1 module: libxt_RTPENGINE.so +XTABLES_DIR ?= $(shell pkg-config xtables --variable=xtlibdir || echo /lib/xtables) + libxt_RTPENGINE.so: libxt_RTPENGINE.c $(CC) $(CFLAGS) -o libxt_RTPENGINE.so libxt_RTPENGINE.c @@ -68,4 +70,4 @@ clean: rm -f libxt_RTPENGINE.so libipt_RTPENGINE.so libip6t_RTPENGINE.so install: - install -D libxt_RTPENGINE.so $(DESTDIR)$(shell pkg-config xtables --variable=xtlibdir)/libxt_RTPENGINE.so + install -D libxt_RTPENGINE.so $(DESTDIR)$(XTABLES_DIR)/libxt_RTPENGINE.so diff --git a/recording-daemon/Makefile b/recording-daemon/Makefile index 22897cc91..f721bdc4e 100644 --- a/recording-daemon/Makefile +++ b/recording-daemon/Makefile @@ -39,3 +39,6 @@ PODS= rtpengine-recording.pod MANS= $(PODS:.pod=.8) include ../lib/common.Makefile + +install: $(TARGET) + install -m 0755 -D $(TARGET) $(DESTDIR)/usr/bin/$(TARGET)