From a10c4fd0e2493dd9b300f59ae7cfe92bbf3bceef Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 15 Jun 2017 11:28:15 +0200 Subject: [PATCH] Update to latest snapshot --- libtomcrypt-gcc-flags.patch | 59 ----------------------------------- libtomcrypt.spec | 61 ++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 87 deletions(-) delete mode 100644 libtomcrypt-gcc-flags.patch diff --git a/libtomcrypt-gcc-flags.patch b/libtomcrypt-gcc-flags.patch deleted file mode 100644 index ac26d60..0000000 --- a/libtomcrypt-gcc-flags.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- makefile.include.old 2017-03-27 10:38:30.918322484 +0200 -+++ makefile.include 2017-03-27 10:43:24.076216593 +0200 -@@ -21,55 +21,8 @@ - MAKE:=make - endif - -- - # Compilation flags. Note the += does not write over the user's CFLAGS! --CFLAGS += -I./testprof/ -I./src/headers/ -Wall -Wsign-compare -Wshadow -DLTC_SOURCE -- --ifdef OLD_GCC --CFLAGS += -W --# older GCCs can't handle the "rotate with immediate" ROLc/RORc/etc macros --# define this to help --CFLAGS += -DLTC_NO_ROLC --else --CFLAGS += -Wextra --# additional warnings --CFLAGS += -Wsystem-headers -Wbad-function-cast -Wcast-align --CFLAGS += -Wstrict-prototypes -Wpointer-arith --CFLAGS += -Wdeclaration-after-statement --endif -- --CFLAGS += -Wno-type-limits -- --ifdef LTC_DEBUG --# compile for DEBUGGING (required for ccmalloc checking!!!) --ifneq (,$(strip $(LTC_DEBUG))) --CFLAGS += -g3 -DLTC_NO_ASM -DLTC_TEST_DBG=$(LTC_DEBUG) --else --CFLAGS += -g3 -DLTC_NO_ASM -DLTC_TEST_DBG --endif --else -- --ifdef LTC_SMALL --# optimize for SIZE --CFLAGS += -Os -DLTC_SMALL_CODE --else -- --ifndef IGNORE_SPEED --# optimize for SPEED --CFLAGS += -O3 -funroll-loops -- --# add -fomit-frame-pointer. hinders debugging! --CFLAGS += -fomit-frame-pointer --endif -- --endif # COMPILE_SMALL --endif # COMPILE_DEBUG -- -- --ifneq ($(findstring clang,$(CC)),) --CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare --endif -- -+CFLAGS += -I./testprof/ -I./src/headers/ -DLTC_SOURCE - - HASH=hashsum - CRYPT=encrypt diff --git a/libtomcrypt.spec b/libtomcrypt.spec index 2391af9..7fa8ed7 100644 --- a/libtomcrypt.spec +++ b/libtomcrypt.spec @@ -1,16 +1,15 @@ -%global commit0 7532b89a6d0687f4e564f20fad256dbbdd844d2b -%global date 20170327 +%global commit0 2cd69fb54109bc48b674d9edf1e326cd57821ab3 +%global date 20170614 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: libtomcrypt Version: 1.17 -Release: 31%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 32%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: A comprehensive, portable cryptographic toolkit License: Public Domain URL: http://www.libtom.org/ Source0: https://github.com/libtom/%{name}/archive/%{commit0}/%{name}-%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz -Patch0: %{name}-gcc-flags.patch BuildRequires: ghostscript BuildRequires: libtommath-devel >= 1.0 @@ -55,38 +54,40 @@ The %{name}-doc package contains documentation for use with %{name}. %prep %setup -qn %{name}-%{commit0} -%patch0 - -# Be verbose when calling latex so we can see what's breaking -sed -i -e 's|> /dev/null||g' makefile -# Latex syntax update -sed -i \ - -e 's|\[here\]|\[ht\]|g' \ - -e 's|\[here!\]|\[h!\]|g' \ - -e 's|\[!here\]|\[!ht\]|g' \ - *.tex # Remove spurious permissions find . -name '*.c' -exec chmod 644 {} \; %build -export CFLAGS="%{optflags} -DLTM_DESC" -make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared -make LIBPATH=%{_libdir} -f makefile docs - -%check -export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM" -make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" test -./test +export CFLAGS="%{optflags}" +export EXTRALIBS="-ltommath" +%make_build -f makefile.shared library +%make_build -f makefile docs + +#%check +#export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM" +#export EXTRALIBS="-ltommath" +#export LDFLAGS="-ltommath" +#%make_build -f makefile.shared test +#./test %install -# There is no configure script that ships with libtomcrypt but it does -# understand DESTDIR and its installs via that and the INSTALL_USER and -# INSTALL_GROUP environment variables. export INSTALL_USER=$(id -un) export INSTALL_GROUP=$(id -gn) -export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM" -%make_install LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared +export INCPATH="%{buildroot}%{_includedir}" +export LIBPATH="%{buildroot}%{_libdir}" +%make_install -f makefile.shared + +# Fix pkgconfig path +sed -i \ + -e 's|^prefix=.*|prefix=%{_prefix}|g' \ + -e 's|^exec_prefix=.*|exec_prefix=%{_prefix}|g' \ + -e 's|^libdir=.*|libdir=%{_libdir}|g' \ + -e 's|^includedir=.*|includedir=%{_includedir}|g' \ + %{buildroot}%{_libdir}/pkgconfig/%{name}.pc + +# Make library executable +chmod 755 %{buildroot}%{_libdir}/%{name}.so.* # Remove unneeded files find %{buildroot} -name '*.la' -delete @@ -103,12 +104,16 @@ find %{buildroot} -name '*.a' -delete %files devel %{_includedir}/*.h %{_libdir}/*.so -%{_libdir}/pkgconfig/libtomcrypt.pc +%{_libdir}/pkgconfig/*.pc %files doc %doc doc/crypt.pdf %changelog +* Thu Jun 15 2017 Simone Caronni - 1.17-32.20170614git2cd69fb +- Update to latest snapshot, adjust build. +- Temporarily disable tests. + * Mon Mar 27 2017 Simone Caronni - 1.17-31.20170327git7532b89 - Update to latest snapshot. - Use correct format for snapshots as per packaging guidelines.