]> git.pld-linux.org Git - packages/mongoose.git/blame - mongoose.spec
missing mkdir
[packages/mongoose.git] / mongoose.spec
CommitLineData
c698e9bd
AM
1Summary: An easy-to-use self-sufficient web server
2Name: mongoose
3Version: 3.1
4Release: 1
5License: MIT
6Group: Applications/System
c698e9bd
AM
7Source0: http://mongoose.googlecode.com/files/%{name}-%{version}.tgz
8# Source0-md5: e718fc287b4eb1bd523be3fa00942bb0
9Source1: %{name}.conf
d6d24f3f 10URL: http://code.google.com/p/mongoose
c698e9bd
AM
11BuildRequires: openssl-devel
12# Build changes:
13# http://code.google.com/p/mongoose/issues/detail?id=372
14Patch0: %{name}-fix-libmongoose-so-build.patch
15# http://code.google.com/p/mongoose/issues/detail?id=371
16Patch1: %{name}-fix-no-ssl-dl-build-error.patch
17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19%description
20Mongoose web server executable is self-sufficient, it does not depend
21on anything to start serving requests. If it is copied to any
22directory and executed, it starts to serve that directory on port 8080
23(so to access files, go to http://localhost:8080). If some additional
24configuration is required - for example, different listening port or
25IP-based access control, then a 'mongoose.conf' file with respective
26options can be created in the same directory where executable lives.
27This makes Mongoose perfect for all sorts of demos, quick tests, file
28sharing, and Web programming.
29
30%package libs
31Summary: Shared Object for applications that use %{name} embedded
32Group: Development/Libraries
33
34%description libs
35This package contains the shared library required by applications that
36are using %{name}'s embeddable API to provide web services.
37
38%package devel
39Summary: Header files and development libraries for %{name}
40Group: Development/Libraries
124fe22b 41Requires: %{name}-libs = %{version}-%{release}
c698e9bd
AM
42
43%description devel
44This package contains the header files and development libraries for
45%{name}. If you like to develop programs embedding %{name} on them,
46you will need to install %{name}-devel and check %{name}'s API at its
47comprisable header file.
48
49%prep
50%setup -q -n %{name}
51%patch0 -p1 -b .solib-build
52%patch1 -p1 -b .nossldl-build
53install -p -m 0644 %{SOURCE1} .
54
55%build
56export 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
65rm -rf $RPM_BUILD_ROOT
4244211d 66install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir},%{_includedir}}
d6d24f3f
ER
67install -p %{name} $RPM_BUILD_ROOT%{_bindir}
68cp -p %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1
c698e9bd
AM
69
70# -lib subpackage
d6d24f3f
ER
71VERSION=%{version}
72install -p lib%{name}.so.%{version} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.$VERSION
73ln -s lib%{name}.so.$VERSION $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.${VERSION%.?}
c698e9bd
AM
74
75# -devel subpackage
d6d24f3f
ER
76cp -p %{name}.h $RPM_BUILD_ROOT%{_includedir}
77ln -s lib%{name}.so.$VERSION $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
c698e9bd
AM
78
79%clean
80rm -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
This page took 0.085371 seconds and 4 git commands to generate.