change library name
parent
3077eb6a65
commit
1852d4ce66
|
|
@ -1,5 +1,5 @@
|
||||||
Name: libfastcommon
|
Name: libfastcommon
|
||||||
Version: 1.0.6
|
Version: 1.0.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: c common functions library extracted from my open source projects FastDFS
|
Summary: c common functions library extracted from my open source projects FastDFS
|
||||||
License: GPL
|
License: GPL
|
||||||
|
|
@ -38,25 +38,21 @@ rm -rf %{buildroot}
|
||||||
DESTDIR=$RPM_BUILD_ROOT ./make.sh install
|
DESTDIR=$RPM_BUILD_ROOT ./make.sh install
|
||||||
|
|
||||||
%post
|
%post
|
||||||
ln -fs /usr/local/lib/libfastcommon.so.1 %{_libdir}/libfastcommon.so
|
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
rm -f %{_libdir}/libfastcommon.so
|
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
/usr/local/lib/libfastcommon.so*
|
/usr/lib64/libfastcommon.so*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
/usr/local/include/*
|
/usr/include/fastcommon/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jun 23 2014 Zaixue Liao <liaozaixue@yongche.com>
|
* 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_OBJS = $(STATIC_OBJS) $(FAST_SHARED_OBJS)
|
||||||
|
|
||||||
ALL_PRGS =
|
ALL_PRGS =
|
||||||
ALL_LIBS = libfastcommon.so.1
|
ALL_LIBS = libfastcommon.so
|
||||||
|
|
||||||
all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
|
all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
|
||||||
libfastcommon.so.1:
|
libfastcommon.so:
|
||||||
$(COMPILE) -o $@ $< -shared $(FAST_SHARED_OBJS) $(LIB_PATH)
|
$(COMPILE) -o $@ $< -shared $(FAST_SHARED_OBJS) $(LIB_PATH)
|
||||||
.o:
|
.o:
|
||||||
$(COMPILE) -o $@ $< $(STATIC_OBJS) $(LIB_PATH) $(INC_PATH)
|
$(COMPILE) -o $@ $< $(STATIC_OBJS) $(LIB_PATH) $(INC_PATH)
|
||||||
|
|
@ -33,11 +33,11 @@ libfastcommon.so.1:
|
||||||
.c.lo:
|
.c.lo:
|
||||||
$(COMPILE) -c -fPIC -o $@ $< $(INC_PATH)
|
$(COMPILE) -c -fPIC -o $@ $< $(INC_PATH)
|
||||||
install:
|
install:
|
||||||
mkdir -p $(DESTDIR)/usr/local/lib
|
mkdir -p $(DESTDIR)/usr/lib64
|
||||||
install -m 755 $(ALL_LIBS) $(DESTDIR)/usr/local/lib/
|
install -m 755 $(ALL_LIBS) $(DESTDIR)/usr/lib64
|
||||||
mkdir -p $(DESTDIR)/usr/local/include/fastcommon
|
mkdir -p $(DESTDIR)/usr/include/fastcommon
|
||||||
install -m 644 $(HEADER_FILES) $(DESTDIR)/usr/local/include/fastcommon
|
install -m 644 $(HEADER_FILES) $(DESTDIR)/usr/include/fastcommon
|
||||||
cd $(DESTDIR)/usr/local/lib && ln -fs libfastcommon.so.1 libfastcommon.so
|
# 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
|
# ln -fs $(DESTDIR)/usr/local/lib/libfastcommon.so.1 $(DESTDIR)/usr/local/lib/libfastcommon.so
|
||||||
# sh ./fast_link_library.sh
|
# sh ./fast_link_library.sh
|
||||||
clean:
|
clean:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue