]>
Commit | Line | Data |
---|---|---|
7e68a898 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # don't perform "make check" | |
4 | %bcond_without static_libs # don't build static library | |
5 | ||
6 | Summary: HTTP/2.0 C library | |
7 | Summary(pl.UTF-8): Biblioteka C HTTP/2.0 | |
8 | Name: nghttp2 | |
2fcd3974 | 9 | Version: 0.4.0 |
90ff5ae9 | 10 | Release: 1 |
7e68a898 JB |
11 | License: MIT |
12 | Group: Libraries | |
2fcd3974 JB |
13 | #Source0Download: https://github.com/tatsuhiro-t/nghttp2/releases |
14 | Source0: https://github.com/tatsuhiro-t/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz | |
15 | # Source0-md5: ae6f5ebe15bd461893d220662575bad6 | |
7e68a898 JB |
16 | URL: https://github.com/tatsuhiro-t/nghttp2 |
17 | %{?with_tests:BuildRequires: CUnit >= 2.1} | |
18 | BuildRequires: autoconf >= 2.61 | |
19 | BuildRequires: automake | |
90ff5ae9 | 20 | %{?with_tests:BuildRequires: jansson-devel >= 2.5} |
7e68a898 JB |
21 | BuildRequires: libevent-devel >= 2.0.8 |
22 | BuildRequires: libstdc++-devel | |
23 | BuildRequires: libtool >= 2:2.2.6 | |
24 | BuildRequires: libxml2-devel >= 1:2.7.7 | |
25 | BuildRequires: openssl-devel >= 1.0.1 | |
26 | BuildRequires: pkgconfig >= 1:0.20 | |
90ff5ae9 JB |
27 | BuildRequires: python >= 1:2.7 |
28 | BuildRequires: python-Cython | |
29 | BuildRequires: spdylay-devel >= 1.2.3 | |
7e68a898 JB |
30 | BuildRequires: tar >= 1:1.22 |
31 | BuildRequires: xz | |
32 | BuildRequires: zlib-devel >= 1.2.3 | |
33 | Requires: libevent >= 2.0.8 | |
34 | Requires: libxml2 >= 1:2.7.7 | |
35 | Requires: openssl >= 1.0.1 | |
90ff5ae9 | 36 | Requires: spdylay >= 1.2.3 |
7e68a898 JB |
37 | Requires: zlib >= 1.2.3 |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
41 | This is an experimental implementation of Hypertext Transfer Protocol | |
42 | version 2.0. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | Ta biblioteka jest eksperymentalną implementacją protokołu HTTP | |
46 | (Hypertext Transfer Protocol) w wersji 2.0. | |
47 | ||
48 | %package devel | |
49 | Summary: Files needed for developing with libnghttp2 | |
50 | Summary(pl.UTF-8): Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2 | |
51 | Group: Development/Libraries | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | Requires: zlib-devel >= 1.2.3 | |
54 | ||
55 | %description devel | |
56 | Files needed for building applications with libnghttp2. | |
57 | ||
58 | %description devel -l pl.UTF-8 | |
59 | Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2. | |
60 | ||
61 | %package static | |
62 | Summary: Static libnghttp2 library | |
63 | Summary(pl.UTF-8): Statyczna biblioteka libnghttp2 | |
64 | Group: Development/Libraries | |
65 | Requires: %{name}-devel = %{version}-%{release} | |
66 | ||
67 | %description static | |
68 | Static libnghttp2 library. | |
69 | ||
70 | %description static -l pl.UTF-8 | |
71 | Statyczna biblioteka libnghttp2. | |
72 | ||
90ff5ae9 JB |
73 | %package -n python-nghttp2 |
74 | Summary: Python binding to nghttp2 library | |
75 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki nghttp2 | |
76 | Group: Libraries/Python | |
77 | Requires: %{name} = %{version}-%{release} | |
78 | Requires: python-libs >= 1:2.7 | |
79 | ||
80 | %description -n python-nghttp2 | |
81 | Python binding to nghttp2 library. | |
82 | ||
83 | %description -n python-nghttp2 -l pl.UTF-8 | |
84 | Wiązanie Pythona do biblioteki nghttp2. | |
85 | ||
7e68a898 | 86 | %prep |
90ff5ae9 | 87 | %setup -q |
7e68a898 JB |
88 | |
89 | %build | |
90 | %{__libtoolize} | |
91 | %{__aclocal} -I m4 | |
92 | %{__autoconf} | |
93 | %{__autoheader} | |
94 | %{__automake} | |
95 | %configure \ | |
2fcd3974 | 96 | --disable-silent-rules \ |
7e68a898 JB |
97 | %{!?with_static_libs:--disable-static} |
98 | ||
99 | %{__make} | |
100 | ||
101 | %if %{with tests} | |
102 | %{__make} check | |
103 | %endif | |
104 | ||
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %{__make} install \ | |
109 | DESTDIR=$RPM_BUILD_ROOT | |
110 | ||
111 | # obsoleted by pkg-config | |
112 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2.la | |
113 | # packaged as %doc | |
114 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2 | |
115 | ||
116 | %clean | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %post -p /sbin/ldconfig | |
120 | %postun -p /sbin/ldconfig | |
121 | ||
122 | %files | |
123 | %defattr(644,root,root,755) | |
124 | %doc AUTHORS COPYING README.rst | |
90ff5ae9 | 125 | %attr(755,root,root) %{_bindir}/deflatehd |
2fcd3974 | 126 | %attr(755,root,root) %{_bindir}/h2load |
90ff5ae9 | 127 | %attr(755,root,root) %{_bindir}/inflatehd |
7e68a898 JB |
128 | %attr(755,root,root) %{_bindir}/nghttp |
129 | %attr(755,root,root) %{_bindir}/nghttpd | |
130 | %attr(755,root,root) %{_bindir}/nghttpx | |
131 | %attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.* | |
2fcd3974 JB |
132 | %attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.3 |
133 | %{_mandir}/man1/h2load.1* | |
90ff5ae9 JB |
134 | %{_mandir}/man1/nghttp.1* |
135 | %{_mandir}/man1/nghttpd.1* | |
136 | %{_mandir}/man1/nghttpx.1* | |
7e68a898 JB |
137 | |
138 | %files devel | |
139 | %defattr(644,root,root,755) | |
140 | %attr(755,root,root) %{_libdir}/libnghttp2.so | |
141 | %{_includedir}/nghttp2 | |
142 | %{_pkgconfigdir}/libnghttp2.pc | |
143 | ||
144 | %if %{with static_libs} | |
145 | %files static | |
146 | %defattr(644,root,root,755) | |
147 | %{_libdir}/libnghttp2.a | |
148 | %endif | |
90ff5ae9 JB |
149 | |
150 | %files -n python-nghttp2 | |
151 | %defattr(644,root,root,755) | |
152 | %attr(755,root,root) %{py_sitedir}/nghttp2.so | |
2fcd3974 | 153 | %{py_sitedir}/python_nghttp2-0.0.0-py*.egg-info |