root/WizardsToolkit/trunk/WizardsToolkit.spec.in

Revision 1, 6.0 KB (checked in by cristy, 3 months ago)


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