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