debian: Fix sm-db installation issues
- Detect which OS version that is being used based on the /etc/os-release, to determine if libraries need to be installed in /usr/lib (Debian) or /usr/lib64 (Centos). - Remove the hardcoded /usr/lib64 directory in the Makefile. - Clean up debian/rules to remove extra cruft. - Install the libraries into /usr/lib on Debian rather than /usr/lib64 so the libraries are installed in the correct place. Story: 2009101 Task: 44678 Test Plan PASS Build package and ISO on Centos and Debian. PASS Check to see if /usr/lib64 does not have libdm_db.so installed. Signed-off-by: Chuck Short <charles.short@windriver.com> Change-Id: I6d864d394eadb1c566a8426799ca4ff4509d14f4
This commit is contained in:
parent
4b612d1f42
commit
011b2a2fa1
@ -13,7 +13,6 @@ override_dh_auto_build:
|
||||
dh_auto_build
|
||||
|
||||
override_dh_auto_install:
|
||||
rm -rf ${ROOT}
|
||||
$(MAKE) DEST_DIR=${ROOT} \
|
||||
VER=$(VER) \
|
||||
VER_MJR=$(VER_MJR) \
|
||||
|
@ -1,2 +1,2 @@
|
||||
usr/lib64/libsm_db.so
|
||||
usr/lib/libsm_db.so
|
||||
usr/include/*.h
|
||||
|
@ -1,4 +1,4 @@
|
||||
usr/lib64/libsm_db.so.*
|
||||
usr/lib/libsm_db.so.*
|
||||
var/lib/sm/patches/sm-patch.sql
|
||||
|
||||
# Marked on centos .spec file as "%config(noreplace)"
|
||||
|
@ -33,6 +33,12 @@ CCFLAGS= -fPIC -g -O2 -Wall -Werror -std=c++11 -Wformat -Wformat-security -Wno-s
|
||||
EXTRACCFLAGS= -D__STDC_FORMAT_MACROS
|
||||
LDLIBS= -lsqlite3 -lglib-2.0 -luuid -lrt -lsm_common
|
||||
LDFLAGS = -shared -rdynamic
|
||||
OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
|
||||
ifeq ($(OS_ID),debian)
|
||||
LIBDIR = $(DEST_DIR)/usr/lib
|
||||
else
|
||||
LIBDIR = $(DEST_DIR)/usr/lib64
|
||||
endif
|
||||
|
||||
build: libsm_db.so sm_db_build
|
||||
|
||||
@ -52,9 +58,9 @@ sm_db_build: ${OBJS}
|
||||
$(CXX) $(INCLUDES) $(CCFLAGS) $(EXTRACCFLAGS) $(OBJS) $(LDLIBS) -o sm_db_build
|
||||
|
||||
install:
|
||||
install -d ${DEST_DIR}/usr/lib64
|
||||
install libsm_db.so.${VER} $(DEST_DIR)/usr/lib64
|
||||
cp -P libsm_db.so libsm_db.so.$(VER_MJR) $(DEST_DIR)/usr/lib64
|
||||
install -d $(LIBDIR)
|
||||
install libsm_db.so.${VER} $(LIBDIR)
|
||||
cp -P libsm_db.so libsm_db.so.$(VER_MJR) $(LIBDIR)
|
||||
install -d ${DEST_DIR}/usr/include
|
||||
install -m 0644 *.h ${DEST_DIR}/usr/include
|
||||
install -d 755 ${DEST_DIR}/usr/bin
|
||||
|
Loading…
Reference in New Issue
Block a user