35 Distribution: OpenPKG Community |
35 Distribution: OpenPKG Community |
36 Class: EVAL |
36 Class: EVAL |
37 Group: Cryptography |
37 Group: Cryptography |
38 License: MIT-style |
38 License: MIT-style |
39 Version: %{V_full} |
39 Version: %{V_full} |
40 Release: 20090106 |
40 Release: 20120800 |
41 |
41 |
42 # list of sources |
42 # list of sources |
43 Source0: ftp://ftp.franken.de/pub/crypt/cryptlib/cl%{V_comp}.zip |
43 Source0: ftp://ftp.franken.de/pub/crypt/cryptlib/cl%{V_comp}.zip |
44 Source1: ftp://ftp.franken.de/pub/crypt/cryptlib/manual.pdf |
44 Source1: ftp://ftp.franken.de/pub/crypt/cryptlib/manual.pdf |
45 Source2: bn-sol.s |
45 Source2: c-sol.s |
46 Patch0: cryptlib.patch |
46 Patch0: cryptlib.patch |
47 |
47 |
48 # build information |
48 # build information |
49 Prefix: %{l_prefix} |
49 BuildPreReq: OpenPKG, openpkg >= 20100101, infozip, make, gcc |
50 BuildRoot: %{l_buildroot} |
50 PreReq: OpenPKG, openpkg >= 20100101 |
51 BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, infozip |
|
52 PreReq: OpenPKG, openpkg >= 20040130 |
|
53 AutoReq: no |
|
54 AutoReqProv: no |
|
55 |
51 |
56 %description |
52 %description |
57 CryptLib is a powerful security toolkit which allows even |
53 CryptLib is a powerful security toolkit which allows even |
58 inexperienced crypto programmers to easily add encryption and |
54 inexperienced crypto programmers to easily add encryption and |
59 authentication services to their software. The high-level interface |
55 authentication services to their software. The high level interface |
60 provides anyone with the ability to add strong security capabilities |
56 provides anyone with the ability to add strong security capabilities |
61 to an application in as little as half an hour, without needing |
57 to an application in as little as half an hour, without needing |
62 to know any of the low-level details which make the encryption |
58 to know any of the low level details which make the encryption |
63 or authentication work. Because of this, cryptlib dramatically |
59 or authentication work. Because of this, cryptlib dramatically |
64 reduces the cost involved in adding security to new or existing |
60 reduces the cost involved in adding security to new or existing |
65 applications. CryptLib provides a standardised interface to a number |
61 applications. CryptLib provides a standardised interface to a number |
66 of popular encryption algorithms, as well as providing a high-level |
62 of popular encryption algorithms, as well as providing a high level |
67 interface which hides most of the implementation details and |
63 interface which hides most of the implementation details and |
68 provides an operating-system-independent encoding method which makes |
64 provides an operating system independent encoding method which makes |
69 it easy to transfer secured data from one operating environment to |
65 it easy to transfer secured data from one operating environment to |
70 another. |
66 another. |
71 |
67 |
72 %track |
68 %track |
73 prog cryptlib = { |
69 prog cryptlib = { |
78 } |
74 } |
79 |
75 |
80 %prep |
76 %prep |
81 %setup -q -c -T |
77 %setup -q -c -T |
82 %{l_prefix}/bin/unzip -q -x %{SOURCE0} |
78 %{l_prefix}/bin/unzip -q -x %{SOURCE0} |
83 cp %{SOURCE bn-sol.s} bn/ |
|
84 %patch -p0 |
79 %patch -p0 |
85 %{l_shtool} subst -e 's;\r$;;' tools/*.pl tools/*.sh |
80 |
86 %{l_shtool} subst -e 's;-xO3 *;;g' 's; *-O;;g' makefile |
81 # repair 'can't open crypt/c-sol.s for reading' |
87 %{l_shtool} subst -e 's; *-O[1234];;g' 's; *-O;;g' makefile |
82 cp %{SOURCE c-sol.s} bn/bn-sol.s |
|
83 cp %{SOURCE c-sol.s} crypt/ |
|
84 |
|
85 # remove CR causing build failure |
|
86 %{l_shtool} subst -e 's;\r$;;' tools/*.sh |
|
87 |
|
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 |
|
93 |
|
94 # allow for parallel build |
|
95 %{l_shtool} subst \ |
|
96 -e 's;@\([\.\-]\);@+\1;g' \ |
|
97 -e 's;@\(make\);@+\1;g' \ |
|
98 makefile |
|
99 |
|
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 |
88 |
104 |
89 %build |
105 %build |
|
106 %{l_make} babies love cookies |
90 %{l_make} %{l_mflags -O} \ |
107 %{l_make} %{l_mflags -O} \ |
91 CC="%{l_cc} %{l_cflags -O}" |
108 CC="%{l_cc} %{l_cflags -O}" |
92 |
109 |
93 %install |
110 %install |
94 rm -rf $RPM_BUILD_ROOT |
|
95 %{l_shtool} mkdir -f -p -m 755 \ |
111 %{l_shtool} mkdir -f -p -m 755 \ |
96 $RPM_BUILD_ROOT%{l_prefix}/include \ |
112 $RPM_BUILD_ROOT%{l_prefix}/include \ |
97 $RPM_BUILD_ROOT%{l_prefix}/lib \ |
113 $RPM_BUILD_ROOT%{l_prefix}/lib \ |
98 $RPM_BUILD_ROOT%{l_prefix}/share/cryptlib |
114 $RPM_BUILD_ROOT%{l_prefix}/share/cryptlib |
99 %{l_shtool} install -c -m 644 \ |
115 %{l_shtool} install -c -m 644 \ |