[packages/libargon2] - up to 20171227
arekm
arekm at pld-linux.org
Mon May 14 20:29:11 CEST 2018
commit 2467b93bb01e370fb4f0e0249ad3a9f11e084427
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon May 14 20:29:02 2018 +0200
- up to 20171227
libargon2.spec | 15 ++++++++++++---
makefile.patch | 36 ++++++++++++++++++------------------
2 files changed, 30 insertions(+), 21 deletions(-)
---
diff --git a/libargon2.spec b/libargon2.spec
index dbe7884..5e51150 100644
--- a/libargon2.spec
+++ b/libargon2.spec
@@ -5,12 +5,12 @@
Summary: The password hash Argon2, winner of PHC
Name: libargon2
-Version: 20161029
+Version: 20171227
Release: 1
License: Apache-2.0 CC0-1.0
Group: Libraries
Source0: https://github.com/P-H-C/phc-winner-argon2/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: bd3476cb8eac9d521a4e0e04d653f5a8
+# Source0-md5: 7d0a85aa3fa02a5962ff751a6e2078c8
Patch0: makefile.patch
URL: https://github.com/P-H-C/phc-winner-argon2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -64,12 +64,19 @@ CFLAGS="%{rpmcflags}" \
%install
rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
+
%{__make} install \
INSTALL="install -p" \
PREFIX=%{_prefix} \
LIBRARY_REL=%{_lib} \
DESTDIR=$RPM_BUILD_ROOT
+install libargon2.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
+sed -i -e 's#libdir=.*#libdir=${prefix}/%{_lib}#g' $RPM_BUILD_ROOT%{_pkgconfigdir}/libargon2.pc
+sed -i -e 's#@UPSTREAM_VER@#%{version}#g' $RPM_BUILD_ROOT%{_pkgconfigdir}/libargon2.pc
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -80,12 +87,14 @@ 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.0
+%attr(755,root,root) %ghost %{_libdir}/libargon2.so.1
+%attr(755,root,root) %{_libdir}/libargon2.so.1.*
%files devel
%defattr(644,root,root,755)
%{_includedir}/argon2.h
%attr(755,root,root) %{_libdir}/libargon2.so
+%{_pkgconfigdir}/libargon2.pc
%if %{with static_libs}
%files static
diff --git a/makefile.patch b/makefile.patch
index cd5e772..27c8c36 100644
--- a/makefile.patch
+++ b/makefile.patch
@@ -1,12 +1,16 @@
---- phc-winner-argon2-20161029/Makefile 2016-10-29 12:24:03.000000000 +0300
-+++ phc-winner-argon2-20161029/Makefile 2017-08-23 08:59:46.258100103 +0300
-@@ -27,12 +27,12 @@
+diff -urN phc-winner-argon2-20171227.org/Makefile phc-winner-argon2-20171227/Makefile
+--- phc-winner-argon2-20171227.org/Makefile 2017-12-27 20:56:31.000000000 +0100
++++ phc-winner-argon2-20171227/Makefile 2018-05-14 20:24:50.018634693 +0200
+@@ -30,7 +30,7 @@
SRC_GENKAT = src/genkat.c
OBJ = $(SRC:.c=.o)
--CFLAGS += -std=c89 -pthread -O3 -Wall -g -Iinclude -Isrc
-+CFLAGS += -std=c89 -pthread -Wall -Iinclude -Isrc
- CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
+-CFLAGS += -std=c89 -O3 -Wall -g -Iinclude -Isrc
++CFLAGS += -std=c89 -Wall -g -Iinclude -Isrc
+
+ ifeq ($(NO_THREADS), 1)
+ CFLAGS += -DARGON2_NO_THREADS
+@@ -42,7 +42,7 @@
-Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
OPTTARGET ?= native
@@ -15,7 +19,7 @@
-o /dev/null 2>/dev/null; echo $$?)
# Detect compatible platform
ifneq ($(OPTTEST), 0)
-@@ -40,7 +40,7 @@
+@@ -50,7 +50,7 @@
SRC += src/ref.c
else
$(info Building with optimizations for $(OPTTARGET))
@@ -24,26 +28,22 @@
SRC += src/opt.c
endif
-@@ -87,5 +87,6 @@
+@@ -99,6 +99,7 @@
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)
-@@ -105,7 +106,7 @@
-
- .PHONY: clean dist format $(GENKAT) all install
-
--all: clean $(RUN) libs
-+all: $(RUN) libs
- libs: $(LIBRARIES)
- $(RUN): $(SRC) $(SRC_RUN)
-@@ -160,2 +161,6 @@
+ ifdef LINKED_LIB_EXT
+@@ -180,6 +181,10 @@
+ endif
$(INSTALL) -d $(INST_BINARY)
$(INSTALL) $(RUN) $(INST_BINARY)
+ # rename library to match SONAME
+ mv $(INST_LIBRARY)/$(LIB_SH) $(INST_LIBRARY)/$(LIB_SH_VERSION)
+ # keep symlink for development
+ ln -sf $(LIB_SH_VERSION) $(INST_LIBRARY)/$(LIB_SH)
+
+ uninstall:
+ cd $(INST_INCLUDE) && rm -f $(notdir $(HEADERS))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libargon2.git/commitdiff/2467b93bb01e370fb4f0e0249ad3a9f11e084427
More information about the pld-cvs-commit
mailing list