summaryrefslogtreecommitdiff
path: root/packaging/nettle.spec
blob: 7db9eab4581dd5f55d972b527792c79931e7f1d6 (plain)
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
Name:           nettle
Version:        2.7.1
Release:        0
Summary:        Cryptographic Library
License:        LGPL-2.1+ and GPL-2.0+
Group:          Security/Crypto Libraries
Source0:        https://ftp.gnu.org/gnu/nettle/nettle-%{version}.tar.gz
Source1:        baselibs.conf
Source1001: 	nettle.manifest
BuildRequires:  gmp-devel
BuildRequires:  pkgconfig

%description
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.

%package -n libhogweed

Summary:        Cryptographic Library for Public Key Algorithms
License:        LGPL-2.1+
Group:          Security/Crypto Libraries

%description -n libhogweed
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.

The libhogweed library contains public key algorithms to use with libnettle.

%package -n libnettle-devel
Summary:        Cryptographic Library
License:        LGPL-2.1+
Group:          Development/Libraries
Requires:       glibc-devel
Requires:       gmp-devel
Requires:       libhogweed = %{version}
Requires:       libnettle = %{version}

%description -n libnettle-devel
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.

%package -n libnettle

Summary:        Cryptographic Tools
License:        LGPL-2.1+
Group:          Security/Crypto Libraries

%description -n libnettle
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.

This package contains a few command-line tools to perform cryptographic
operations using the nettle library.

%prep
%setup -q
cp %{SOURCE1001} .

%build
export CFLAGS="$CFLAGS -std=c89"
%if "%{asan}" == "1"
%restore_fcommon
%endif
#configure --disable-static
%configure --enable-shared

make %{?_smp_mflags}

%check
make check

%install
%make_install

%post   -n libnettle -p /sbin/ldconfig

%postun -n libnettle -p /sbin/ldconfig

%post   -n libhogweed -p /sbin/ldconfig

%postun -n libhogweed -p /sbin/ldconfig


%files -n libnettle
%manifest %{name}.manifest
%defattr(-,root,root)
%license COPYING.LIB
%{_libdir}/libnettle.so.*

%files -n libhogweed
%manifest %{name}.manifest
%defattr(-,root,root)
%license COPYING.LIB
%{_libdir}/libhogweed.so.*

%files -n libnettle-devel
%manifest %{name}.manifest
%defattr(-,root,root)
%license COPYING.LIB
%{_includedir}/nettle
%{_libdir}/libnettle.so
%{_libdir}/libhogweed.so
%{_libdir}/pkgconfig/hogweed.pc
%{_libdir}/pkgconfig/nettle.pc

%files -n nettle
%manifest %{name}.manifest
%defattr(-,root,root)
%license COPYING*
%{_bindir}/nettle-lfib-stream
%{_bindir}/pkcs1-conv
%{_bindir}/sexp-conv
%{_bindir}/nettle-hash

%changelog