]>
Commit | Line | Data |
---|---|---|
c698e9bd AM |
1 | Summary: An easy-to-use self-sufficient web server |
2 | Name: mongoose | |
3 | Version: 3.1 | |
4 | Release: 1 | |
5 | License: MIT | |
6 | Group: Applications/System | |
c698e9bd AM |
7 | Source0: http://mongoose.googlecode.com/files/%{name}-%{version}.tgz |
8 | # Source0-md5: e718fc287b4eb1bd523be3fa00942bb0 | |
9 | Source1: %{name}.conf | |
d6d24f3f | 10 | URL: http://code.google.com/p/mongoose |
c698e9bd AM |
11 | BuildRequires: openssl-devel |
12 | # Build changes: | |
13 | # http://code.google.com/p/mongoose/issues/detail?id=372 | |
14 | Patch0: %{name}-fix-libmongoose-so-build.patch | |
15 | # http://code.google.com/p/mongoose/issues/detail?id=371 | |
16 | Patch1: %{name}-fix-no-ssl-dl-build-error.patch | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
20 | Mongoose web server executable is self-sufficient, it does not depend | |
21 | on anything to start serving requests. If it is copied to any | |
22 | directory and executed, it starts to serve that directory on port 8080 | |
23 | (so to access files, go to http://localhost:8080). If some additional | |
24 | configuration is required - for example, different listening port or | |
25 | IP-based access control, then a 'mongoose.conf' file with respective | |
26 | options can be created in the same directory where executable lives. | |
27 | This makes Mongoose perfect for all sorts of demos, quick tests, file | |
28 | sharing, and Web programming. | |
29 | ||
30 | %package libs | |
31 | Summary: Shared Object for applications that use %{name} embedded | |
32 | Group: Development/Libraries | |
33 | ||
34 | %description libs | |
35 | This package contains the shared library required by applications that | |
36 | are using %{name}'s embeddable API to provide web services. | |
37 | ||
38 | %package devel | |
39 | Summary: Header files and development libraries for %{name} | |
40 | Group: Development/Libraries | |
124fe22b | 41 | Requires: %{name}-libs = %{version}-%{release} |
c698e9bd AM |
42 | |
43 | %description devel | |
44 | This package contains the header files and development libraries for | |
45 | %{name}. If you like to develop programs embedding %{name} on them, | |
46 | you will need to install %{name}-devel and check %{name}'s API at its | |
47 | comprisable header file. | |
48 | ||
49 | %prep | |
50 | %setup -q -n %{name} | |
51 | %patch0 -p1 -b .solib-build | |
52 | %patch1 -p1 -b .nossldl-build | |
53 | install -p -m 0644 %{SOURCE1} . | |
54 | ||
55 | %build | |
56 | export VERSION=%{version} | |
57 | %{__make} \ | |
58 | CC="%{__cc}" \ | |
59 | VER="$VERSION" \ | |
60 | SOVER="${VERSION%.?}" \ | |
61 | CFLAGS="%{rpmcflags} -lssl -lcrypto -DNO_SSL_DL" \ | |
62 | linux | |
63 | ||
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
4244211d | 66 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir},%{_includedir}} |
d6d24f3f ER |
67 | install -p %{name} $RPM_BUILD_ROOT%{_bindir} |
68 | cp -p %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
c698e9bd AM |
69 | |
70 | # -lib subpackage | |
d6d24f3f ER |
71 | VERSION=%{version} |
72 | install -p lib%{name}.so.%{version} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.$VERSION | |
73 | ln -s lib%{name}.so.$VERSION $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.${VERSION%.?} | |
c698e9bd AM |
74 | |
75 | # -devel subpackage | |
d6d24f3f ER |
76 | cp -p %{name}.h $RPM_BUILD_ROOT%{_includedir} |
77 | ln -s lib%{name}.so.$VERSION $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so | |
c698e9bd AM |
78 | |
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
d6d24f3f ER |
82 | %post libs -p /sbin/ldconfig |
83 | %postun libs -p /sbin/ldconfig | |
c698e9bd AM |
84 | |
85 | %files | |
86 | %defattr(644,root,root,755) | |
87 | %doc %{name}.conf LICENSE | |
88 | %attr(755,root,root) %{_bindir}/%{name} | |
89 | %{_mandir}/man1/%{name}.1* | |
90 | ||
91 | %files libs | |
92 | %defattr(644,root,root,755) | |
93 | %attr(755,root,root) %{_libdir}/lib%{name}.so.*.* | |
94 | %attr(755,root,root) %ghost %{_libdir}/lib%{name}.so.3 | |
95 | ||
96 | %files devel | |
97 | %defattr(644,root,root,755) | |
98 | %{_includedir}/%{name}.h | |
99 | %{_libdir}/lib%{name}.so |