# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231409382 -3600 # Node ID a13194f0acb75f5509e8e6c1fdd6bcdc8c109982 # Parent 88242dc55a66b0268c5c0becdc105d9a01c57b22 Import package vendor original specs for necessary manipulations. diff -r 88242dc55a66 -r a13194f0acb7 cryptlib/cryptlib.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cryptlib/cryptlib.patch Thu Jan 08 11:09:42 2009 +0100 @@ -0,0 +1,13 @@ +Index: random/unix.c +--- random/unix.c.orig 2005-08-23 00:48:20 +0200 ++++ random/unix.c 2005-09-06 20:55:10 +0200 +@@ -24,6 +24,9 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#endif + #include "crypt.h" + + /* Unix and Unix-like systems share the same makefile, make sure that the diff -r 88242dc55a66 -r a13194f0acb7 cryptlib/cryptlib.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cryptlib/cryptlib.spec Thu Jan 08 11:09:42 2009 +0100 @@ -0,0 +1,109 @@ +## +## cryptlib.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_full 3.3.2 +%define V_comp 332 +%define V_track 332 + +# package information +Name: cryptlib +Summary: Cryptography Library +URL: http://www.cs.auckland.ac.nz/~pgut001/cryptlib/ +Vendor: Peter Gutmann +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Cryptography +License: MIT-style +Version: %{V_full} +Release: 20080704 + +# list of sources +Source0: ftp://ftp.franken.de/pub/crypt/cryptlib/cl%{V_comp}.zip +Source1: ftp://ftp.franken.de/pub/crypt/cryptlib/manual.pdf +Patch0: cryptlib.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130, infozip, make, gcc, perl +PreReq: OpenPKG, openpkg >= 20040130 +AutoReq: no +AutoReqProv: no + +%description + CryptLib is a powerful security toolkit which allows even + inexperienced crypto programmers to easily add encryption and + authentication services to their software. The high-level interface + provides anyone with the ability to add strong security capabilities + to an application in as little as half an hour, without needing + to know any of the low-level details which make the encryption + or authentication work. Because of this, cryptlib dramatically + reduces the cost involved in adding security to new or existing + applications. CryptLib provides a standardised interface to a number + of popular encryption algorithms, as well as providing a high-level + interface which hides most of the implementation details and + provides an operating-system-independent encoding method which makes + it easy to transfer secured data from one operating environment to + another. + +%track + prog cryptlib = { + version = %{V_track} + url = ftp://ftp.franken.de/pub/crypt/cryptlib/ + regex = cl(__VER__)\.zip + transform = "s/^(\d\d)$/${1}0/, $_" + } + +%prep + %setup -q -c -T + %{l_prefix}/bin/unzip -q -x %{SOURCE0} + %patch -p0 + %{l_prefix}/bin/perl -p -i -e 's;\r$;;m' tools/*.pl tools/*.sh + +%build + %{l_make} %{l_mflags} \ + CC="%{l_cc} %{l_cflags -O}" + +%install + rm -rf $RPM_BUILD_ROOT + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/include \ + $RPM_BUILD_ROOT%{l_prefix}/lib \ + $RPM_BUILD_ROOT%{l_prefix}/share/cryptlib + %{l_shtool} install -c -m 644 \ + cryptlib.h $RPM_BUILD_ROOT%{l_prefix}/include/ + %{l_shtool} install -c -m 644 \ + libcl.a $RPM_BUILD_ROOT%{l_prefix}/lib/libcryptlib.a + %{l_shtool} install -c -m 644 \ + %{SOURCE manual.pdf} $RPM_BUILD_ROOT%{l_prefix}/share/cryptlib/ + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%doc %{l_prefix}/share/cryptlib/manual.pdf' + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT +