change library name
parent
3077eb6a65
commit
1852d4ce66
|
|
@ -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 <liaozaixue@yongche.com>
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue