From 10c037e32d13fb75176e9e1e9a17967550580c91 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Thu, 31 Dec 2020 20:53:57 +0800 Subject: [PATCH] bugfixed for rpm build --- libfastcommon.spec | 1 - src/Makefile.in | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libfastcommon.spec b/libfastcommon.spec index 2321777..990662d 100644 --- a/libfastcommon.spec +++ b/libfastcommon.spec @@ -56,7 +56,6 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) /usr/lib64/libfastcommon.so* -/usr/lib/libfastcommon.so* %files devel %defattr(-,root,root,-) diff --git a/src/Makefile.in b/src/Makefile.in index c662e43..be3bbef 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -72,7 +72,9 @@ install: install -m 755 $(SHARED_LIBS) $(TARGET_LIB) install -m 644 $(HEADER_FILES) $(TARGET_PREFIX)/include/fastcommon - if [ ! -e $(TARGET_PREFIX)/lib/libfastcommon.so ]; then ln -s $(TARGET_LIB)/libfastcommon.so $(TARGET_PREFIX)/lib/libfastcommon.so; fi + + @BUILDROOT=$$(echo "$(TARGET_PREFIX)" | grep BUILDROOT); \ + if [ -z "$$BUILDROOT" ] && [ ! -e $(TARGET_PREFIX)/lib/libfastcommon.so ]; then ln -s $(TARGET_LIB)/libfastcommon.so $(TARGET_PREFIX)/lib/libfastcommon.so; fi clean: rm -f $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS) -- GitLab