2 # - nethttpd needs to be packaged
4 %define ocaml_ver 1:3.09.1
5 Summary: Modules for Internet programming in OCaml
6 Summary(pl): Modu³y u³atwiaj±ce pisanie programów internetowych w OCamlu
12 Source0: http://dl.sourceforge.net/ocamlnet/ocamlnet-%{version}.tar.gz
13 # Source0-md5: 4347d04ae16e69b61940f8679eeeef07
14 Patch0: %{name}-Makefile.patch
15 URL: http://ocamlnet.sourceforge.net/
16 BuildRequires: ncurses-devel
17 BuildRequires: ocaml >= %{ocaml_ver}
18 BuildRequires: ocaml-equeue-devel >= 2.1.4
19 BuildRequires: ocaml-findlib
20 BuildRequires: ocaml-pcre-devel
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Modules for Internet programming in OCaml.
27 Modu³y u³atwiaj±ce pisanie programów internetowych w OCamlu.
30 Summary: ocaml-net documentation
31 Summary(pl): Dokumentacja dla pakietów ocaml-net
32 Group: Development/Libraries
35 ocaml-net documentation.
37 %description doc -l pl
38 Dokumentacja dla pakietów ocaml-net.
40 %package netstring-devel
41 Summary: String processing library
42 Summary(pl): Biblioteka do przetwarzania napisów
43 Group: Development/Libraries
44 %requires_eq ocaml-pcre-devel
47 %description netstring-devel
48 String processing library, part of Ocamlnet. This package contains
49 files needed to develop OCaml programs using this library.
51 %description netstring-devel -l pl
52 Biblioteka do przetwarzania napisów, czê¶æ pakietu Ocamlnet. Pakiet
53 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
56 %package nethttpd-devel
57 Summary: HTTPd library
58 Summary(pl): Biblioteka do obs³ugi protoko³u HTTP
59 Group: Development/Libraries
60 %requires_eq ocaml-pcre-devel
63 %description nethttpd-devel
64 HTTPd library, part of Ocamlnet. This package contains the files
65 needed to develop OCaml programs using this library.
67 %description nethttpd-devel -l pl
68 Biblioteka do obs³ugi protoko³u HTTP, czê¶æ pakietu Ocamlnet. Pakiet
69 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
73 Summary: Common Gateway Interface library
74 Summary(pl): Biblioteka do tworzenia skryptów CGI
75 Group: Development/Libraries
76 Requires: %{name}-netstring-devel = %{version}-%{release}
79 %description cgi-devel
80 Common Gateway Interface library, part of Ocamlnet. This package
81 contains files needed to develop OCaml programs using this library.
83 %description cgi-devel -l pl
84 Biblioteka do tworzenia skryptów CGI, czê¶æ pakietu Ocamlnet. Pakiet
85 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
89 Summary: Post Office Protocol (POP3) library
90 Summary(pl): Biblioteka do obs³ugi POP3
91 Group: Development/Libraries
92 Requires: %{name}-netstring-devel = %{version}-%{release}
95 %description pop3-devel
96 Post Office Protocol (POP3) library, part of Ocamlnet. This package
97 contains files needed to develop OCaml programs using this library.
99 %description pop3-devel -l pl
100 Biblioteka do obs³ugi POP3, czê¶æ pakietu Ocamlnet. Pakiet ten zawiera
101 pliki niezbêdne do tworzenia programów u¿ywaj±cych tej biblioteki.
104 Summary: Simple Mail Transfer Protocol (SMTP) library
105 Summary(pl): Biblioteka do obs³ugi SMTP
106 Group: Development/Libraries
107 Requires: %{name}-netstring-devel = %{version}-%{release}
110 %description smtp-devel
111 Interface for the Simple Mail Tranfer Protocol (SMTP) as specified by
114 %description smtp-devel -l pl
115 Interfejs dla protoko³u SMTP wyszczególniony w RFC 2821.
118 %setup -q -n ocamlnet-%{version}
123 # no %%configure, please
133 sed -e 's/-g//' Makefile.rules > Makefile.rules.tmp
134 mv -f Makefile.rules.tmp Makefile.rules
138 rm -rf $RPM_BUILD_ROOT
140 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml
143 %{__make} -j1 install \
144 OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
145 DESTDIR=$RPM_BUILD_ROOT
147 for f in smtp cgi pop netstring nethttpd; do
148 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f
149 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/$f/META \
150 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/
151 echo "directory = \"+$f\"" \
152 >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/META
156 rm $RPM_BUILD_ROOT%{_libdir}/ocaml/*/*.mli
158 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-{pop3,cgi,nethttpd}-%{version}
159 cp -r examples/{*cgi,jserv} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-cgi-%{version}
160 cp -r examples/pop/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-pop3-%{version}
161 cp -r examples/nethttpd/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-nethttpd-%{version}
164 rm -rf $RPM_BUILD_ROOT
167 %defattr(644,root,root,755)
168 %doc LICENSE README doc/html
170 %files nethttpd-devel
171 %defattr(644,root,root,755)
172 %dir %{_libdir}/ocaml/nethttpd
173 %{_libdir}/ocaml/nethttpd/*.cm[ixao]*
174 %{_libdir}/ocaml/nethttpd/*.a
175 %{_libdir}/ocaml/site-lib/nethttpd
176 %{_examplesdir}/%{name}-nethttpd-%{version}
178 %files netstring-devel
179 %defattr(644,root,root,755)
180 %dir %{_libdir}/ocaml/netstring
181 %{_libdir}/ocaml/netstring/*.cm[ixao]*
182 %{_libdir}/ocaml/netstring/*.a
183 %{_libdir}/ocaml/netstring/*.o
184 %attr(755,root,root) %{_libdir}/ocaml/netstring/*.so
185 %{_libdir}/ocaml/site-lib/netstring
188 %defattr(644,root,root,755)
189 %dir %{_libdir}/ocaml/cgi
190 %{_libdir}/ocaml/cgi/*.cm[ixao]*
191 %{_libdir}/ocaml/cgi/*.a
192 %{_libdir}/ocaml/site-lib/cgi
193 %{_examplesdir}/%{name}-cgi-%{version}
196 %defattr(644,root,root,755)
197 %dir %{_libdir}/ocaml/pop
198 %{_libdir}/ocaml/pop/*.cm[ixao]*
199 %{_libdir}/ocaml/pop/*.a
200 %{_libdir}/ocaml/site-lib/pop
201 %{_examplesdir}/%{name}-pop3-%{version}
204 %defattr(644,root,root,755)
205 %dir %{_libdir}/ocaml/smtp
206 %{_libdir}/ocaml/smtp/*.cm[ixao]*
207 %{_libdir}/ocaml/smtp/*.a
208 %{_libdir}/ocaml/site-lib/smtp