[packages/libtomcrypt] - new

qboosh qboosh at pld-linux.org
Sun May 19 17:22:43 CEST 2013


commit 105aa51b14ebf9073c1071f9e5aea3849d41864e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun May 19 17:22:48 2013 +0200

    - new

 libtomcrypt-link.patch | 55 ++++++++++++++++++++++++++++
 libtomcrypt.spec       | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 154 insertions(+)
---
diff --git a/libtomcrypt.spec b/libtomcrypt.spec
new file mode 100644
index 0000000..24a191a
--- /dev/null
+++ b/libtomcrypt.spec
@@ -0,0 +1,99 @@
+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:	1
+License:	Public Domain
+Group:		Libraries
+Source0:	http://libtom.org/files/crypt-%{version}.tar.bz2
+# Source0-md5:	cea7e5347979909f458fe7ebb5a44f85
+Patch0:		%{name}-link.patch
+URL:		http://libtom.org/?page=features&whatfile=crypt
+BuildRequires:	libtool
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LibTomCrypt is a fairly comprehensive, modular and portable
+cryptographic toolkit that provides developers with a vast array of
+well known published block ciphers, one-way hash functions, chaining
+modes, pseudo-random number generators, public key cryptography and a
+plethora of other routines.
+
+%description -l pl.UTF-8
+LibTomCrypt to dość obszerna, modularna i przenośna biblioteka
+kryptograficzna, zapewniająca programistom szeroki zbiór dobrze
+znanych szyfrów blokowych, jednokierunkowych funkcji haszujących,
+trybów łańcuchowych, generatorów liczb pseudolosowych, kryptografii
+klucza publicznego oraz wiele innych procedur.
+
+%package devel
+Summary:	Header files for LibTomCrypt library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki LibTomCrypt
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for LibTomCrypt library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki LibTomCrypt.
+
+%package static
+Summary:	Static LibTomCrypt library
+Summary(pl.UTF-8):	Statyczna biblioteka LibTomCrypt
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static LibTomCrypt library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka LibTomCrypt.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+CFLAGS="%{rpmcflags}" \
+%{__make} -f makefile.shared \
+	CC="libtool --mode=compile --tag=CC %{__cc}" \
+	CCLD="libtool --mode=link --tag=CC %{__cc}" \
+	LIBPATH=%{_libdir}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -f makefile.shared install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	LIBPATH=%{_libdir} \
+	GROUP=$(id -ng) \
+	USER=$(id -nu)
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE TODO 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
+
+%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
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libtomcrypt.a
+%{_libdir}/libtomcrypt_prof.a
diff --git a/libtomcrypt-link.patch b/libtomcrypt-link.patch
new file mode 100644
index 0000000..288dd0c
--- /dev/null
+++ b/libtomcrypt-link.patch
@@ -0,0 +1,55 @@
+--- 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)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libtomcrypt.git/commitdiff/105aa51b14ebf9073c1071f9e5aea3849d41864e



More information about the pld-cvs-commit mailing list