Fix CVE-2017-6891 in minitasn1 code
[platform/upstream/gnutls.git] / packaging / gnutls.spec
1 %define gnutls_sover 28
2 %define gnutlsxx_sover 28
3 %define gnutls_ossl_sover 27
4
5 Name:           gnutls
6 Version:        3.3.27
7 Release:        0
8 Summary:        The GNU Transport Layer Security Library
9 License:        LGPL-2.1+
10 Group:          Security/Crypto Libraries
11 Url:            http://www.gnutls.org/
12 Source0:        http://ftp.gnu.org/gnu/gnutls/%{name}-%{version}.tar.xz
13 Source1:        baselibs.conf
14 Source1001:     gnutls.manifest
15 BuildRequires:  automake
16 BuildRequires:  gcc-c++
17 BuildRequires:  libidn-devel
18 BuildRequires:  pkgconfig(nettle)
19 BuildRequires:  libtasn1-devel
20 BuildRequires:  gettext-tools
21 BuildRequires:  libtool
22 BuildRequires:  pkg-config
23 BuildRequires:  xz
24 BuildRequires:  zlib-devel
25 BuildRequires:  makeinfo
26 BuildRequires:  bison
27
28 Provides: gnutls-utils = %{version}-%{release}
29
30 %description
31 The GnuTLS project aims to develop a library that provides a secure
32 layer over a reliable transport layer. Currently the GnuTLS library
33 implements the proposed standards of the IETF's TLS working group.
34
35 %package -n libgnutls
36 Summary:        The GNU Transport Layer Security Library
37 License:        LGPL-2.1+
38 Group:          Security/Crypto Libraries
39
40 %description -n libgnutls
41 The GnuTLS project aims to develop a library that provides a secure
42 layer over a reliable transport layer. Currently the GnuTLS library
43 implements the proposed standards of the IETF's TLS working group.
44
45 %package -n libgnutlsxx
46 Summary:        The GNU Transport Layer Security Library
47 License:        LGPL-2.1+
48 Group:          Security/Crypto Libraries
49
50 %description -n libgnutlsxx
51 The GnuTLS project aims to develop a library that provides a secure
52 layer over a reliable transport layer. Currently the GnuTLS library
53 implements the proposed standards of the IETF's TLS working group.
54
55
56 %package -n libgnutls-devel
57 Summary:        Development package for gnutls
58 License:        LGPL-2.1+
59 Group:          Development/Libraries
60 Requires:       glibc-devel
61 Requires:       libgnutls = %{version}
62 Provides:       gnutls-devel = %{version}-%{release}
63
64 %description -n libgnutls-devel
65 Files needed for software development using gnutls.
66
67 %package -n libgnutlsxx-devel
68 Summary:        Development package for gnutls
69 License:        LGPL-2.1+
70 Group:          Development/Libraries
71 Requires:       libgnutls-devel = %{version}
72 Requires:       libgnutlsxx = %{version}
73 Requires:       libstdc++-devel
74
75 %description -n libgnutlsxx-devel
76 Files needed for software development using gnutls.
77
78 %prep
79 %setup -q
80 cp %{SOURCE1001} .
81 echo %{_includedir}/%{name}/abstract.h
82
83 %build
84 export CFLAGS="$CFLAGS -fgnu89-inline"
85 %reconfigure \
86         --without-p11-kit \
87         --disable-static \
88         --with-pic \
89         --disable-rpath \
90         --disable-silent-rules \
91         --with-default-trust-store-dir=/etc/ssl/certs \
92         --disable-doc \
93         --with-sysroot=/%{?_sysroot}
94 %__make %{?_smp_mflags}
95
96 # 17-ago-2011, Test suite passes in factory, just not
97 #in the build system due to some broken code requiring both networking
98 #and fixes.
99 #make check
100
101 %install
102 %make_install
103 rm -rf doc/examples/.deps doc/examples/.libs doc/examples/*.{o,lo,la} doc/examples/Makefile{,.in}
104 find doc/examples -perm -111 -exec rm {} \;
105 rm -rf %{buildroot}%{_datadir}/locale/en@{,bold}quot
106 # Do not package static libs and libtool files
107 rm -f %{buildroot}%{_libdir}/*.la
108 %find_lang libgnutls --all-name
109
110 %post -n libgnutls -p /sbin/ldconfig
111
112 %postun -n libgnutls -p /sbin/ldconfig
113
114 %post -n libgnutlsxx -p /sbin/ldconfig
115
116 %postun -n libgnutlsxx -p /sbin/ldconfig
117
118 %files -f libgnutls.lang
119 %manifest %{name}.manifest
120 %defattr(-, root, root)
121 %{_bindir}/certtool
122 %{_bindir}/crywrap
123 %{_bindir}/gnutls-cli
124 %{_bindir}/gnutls-cli-debug
125 %{_bindir}/gnutls-serv
126 %{_bindir}/ocsptool
127 %{_bindir}/psktool
128 %{_bindir}/srptool
129
130 %files -n libgnutls
131 %manifest %{name}.manifest
132 %defattr(-,root,root)
133 %{_libdir}/libgnutls.so.*
134 %license COPYING.LESSER
135
136 %files -n libgnutlsxx
137 %manifest %{name}.manifest
138 %defattr(-,root,root)
139 %{_libdir}/libgnutlsxx.so.*
140
141 %files -n libgnutls-devel
142 %manifest %{name}.manifest
143 %defattr(-, root, root)
144 %dir %{_includedir}/%{name}
145 %{_includedir}/%{name}/abstract.h
146 %{_includedir}/%{name}/crypto.h
147 %{_includedir}/%{name}/compat.h
148 %{_includedir}/%{name}/dtls.h
149 %{_includedir}/%{name}/gnutls.h
150 %{_includedir}/%{name}/openpgp.h
151 %{_includedir}/%{name}/ocsp.h
152 %{_includedir}/%{name}/pkcs11.h
153 %{_includedir}/%{name}/pkcs12.h
154 %{_includedir}/%{name}/x509.h
155 %{_includedir}/%{name}/x509-ext.h
156 %{_includedir}/%{name}/self-test.h
157 %{_includedir}/%{name}/tpm.h
158 %{_libdir}/libgnutls.so
159 %{_libdir}/pkgconfig/gnutls.pc
160
161 %files -n libgnutlsxx-devel
162 %manifest %{name}.manifest
163 %defattr(-, root, root)
164 %{_libdir}/libgnutlsxx.so
165 %dir %{_includedir}/%{name}
166 %{_includedir}/%{name}/gnutlsxx.h