]>
Commit | Line | Data |
---|---|---|
7947fc2e | 1 | # |
2 | # Conditional build | |
e0264d10 | 3 | %bcond_with tests # perform "make check" |
7947fc2e | 4 | # |
35f10266 | 5 | Summary: Embeded HTTP server library |
7947fc2e | 6 | Summary(pl.UTF-8): Biblioteka wbudowanego serwera HTTP |
35f10266 | 7 | Name: libmicrohttpd |
1042201b | 8 | Version: 0.9.42 |
337f2221 | 9 | Release: 1 |
82e599ef | 10 | License: LGPL v2.1+ |
35f10266 | 11 | Group: Libraries |
7947fc2e | 12 | Source0: http://ftp.gnu.org/gnu/libmicrohttpd/%{name}-%{version}.tar.gz |
1042201b | 13 | # Source0-md5: 3b9cf0b67fc8ebc9e69f53c6bc84a88d |
e0264d10 | 14 | Patch0: %{name}-info.patch |
dc4b9d69 | 15 | Patch1: %{name}-link.patch |
337f2221 | 16 | Patch2: %{name}-sh.patch |
35f10266 AF |
17 | URL: http://www.gnu.org/software/libmicrohttpd/ |
18 | BuildRequires: autoconf >= 2.61 | |
19 | BuildRequires: automake >= 1:1.10 | |
458781c7 | 20 | BuildRequires: gnutls-devel >= 2.8.6 |
35f10266 | 21 | BuildRequires: libgcrypt-devel >= 1.2.4 |
f6457725 | 22 | BuildRequires: libmagic-devel |
035db06f | 23 | BuildRequires: libtool >= 2:2.4.0 |
e72faf06 | 24 | # for microspdy |
f6457725 | 25 | BuildRequires: openssl-devel >= 0.9.8 |
e0264d10 | 26 | BuildRequires: texinfo |
35f10266 | 27 | %if %{with tests} |
e0264d10 | 28 | BuildRequires: curl-devel >= 7.16.4 |
035db06f | 29 | BuildRequires: spdylay-devel |
35f10266 | 30 | %endif |
458781c7 JB |
31 | Requires: gnutls >= 2.8.6 |
32 | Requires: libgcrypt >= 1.2.4 | |
35f10266 AF |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
7947fc2e | 36 | GNU libmicrohttpd is a small C library that is supposed to make it |
37 | easy to run an HTTP server as part of another application. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | GNU libmicrohttpd jest małą biblioteką C, w założeniu umożliwiającą | |
e0264d10 | 41 | uruchomienie serwera HTTP jako części innej aplikacji. |
35f10266 AF |
42 | |
43 | %package devel | |
44 | Summary: Header files to develop libmicrohttpd applications | |
5deb6f41 | 45 | Summary(pl.UTF-8): Pliki nagłówkowe do rozwijania aplikacji używających libmicrohttpd |
35f10266 AF |
46 | Group: Development/Libraries |
47 | Requires: %{name} = %{version}-%{release} | |
458781c7 | 48 | Requires: gnutls-devel >= 2.8.6 |
31c2f099 | 49 | Requires: libgcrypt-devel >= 1.2.4 |
e72faf06 | 50 | Requires: openssl-devel |
35f10266 AF |
51 | |
52 | %description devel | |
53 | Header files to develop libmicrohttpd applications. | |
54 | ||
7947fc2e | 55 | %description devel -l pl.UTF-8 |
5deb6f41 | 56 | Pliki nagłówkowe do rozwijania aplikacji używających libmicrohttpd. |
7947fc2e | 57 | |
35f10266 AF |
58 | %package static |
59 | Summary: Static libmicrohttpd libraries | |
60 | Summary(pl.UTF-8): Biblioteka statyczna libmicrohttpd | |
61 | Group: Development/Libraries | |
62 | Requires: %{name}-devel = %{version}-%{release} | |
63 | ||
64 | %description static | |
65 | Static libmicrohttpd libraries. | |
66 | ||
67 | %description static -l pl.UTF-8 | |
68 | Biblioteka statyczna libmicrohttpd. | |
69 | ||
70 | %prep | |
71 | %setup -q | |
e0264d10 | 72 | %patch0 -p1 |
e72faf06 | 73 | %patch1 -p1 |
337f2221 | 74 | %patch2 -p1 |
35f10266 AF |
75 | |
76 | %build | |
77 | %{__libtoolize} | |
78 | %{__aclocal} -I m4 | |
79 | %{__autoconf} | |
80 | %{__autoheader} | |
81 | %{__automake} | |
82 | %configure \ | |
83 | %if %{with tests} | |
84 | --enable-curl \ | |
85 | --enable-client-side \ | |
86 | %endif | |
87 | --enable-https \ | |
7947fc2e | 88 | --disable-messages |
35f10266 AF |
89 | |
90 | %{__make} | |
91 | %if %{with tests} | |
92 | %{__make} check | |
93 | %endif | |
94 | ||
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %{__make} install \ | |
99 | DESTDIR=$RPM_BUILD_ROOT | |
100 | ||
337f2221 JB |
101 | # obsoleted by pkg-config |
102 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmicro*.la | |
e72faf06 | 103 | |
35f10266 AF |
104 | %clean |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
107 | %post -p /sbin/ldconfig | |
108 | %postun -p /sbin/ldconfig | |
109 | ||
110 | %post devel -p /sbin/postshell | |
111 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
112 | ||
113 | %postun devel -p /sbin/postshell | |
114 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
115 | ||
116 | %files | |
117 | %defattr(644,root,root,755) | |
7947fc2e | 118 | %doc AUTHORS ChangeLog NEWS README |
e72faf06 | 119 | %attr(755,root,root) %{_bindir}/microspdy2http |
35f10266 | 120 | %attr(755,root,root) %{_libdir}/libmicrohttpd.so.*.*.* |
7947fc2e | 121 | %attr(755,root,root) %ghost %{_libdir}/libmicrohttpd.so.10 |
e72faf06 JB |
122 | %attr(755,root,root) %{_libdir}/libmicrospdy.so.*.*.* |
123 | %attr(755,root,root) %ghost %{_libdir}/libmicrospdy.so.0 | |
35f10266 AF |
124 | |
125 | %files devel | |
126 | %defattr(644,root,root,755) | |
127 | %attr(755,root,root) %{_libdir}/libmicrohttpd.so | |
e72faf06 | 128 | %attr(755,root,root) %{_libdir}/libmicrospdy.so |
35f10266 | 129 | %{_includedir}/microhttpd.h |
e72faf06 | 130 | %{_includedir}/microspdy.h |
458781c7 JB |
131 | %{_infodir}/libmicrohttpd.info* |
132 | %{_infodir}/libmicrohttpd-tutorial.info* | |
35f10266 AF |
133 | %{_mandir}/man3/libmicrohttpd.3* |
134 | %{_pkgconfigdir}/libmicrohttpd.pc | |
035db06f | 135 | %{_pkgconfigdir}/libmicrospdy.pc |
35f10266 AF |
136 | |
137 | %files static | |
138 | %defattr(644,root,root,755) | |
139 | %{_libdir}/libmicrohttpd.a | |
e72faf06 | 140 | %{_libdir}/libmicrospdy.a |