Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 ##
2 ## cryptlib.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
24 # package version
25 %define V_full 3.4.1
26 %define V_comp 341
27 %define V_track 341
29 # package information
30 Name: cryptlib
31 Summary: Cryptography Library
32 URL: http://www.cs.auckland.ac.nz/~pgut001/cryptlib/
33 Vendor: Peter Gutmann
34 Packager: OpenPKG Foundation e.V.
35 Distribution: OpenPKG Community
36 Class: EVAL
37 Group: Cryptography
38 License: MIT-style
39 Version: %{V_full}
40 Release: 20120800
42 # list of sources
43 Source0: ftp://ftp.franken.de/pub/crypt/cryptlib/cl%{V_comp}.zip
44 Source1: ftp://ftp.franken.de/pub/crypt/cryptlib/manual.pdf
45 Source2: c-sol.s
46 Patch0: cryptlib.patch
48 # build information
49 BuildPreReq: OpenPKG, openpkg >= 20100101, infozip, make, gcc
50 PreReq: OpenPKG, openpkg >= 20100101
52 %description
53 CryptLib is a powerful security toolkit which allows even
54 inexperienced crypto programmers to easily add encryption and
55 authentication services to their software. The high level interface
56 provides anyone with the ability to add strong security capabilities
57 to an application in as little as half an hour, without needing
58 to know any of the low level details which make the encryption
59 or authentication work. Because of this, cryptlib dramatically
60 reduces the cost involved in adding security to new or existing
61 applications. CryptLib provides a standardised interface to a number
62 of popular encryption algorithms, as well as providing a high level
63 interface which hides most of the implementation details and
64 provides an operating system independent encoding method which makes
65 it easy to transfer secured data from one operating environment to
66 another.
68 %track
69 prog cryptlib = {
70 version = %{V_track}
71 url = ftp://ftp.franken.de/pub/crypt/cryptlib/
72 regex = cl(__VER__)\.zip
73 transform = "s/^(\d\d)$/${1}0/, $_"
74 }
76 %prep
77 %setup -q -c -T
78 %{l_prefix}/bin/unzip -q -x %{SOURCE0}
79 %patch -p0
81 # repair 'can't open crypt/c-sol.s for reading'
82 cp %{SOURCE c-sol.s} bn/bn-sol.s
83 cp %{SOURCE c-sol.s} crypt/
85 # remove CR causing build failure
86 %{l_shtool} subst -e 's;\r$;;' tools/*.sh
88 # disable automatic detection
89 %{l_shtool} subst \
90 -e 's;if \[ .*/sql.h \];if false;g' \
91 -e 's;if \[ .*/ldap.h \];if false;g' \
92 tools/ccopts.sh
94 # allow for parallel build
95 %{l_shtool} subst \
96 -e 's;@\([\.\-]\);@+\1;g' \
97 -e 's;@\(make\);@+\1;g' \
98 makefile
100 # special handling for GCC
101 if [ ".`(%{l_cc} -v; %{l_cc} --version) </dev/null 2>&1 | grep -i 'gcc'`" != . ]; then
102 %{l_shtool} subst -e 's;-xO\([0-9] *\);-O\1;g' makefile
103 fi
105 %build
106 %{l_make} babies love cookies
107 %{l_make} %{l_mflags -O} \
108 CC="%{l_cc} %{l_cflags -O}"
110 %install
111 %{l_shtool} mkdir -f -p -m 755 \
112 $RPM_BUILD_ROOT%{l_prefix}/include \
113 $RPM_BUILD_ROOT%{l_prefix}/lib \
114 $RPM_BUILD_ROOT%{l_prefix}/share/cryptlib
115 %{l_shtool} install -c -m 644 \
116 cryptlib.h $RPM_BUILD_ROOT%{l_prefix}/include/
117 %{l_shtool} install -c -m 644 \
118 libcl.a $RPM_BUILD_ROOT%{l_prefix}/lib/libcryptlib.a
119 %{l_shtool} install -c -m 644 \
120 %{SOURCE manual.pdf} $RPM_BUILD_ROOT%{l_prefix}/share/cryptlib/
121 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
122 %{l_files_std} \
123 '%doc %{l_prefix}/share/cryptlib/manual.pdf'
125 %files -f files
127 %clean