]> git.pld-linux.org Git - packages/ngtcp2.git/blob - ngtcp2.spec
474e47ec4094c1e169f280928d89fbb99dd17034
[packages/ngtcp2.git] / ngtcp2.spec
1 # TODO:
2 # - subpackage crypto libs?
3 # - boringssl, picotls?
4 #
5 # Conditional build:
6 %bcond_with     apidocs         # API documentation (files missing in tarball)
7 %bcond_without  static_libs     # static libraries
8 %bcond_without  gnutls          # gnutls crypto
9 %bcond_with     openssl         # openssl crypto (needs patched openssl)
10 #
11 Summary:        Effort to implement QUIC protocol (RFC 9000)
12 Summary(pl.UTF-8):      Próba implementacji protokołu QUIC (RFC 9000)
13 Name:           ngtcp2
14 Version:        0.6.0
15 Release:        1
16 License:        MIT
17 Group:          Libraries
18 #Source0Download: https://github.com/ngtcp2/ngtcp2/releases
19 Source0:        https://github.com/ngtcp2/ngtcp2/releases/download/v%{version}/%{name}-%{version}.tar.xz
20 # Source0-md5:  1ee949ace10d8db1371d180a504184bc
21 URL:            https://github.com/ngtcp2/ngtcp2
22 %{?with_gnutls:BuildRequires:   gnutls-devel >= 3.7.2}
23 BuildRequires:  libev-devel
24 BuildRequires:  libstdc++-devel >= 6:7
25 BuildRequires:  nghttp3-devel >= 0.2.0
26 %{?with_openssl:BuildRequires:  openssl-devel(quic) >= 1.1.1}
27 BuildRequires:  pkgconfig >= 1:0.20
28 BuildRequires:  rpm-build >= 4.6
29 BuildRequires:  tar >= 1:1.22
30 BuildRequires:  xz
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Effort to implement QUIC protocol (RFC 9000).
35
36 %description -l pl.UTF-8
37 Próba implementacji protokołu QUIC (RFC 9000).
38
39 %package devel
40 Summary:        Header files for ngtcp2 library
41 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki ngtcp2
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44
45 %description devel
46 Header files for ngtcp2 library.
47
48 %description devel -l pl.UTF-8
49 Pliki nagłówkowe biblioteki ngtcp2.
50
51 %package static
52 Summary:        Static ngtcp2 library
53 Summary(pl.UTF-8):      Statyczna biblioteka ngtcp2
54 Group:          Development/Libraries
55 Requires:       %{name}-devel = %{version}-%{release}
56
57 %description static
58 Static ngtcp2 library.
59
60 %description static -l pl.UTF-8
61 Statyczna biblioteka ngtcp2.
62
63 %package apidocs
64 Summary:        API documentation for ngtcp2 library
65 Summary(pl.UTF-8):      Dokumentacja API biblioteki ngtcp2
66 Group:          Documentation
67 BuildArch:      noarch
68
69 %description apidocs
70 API documentation for ngtcp2 library.
71
72 %description apidocs -l pl.UTF-8
73 Dokumentacja API biblioteki ngtcp2.
74
75 %prep
76 %setup -q
77
78 %build
79 %configure \
80         --disable-silent-rules \
81         %{!?with_static_libs:--disable-static} \
82         %{?with_gnutls:--with-gnutls} \
83         %{!?with_openssl:--without-openssl}
84 %{__make}
85
86 %if %{with apidocs}
87 %{__make} -C doc html
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %{__make} install \
94         DESTDIR=$RPM_BUILD_ROOT
95
96 # obsoleted by pkg-config
97 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libngtcp2*.la
98 # packaged as %doc
99 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/ngtcp2
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post   -p /sbin/ldconfig
105 %postun -p /sbin/ldconfig
106
107 %files
108 %defattr(644,root,root,755)
109 %doc AUTHORS COPYING ChangeLog README.rst
110 %attr(755,root,root) %{_libdir}/libngtcp2.so.*.*.*
111 %attr(755,root,root) %ghost %{_libdir}/libngtcp2.so.5
112 %if %{with gnutls}
113 %attr(755,root,root) %{_libdir}/libngtcp2_crypto_gnutls.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/libngtcp2_crypto_gnutls.so.2
115 %endif
116
117 %files devel
118 %defattr(644,root,root,755)
119 %attr(755,root,root) %{_libdir}/libngtcp2.so
120 %{_includedir}/ngtcp2
121 %{_pkgconfigdir}/libngtcp2.pc
122 %if %{with gnutls}
123 %attr(755,root,root) %{_libdir}/libngtcp2_crypto_gnutls.so
124 %{_pkgconfigdir}/libngtcp2_crypto_gnutls.pc
125 %endif
126
127 %if %{with static_libs}
128 %files static
129 %defattr(644,root,root,755)
130 %{_libdir}/libngtcp2.a
131 %if %{with gnutls}
132 %{_libdir}/libngtcp2_crypto_gnutls.a
133 %endif
134 %endif
135
136 %if %{with apidocs}
137 %files apidocs
138 %defattr(644,root,root,755)
139 %doc doc/build/*
140 %endif
This page took 0.059922 seconds and 2 git commands to generate.