[packages/libtomcrypt] - new URL, updated to 1.18.1 (note: new libtomcrypt soname, libtomcrypt_prof dropped) - removed obso
qboosh
qboosh at pld-linux.org
Fri Apr 13 21:10:32 CEST 2018
commit 78baa3c1fb11653682421eee1a35065b1d9f829b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Apr 13 21:10:38 2018 +0200
- new URL, updated to 1.18.1 (note: new libtomcrypt soname, libtomcrypt_prof dropped)
- removed obsolete link,makefile patches
- added pc patch (fix libdir in .pc file)
libtomcrypt-link.patch | 55 ----------------------------------------------
libtomcrypt-makefile.patch | 17 --------------
libtomcrypt-pc.patch | 11 ++++++++++
libtomcrypt.spec | 44 +++++++++++++++++--------------------
4 files changed, 31 insertions(+), 96 deletions(-)
---
diff --git a/libtomcrypt.spec b/libtomcrypt.spec
index 6cdd187..c4d80b1 100644
--- a/libtomcrypt.spec
+++ b/libtomcrypt.spec
@@ -5,18 +5,20 @@
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
@@ -62,14 +64,13 @@ Statyczna biblioteka LibTomCrypt.
%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
@@ -77,9 +78,8 @@ rm -rf $RPM_BUILD_ROOT
%{__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
@@ -89,22 +89,18 @@ 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
diff --git a/libtomcrypt-link.patch b/libtomcrypt-link.patch
deleted file mode 100644
index 288dd0c..0000000
--- a/libtomcrypt-link.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- 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)
-
diff --git a/libtomcrypt-makefile.patch b/libtomcrypt-makefile.patch
deleted file mode 100644
index c8b12e6..0000000
--- a/libtomcrypt-makefile.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- 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
diff --git a/libtomcrypt-pc.patch b/libtomcrypt-pc.patch
new file mode 100644
index 0000000..0f102e7
--- /dev/null
+++ b/libtomcrypt-pc.patch
@@ -0,0 +1,11 @@
+--- 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/
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libtomcrypt.git/commitdiff/78baa3c1fb11653682421eee1a35065b1d9f829b
More information about the pld-cvs-commit
mailing list