[packages/libargon2] install lib as soname

glen glen at pld-linux.org
Wed Aug 23 08:22:52 CEST 2017


commit c0a83283a7e2e3a168a63d6c61c08ce88f87ad6d
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Wed Aug 23 09:19:56 2017 +0300

    install lib as soname
    
    patch from gentoo
    argon2-20161029-makefile-soname-symlinks.patch
    
    note the patch is imperfect:
    - makes install not re-entrant (uses mv)
    - the soname file has no symlinks

 libargon2.spec |  3 ++-
 makefile.patch | 25 ++++++++++++++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/libargon2.spec b/libargon2.spec
index 56ea328..dbe7884 100644
--- a/libargon2.spec
+++ b/libargon2.spec
@@ -80,11 +80,12 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc README.md CHANGELOG.md LICENSE
 %attr(755,root,root) %{_bindir}/argon2
-%attr(755,root,root) %{_libdir}/libargon2.so
+%attr(755,root,root) %{_libdir}/libargon2.so.0
 
 %files devel
 %defattr(644,root,root,755)
 %{_includedir}/argon2.h
+%attr(755,root,root) %{_libdir}/libargon2.so
 
 %if %{with static_libs}
 %files static
diff --git a/makefile.patch b/makefile.patch
index d892faa..5a80304 100644
--- a/makefile.patch
+++ b/makefile.patch
@@ -24,7 +24,18 @@
  	SRC += src/opt.c
  endif
  
-@@ -105,7 +105,7 @@
+@@ -87,8 +87,10 @@
+ endif
+ 
+ LIB_SH := lib$(LIB_NAME).$(LIB_EXT)
++LIB_SH_VERSION := $(LIB_SH).0
+ LIB_ST := lib$(LIB_NAME).a
+ LIBRARIES = $(LIB_SH) $(LIB_ST)
++INSTALL_LIBRARIES = $(LIBRARIES) $(LIB_SH_VERSION)
+ HEADERS = include/argon2.h
+ 
+ INSTALL = install
+@@ -105,7 +107,7 @@
  
  .PHONY: clean dist format $(GENKAT) all install
  
@@ -33,3 +44,15 @@
  libs: $(LIBRARIES)
  
  $(RUN):	        $(SRC) $(SRC_RUN)
+@@ -154,8 +156,10 @@
+ 
+ install: $(RUN) libs
++	mv $(LIB_SH) $(LIB_SH_VERSION)
++	ln -sf $(LIB_SH_VERSION) $(LIB_SH)
+ 	$(INSTALL) -d $(INST_INCLUDE)
+ 	$(INSTALL) $(HEADERS) $(INST_INCLUDE)
+ 	$(INSTALL) -d $(INST_LIBRARY)
+-	$(INSTALL) $(LIBRARIES) $(INST_LIBRARY)
++	$(INSTALL) $(INSTALL_LIBRARIES) $(INST_LIBRARY)
+ 	$(INSTALL) -d $(INST_BINARY)
+ 	$(INSTALL) $(RUN) $(INST_BINARY)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libargon2.git/commitdiff/c0a83283a7e2e3a168a63d6c61c08ce88f87ad6d



More information about the pld-cvs-commit mailing list