]> git.pld-linux.org Git - packages/mongoose.git/blob - mongoose.spec
d58d5545d11dd48607664d7d1096e635dcfd1371
[packages/mongoose.git] / mongoose.spec
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
7 Source0:        http://mongoose.googlecode.com/files/%{name}-%{version}.tgz
8 # Source0-md5:  e718fc287b4eb1bd523be3fa00942bb0
9 Source1:        %{name}.conf
10 URL:            http://code.google.com/p/mongoose
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
41 Requires:       %{name}-libs = %{version}-%{release}
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
66 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_includedir}}
67 install -p %{name} $RPM_BUILD_ROOT%{_bindir}
68 cp -p %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1
69
70 # -lib subpackage
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%.?}
74
75 # -devel subpackage
76 cp -p %{name}.h $RPM_BUILD_ROOT%{_includedir}
77 ln -s lib%{name}.so.$VERSION $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %post   libs -p /sbin/ldconfig
83 %postun libs -p /sbin/ldconfig
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
This page took 0.043353 seconds and 2 git commands to generate.