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