%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
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)