Fix a couple of loops.
[fedora-mingw.git] / libgcrypt / mingw32-libgcrypt.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 %define run_tests 0
8
9 Name:           mingw32-libgcrypt
10 Version:        1.4.4
11 Release:        1%{?dist}
12 Summary:        MinGW Windows gcrypt encryption library
13
14 License:        LGPLv2+ and GPLv2+
15 Group:          Development/Libraries
16
17 URL:            ftp://ftp.gnupg.org/gcrypt/libgcrypt/
18 # The original libgcrypt sources now contain potentially patented ECC
19 # cipher support. We have to remove it in the tarball we ship with
20 # the hobble-libgcrypt script.
21 Source0:        ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2
22 Source1:        ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2.sig
23 Source2:        wk@g10code.com
24 Source3:        hobble-libgcrypt
25
26 Patch1:         libgcrypt-1.4.4-fips-no-access.patch
27
28 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
29
30 BuildArch:      noarch
31
32 BuildRequires:  mingw32-filesystem >= 40
33 BuildRequires:  mingw32-gcc
34 BuildRequires:  mingw32-binutils
35 BuildRequires:  mingw32-libgpg-error
36 BuildRequires:  mingw32-dlfcn
37
38 %if %run_tests
39 BuildRequires:  wine
40 %endif
41
42
43 %description
44 Libgcrypt is a general purpose crypto library based on the code used
45 in GNU Privacy Guard.
46
47 This is a Windows cross-compiled version of the library.
48
49
50 %prep
51 %setup -q -n libgcrypt-%{version}
52 %{SOURCE3}
53 %patch1 -p1 -b .no-access
54
55
56 %build
57 %{_mingw32_configure} \
58   --disable-static \
59   --enable-pubkey-ciphers='dsa elgamal rsa'
60 make %{?_smp_mflags}
61
62
63 %check
64 %if %run_tests
65 # Stupid Wine doesn't load DLLs from the PATH any
66 # more, so libtool scripts don't work.  As a result
67 # we need to use the following Big Hack.
68 make -C tests check ||:
69 pushd src/.libs
70 for t in $(pwd)/../../tests/*.exe; do
71   wine $t
72 done
73 popd
74 %endif
75
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 make DESTDIR=$RPM_BUILD_ROOT install
81
82 # Remove info pages which duplicate what is in Fedora natively.
83 rm -rf $RPM_BUILD_ROOT%{_mingw32_infodir}
84
85 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libgcrypt.def
86
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91
92 %files
93 %defattr(-,root,root)
94 %doc COPYING COPYING.LIB
95 %{_mingw32_bindir}/dumpsexp.exe
96 %{_mingw32_bindir}/hmac256.exe
97 %{_mingw32_bindir}/libgcrypt-11.dll
98 %{_mingw32_bindir}/libgcrypt-config
99 %{_mingw32_libdir}/libgcrypt.dll.a
100 %{_mingw32_libdir}/libgcrypt.la
101 %{_mingw32_includedir}/gcrypt-module.h
102 %{_mingw32_includedir}/gcrypt.h
103 %{_mingw32_datadir}/aclocal/libgcrypt.m4
104
105
106 %changelog
107 * Fri Feb  6 2009 Richard W.M. Jones <rjones@redhat.com> - 1.4.4-1
108 - Update to Fedora native version 1.4.4:
109   . Remove potentially patented ECC support.
110   . Do not abort when the fips mode kernel flag is inaccessible
111     due to permissions (#470219).
112 - For review (Michel Alexandre Salim):
113   . Remove *.def file.
114   . Make description clearer.
115   . Distribute the license files.
116 - The license for binaries is GPLv2+, so update the license field.
117 - Add check section (disabled by default).
118 - Why did we set PATH before configure? Removed.
119 - Added BR mingw32-dlfcn suggested by auto-buildrequires.
120
121 * Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.4.3-3
122 - Use _smp_mflags.
123 - Disable static libraries.
124
125 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.4.3-2
126 - Rename mingw -> mingw32.
127
128 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 1.4.3-1
129 - Update to 1.4.3 release
130
131 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 1.4.1-6
132 - Remove info pages.
133
134 * Thu Sep 11 2008 Daniel P. Berrange <berrange@redhat.com> - 1.4.1-5
135 - Set PATH so it finds gpg-error-config
136
137 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 1.4.1-4
138 - Remove static library.
139
140 * Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.4.1-3
141 - Use RPM macros from mingw-filesystem.
142
143 * Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 1.4.1-2
144 - List files explicitly and use custom CFLAGS
145
146 * Mon Jul  7 2008 Richard W.M. Jones <rjones@redhat.com> - 1.4.1-1
147 - Initial RPM release, largely based on earlier work from several sources.