+++ /dev/null
---- libtomcrypt-1.17/testprof/makefile.shared.orig 2007-05-12 16:46:25.000000000 +0200
-+++ libtomcrypt-1.17/testprof/makefile.shared 2013-05-19 15:00:01.416666385 +0200
-@@ -1,4 +1,5 @@
--CC=libtool --mode=compile gcc
-+CC=libtool --mode=compile --tag=CC gcc
-+CCLD=libtool --mode=link --tag=CC gcc
-
- CFLAGS += -I../src/headers -I./ -Wall -W
-
-@@ -18,7 +19,7 @@
- default: $(LIBTEST)
-
- $(LIBTEST): $(OBJECTS)
-- libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | xargs` -o $@ -rpath $(LIBPATH) -version-info $(VERSION)
-+ $(CCLD) $(CFLAGS) `find . -type f | grep "[.]lo" | xargs` -o $@ -rpath $(LIBPATH) -version-info $(VERSION) ../libtomcrypt.la
-
- install: $(LIBTEST)
- libtool --silent --mode=install install -c $(LIBTEST) $(DESTDIR)$(LIBPATH)/$(LIBTEST)
---- libtomcrypt-1.17/makefile.shared.orig 2007-05-12 16:46:25.000000000 +0200
-+++ libtomcrypt-1.17/makefile.shared 2013-05-19 15:00:57.236664043 +0200
-@@ -10,6 +10,7 @@
-
- # Compiler and Linker Names
- CC=libtool --mode=compile --tag=CC gcc
-+CCLD=libtool --mode=link --tag=CC gcc
-
- # ranlib tools
- ifndef RANLIB
-@@ -242,20 +242,22 @@
- src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c
-
- #This rule makes the libtomcrypt library.
-+all: library testprof/$(LIBTEST)
-+
- library: $(LIBNAME)
-
--testprof/$(LIBTEST):
-+testprof/$(LIBTEST): $(LIBNAME)
- cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) make -f makefile.shared
-
- objs: $(OBJECTS)
-
--$(LIBNAME): $(OBJECTS) testprof/$(LIBTEST)
-- libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
-+$(LIBNAME): $(OBJECTS)
-+ $(CCLD) $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
-
- install: $(LIBNAME)
- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
-- cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
- libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la
-+ cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
- install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
-
+++ /dev/null
---- libtomcrypt-1.17.orig/makefile.shared 2007-05-12 08:46:25.000000000 -0600
-+++ libtomcrypt-1.17/makefile.shared 2007-06-27 21:56:29.000000000 -0600
-@@ -29,10 +29,12 @@
- ifndef IGNORE_SPEED
-
- # optimize for SPEED
--CFLAGS += -O3 -funroll-loops
-+# removed for building in Fedora
-+#CFLAGS += -O3 -funroll-loops
-
- # add -fomit-frame-pointer. hinders debugging!
--CFLAGS += -fomit-frame-pointer
-+# removed for building in Fedora
-+#CFLAGS += -fomit-frame-pointer
-
- # optimize for SIZE
- #CFLAGS += -Os -DLTC_SMALL_CODE
--- /dev/null
+--- libtomcrypt-1.18.1/makefile.shared.orig 2018-01-22 11:02:57.000000000 +0100
++++ libtomcrypt-1.18.1/makefile.shared 2018-04-13 19:26:45.534642643 +0200
+@@ -63,7 +63,7 @@
+ $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
+
+ install: $(call print-help,install,Installs the library + headers + pkg-config file) .common_install
+- sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc
++ sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^libdir=.*,libdir=$(LIBPATH),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc
+ install -p -d $(DESTDIR)$(LIBPATH)/pkgconfig
+ install -p -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
+
Summary: LibTomCrypt - fairly comprehensive, modular and portable cryptographic toolkit
Summary(pl.UTF-8): LibTomCrypt - dość obszerna, modularna i przenośna biblioteka kryptograficzna
Name: libtomcrypt
-Version: 1.17
-Release: 4
-License: Public Domain
+Version: 1.18.1
+Release: 1
+License: Public Domain or WTFPL v2
Group: Libraries
#Source0Download: https://github.com/libtom/libtomcrypt/releases
-Source0: https://github.com/libtom/libtomcrypt/releases/download/%{version}/crypt-%{version}.tar.bz2
-# Source0-md5: cea7e5347979909f458fe7ebb5a44f85
-Patch0: %{name}-link.patch
-Patch1: %{name}-makefile.patch
-URL: http://www.libtom.org/LibTomCrypt/
-%{?with_ltm:BuildRequires: libtommath-devel}
+Source0: https://github.com/libtom/libtomcrypt/releases/download/v%{version}/crypt-%{version}.tar.xz
+# Source0-md5: 81dcf5cda845ebce5d42446615deb563
+Patch0: %{name}-pc.patch
+URL: http://www.libtom.net/LibTomCrypt/
+%{?with_ltm:BuildRequires: libtommath-devel >= 1.0.1}
BuildRequires: libtool >= 2:1.5
+%{?with_ltm:BuildRequires: pkgconfig}
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
-CFLAGS="%{rpmcflags} %{?with_ltm:-DLTC_NO_ASM -DUSE_LTM -DLTM_DESC}" \
-%{?with_ltm:EXTRALIBS=-ltommath} \
+# IGNORE_SPEED avoids overriding rpmcflags
+CFLAGS="%{rpmcflags} %{?with_ltm:-DUSE_LTM -DLTM_DESC}" \
%{__make} -f makefile.shared \
- CC="libtool --mode=compile --tag=CC %{__cc}" \
- CCLD="libtool --mode=link --tag=CC %{__cc}" \
+ CC="%{__cc}" \
+ IGNORE_SPEED=1 \
LIBPATH=%{_libdir}
%install
%{__make} -f makefile.shared install \
DESTDIR=$RPM_BUILD_ROOT \
- LIBPATH=%{_libdir} \
- GROUP=$(id -ng) \
- USER=$(id -nu)
+ PREFIX=%{_prefix} \
+ LIBPATH=%{_libdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc LICENSE TODO changes
+%doc LICENSE README.md changes
%attr(755,root,root) %{_libdir}/libtomcrypt.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libtomcrypt.so.0
-%attr(755,root,root) %{_libdir}/libtomcrypt_prof.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libtomcrypt_prof.so.0
+%attr(755,root,root) %ghost %{_libdir}/libtomcrypt.so.1
%files devel
%defattr(644,root,root,755)
%doc doc/crypt.pdf notes/*.txt
%attr(755,root,root) %{_libdir}/libtomcrypt.so
-%attr(755,root,root) %{_libdir}/libtomcrypt_prof.so
%{_libdir}/libtomcrypt.la
-%{_libdir}/libtomcrypt_prof.la
%{_includedir}/tomcrypt*.h
+%{_pkgconfigdir}/libtomcrypt.pc
%files static
%defattr(644,root,root,755)
%{_libdir}/libtomcrypt.a
-%{_libdir}/libtomcrypt_prof.a