]> git.pld-linux.org Git - packages/libargon2.git/commitdiff
install lib as soname
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 23 Aug 2017 06:19:56 +0000 (09:19 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Wed, 23 Aug 2017 06:21:58 +0000 (09:21 +0300)
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
makefile.patch

index 56ea32853ac6b4aca17a6cef0d052f0c1d671148..dbe788444b04ae991c91d9ca5a950b4b1b0bacfd 100644 (file)
@@ -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
index d892faa70e34a7c3ce622a15f36af3ffc9d5446c..5a80304e4553372e37d70b18fc43703dfcc3ad28 100644 (file)
        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
  
  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)
This page took 0.091114 seconds and 4 git commands to generate.