From 1852d4ce66aad47e98a9713a9fb77b67b9f27544 Mon Sep 17 00:00:00 2001 From: liaozaixue Date: Mon, 4 Aug 2014 09:43:19 +0800 Subject: [PATCH] change library name --- libfastcommon.spec | 10 +++------- src/Makefile.in | 14 +++++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/libfastcommon.spec b/libfastcommon.spec index 4aa6c0a..f3e6605 100644 --- a/libfastcommon.spec +++ b/libfastcommon.spec @@ -1,5 +1,5 @@ Name: libfastcommon -Version: 1.0.6 +Version: 1.0.0 Release: 1%{?dist} Summary: c common functions library extracted from my open source projects FastDFS License: GPL @@ -38,25 +38,21 @@ rm -rf %{buildroot} DESTDIR=$RPM_BUILD_ROOT ./make.sh install %post -ln -fs /usr/local/lib/libfastcommon.so.1 %{_libdir}/libfastcommon.so -/sbin/ldconfig %preun %postun -rm -f %{_libdir}/libfastcommon.so -/sbin/ldconfig %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) -/usr/local/lib/libfastcommon.so* +/usr/lib64/libfastcommon.so* %files devel %defattr(-,root,root,-) -/usr/local/include/* +/usr/include/fastcommon/* %changelog * Mon Jun 23 2014 Zaixue Liao diff --git a/src/Makefile.in b/src/Makefile.in index e404a54..18d8356 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -19,10 +19,10 @@ HEADER_FILES = common_define.h hash.h chain.h logger.h base64.h \ ALL_OBJS = $(STATIC_OBJS) $(FAST_SHARED_OBJS) ALL_PRGS = -ALL_LIBS = libfastcommon.so.1 +ALL_LIBS = libfastcommon.so all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS) -libfastcommon.so.1: +libfastcommon.so: $(COMPILE) -o $@ $< -shared $(FAST_SHARED_OBJS) $(LIB_PATH) .o: $(COMPILE) -o $@ $< $(STATIC_OBJS) $(LIB_PATH) $(INC_PATH) @@ -33,11 +33,11 @@ libfastcommon.so.1: .c.lo: $(COMPILE) -c -fPIC -o $@ $< $(INC_PATH) install: - mkdir -p $(DESTDIR)/usr/local/lib - install -m 755 $(ALL_LIBS) $(DESTDIR)/usr/local/lib/ - mkdir -p $(DESTDIR)/usr/local/include/fastcommon - install -m 644 $(HEADER_FILES) $(DESTDIR)/usr/local/include/fastcommon - cd $(DESTDIR)/usr/local/lib && ln -fs libfastcommon.so.1 libfastcommon.so + mkdir -p $(DESTDIR)/usr/lib64 + install -m 755 $(ALL_LIBS) $(DESTDIR)/usr/lib64 + mkdir -p $(DESTDIR)/usr/include/fastcommon + install -m 644 $(HEADER_FILES) $(DESTDIR)/usr/include/fastcommon +# cd $(DESTDIR)/usr/lib64 && ln -fs libfastcommon.so.1 libfastcommon.so # ln -fs $(DESTDIR)/usr/local/lib/libfastcommon.so.1 $(DESTDIR)/usr/local/lib/libfastcommon.so # sh ./fast_link_library.sh clean: