-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathWizardsToolkit.spec.in
165 lines (132 loc) · 6.23 KB
/
WizardsToolkit.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
%global VERSION @PACKAGE_BASE_VERSION@
%global MAJOR_VERSION @WIZARD_MAJOR_VERSION@
%global Patchlevel @WIZARD_PATCHLEVEL_VERSION@
Name: @PACKAGE_NAME@
Version: %{VERSION}
Release: %{Patchlevel}
Summary: The Wizard's Toolkit includes command line utilities to convert plaintext to ciphertext, convert ciphertext to plaintext, report properties associated with ciphertext, compute the message digest of a file, and read message digests from a file and authenticate them. In addition, the Wizard's Toolkit includes a a cross-platform C API that includes a number of enciphering and hash methods many developers should find useful in their projects.
Group: Applications/Multimedia
License: https://urban-warrior.org/WizardsToolkit/script/license.php
Url: https://urban-warrior.org/WizardsToolkit/
Source0: https://urban-warrior.org/WizardsToolkit/download/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel, zlib-devel
%description
The Wizard's Toolkit includes command line utilities to convert plaintext to ciphertext, convert ciphertext to plaintext, report properties associated with ciphertext, compute the message digest of a file, and read message digests from a file and authenticate them. In addition, the Wizard's Toolkit includes a a cross-platform C API that includes a number of enciphering and hash methods many developers should find useful in their projects.
The Wizard's Toolkit is free software delivered as a ready-to-run binary distribution or as source code that you may freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems.
Here are just a few examples of what the Wizard's Toolkit command line utilities can do:
* Encipher plaintext.
* Decipher ciphertext.
* Report properties associated with ciphertext.
* Compute the message digest of a file.
* Read message digests from a file and verify them.
Here are just a few examples of what the Wizard's Toolkit Application Programming Interface can do:
* Return files as Binary Large OBjectS
* Write/read characters, shorts, words, and long words to/from a file
* Compute a cyclic redunancy checksum
* Handle C exceptions
* Generate a secure hash (includes MD5, SHA-1, SHA-224, SHA-256, SHA-384,
* and SHA-512)
* Generate a keyed-hash for message authentication
* Encipher/decipher messages (includes AES, Serpent, and Twofish)
* Authenticate a user (only secret-key supported at this time)
* Map content with its associated mime type and file extension
* Log events to the console or XML-style file
* Anonymous memory-mapped memory allocation/deallocation
* Increase entropy with message compression
* Generate cryptographically-strong random numbers
* Acquire/relinquish resources
* Acquire/relinquish semaphores
* Store/retrieve key-value pairs to/from a hashmap or linked-list
* Store/retrieve key-value pairs to/from a self-adjusting binary tree
* Parse or generate a XML document
* Convenience methods for dealing with strings
%package devel
Summary: Library links and header files for WizardsToolkit application development
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%description devel
WizardsToolkit-devel contains the library links and header files you'll
need to develop Wizard's Toolkit applications.
If you want to create applications that will use WizardsToolkit code or
APIs, you need to install WizardsToolkit-devel as well as WizardsToolkit.
You do not need to install it if you just want to use WizardsToolkit,
however.
%package doc
Summary: WizardsToolkit HTML documentation
Group: Documentation
%description doc
WizardsToolkit documentation, this package contains usage (for the
commandline tools) and API (for the libraries) documentation in HTML format.
Note this documentation can also be found on the WizardsToolkit website:
https://urban-warrior.org/WizardsToolkit/
%prep
%setup -q -n %{name}-%{VERSION}-%{Patchlevel}
sed -i 's/libltdl.la/libltdl.so/g' configure
iconv -f ISO-8859-1 -t UTF-8 README.txt > README.txt.tmp
touch -r README.txt README.txt.tmp
mv README.txt.tmp README.txt
%build
%configure --enable-shared \
--disable-static \
--with-threads
# Disable rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL="install -p"
cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{MAJOR_VERSION}
rm %{buildroot}%{_libdir}/*.la
# fix multilib issues
%ifarch x86_64 s390x ia64 ppc64 alpha sparc64
%define wordsize 64
%else
%define wordsize 32
%endif
mv %{buildroot}%{_includedir}/%{name}-%{MAJOR_VERSION}/wizard/wizard-config.h \
%{buildroot}%{_includedir}/%{name}-%{MAJOR_VERSION}/wizard/wizard-config-%{wordsize}.h
cat >%{buildroot}%{_includedir}/%{name}-%{MAJOR_VERSION}/wizard/wizard-config.h <<EOF
#ifndef WIZARDSTOOLKIT_MULTILIB
#define WIZARDSTOOLKIT_MULTILIB
#include <bits/wordsize.h>
#if __WORDSIZE == 32
# include "wizard-config-32.h"
#elif __WORDSIZE == 64
# include "wizard-config-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
#endif
EOF
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc QuickStart.txt ChangeLog
%doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt
%{_libdir}/libWizardsToolkit.so.*
%{_libdir}/%{name}-%{VERSION}
%{_bindir}/[a-z]*
%{_datadir}/%{name}-%{MAJOR_VERSION}
%{_mandir}/man[145]/[a-zA-Z]*
%{_sysconfdir}/%{name}-%{MAJOR_VERSION}
%files devel
%defattr(-,root,root,-)
%{_bindir}/WizardsToolkit-config
%{_libdir}/libWizardsToolkit.so
%{_libdir}/pkgconfig/WizardsToolkit.pc
%dir %{_includedir}/%{name}-%{MAJOR_VERSION}
%{_includedir}/%{name}-%{MAJOR_VERSION}/wizard
%{_mandir}/man1/WizardsToolkit-config.*
%files doc
%defattr(-,root,root,-)
%doc %{_datadir}/doc/%{name}-%{MAJOR_VERSION}
%doc LICENSE
%changelog
* Sun May 01 2005 Cristy <[email protected]> 1.0-0
* Port of Redhat's RPM script to support WizardsToolkit.