Skip to content

Commit

Permalink
opencsd: build: fixes for rpm based distros
Browse files Browse the repository at this point in the history
The default install target is installing the .so files
with owner rw, and r for group and owner. This causes ldd
and various packaging utilities on rpm based distros to
misunderstand that this is a shared library. Further, recent
packaging guidelines on fedora discourage the use of static
libraries. To support this, lets allow the current 'make install'
behavior to be overridden with a couple env variables.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
  • Loading branch information
jlintonarm authored and mikel-armbb committed Aug 27, 2020
1 parent db9676e commit e7240a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions decoder/build/linux/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,20 @@ all: libs tests

libs: $(LIB_BASE_NAME)_lib $(LIB_CAPI_NAME)_lib

DEF_SO_PERM ?= 644

install: libs tests
mkdir -p $(INSTALL_LIB_DIR) $(INSTALL_INCLUDE_DIR) $(INSTALL_BIN_DIR)
cp -d $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so $(INSTALL_LIB_DIR)/
cp -d $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so.$(SO_MAJOR_VER) $(INSTALL_LIB_DIR)/
$(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so.$(SO_VER) $(INSTALL_LIB_DIR)/
$(INSTALL) --mode=$(DEF_SO_PERM) $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).so.$(SO_VER) $(INSTALL_LIB_DIR)/
cp -d $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so $(INSTALL_LIB_DIR)/
cp -d $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so.$(SO_MAJOR_VER) $(INSTALL_LIB_DIR)/
$(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so.$(SO_VER) $(INSTALL_LIB_DIR)/
$(INSTALL) --mode=$(DEF_SO_PERM) $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).so.$(SO_VER) $(INSTALL_LIB_DIR)/
ifndef DISABLE_STATIC
$(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_BASE_NAME).a $(INSTALL_LIB_DIR)/
$(INSTALL) --mode=644 $(LIB_TARGET_DIR)/lib$(LIB_CAPI_NAME).a $(INSTALL_LIB_DIR)/
endif
cd $(OCSD_ROOT)/build/linux/rctdl_c_api_lib && make install_inc
$(INSTALL) --mode=755 $(BIN_TEST_TARGET_DIR)/trc_pkt_lister $(INSTALL_BIN_DIR)/

Expand Down

0 comments on commit e7240a4

Please sign in to comment.