2 # - nethttpd needs to be packaged
4 Summary: Modules for Internet programming in OCaml
5 Summary(pl): Modu³y u³atwiaj±ce pisanie programów internetowych w OCamlu
11 Source0: http://dl.sourceforge.net/ocamlnet/ocamlnet-%{version}.tar.gz
12 # Source0-md5: 2ec265aeea6a6470e7493ab047cef261
13 Patch0: ocaml-net-Makefile.patch
14 URL: http://ocamlnet.sourceforge.net/
15 BuildRequires: ncurses-devel
16 BuildRequires: ocaml >= 3.04-7
17 BuildRequires: ocaml-equeue-devel >= 2.1.4
18 BuildRequires: ocaml-findlib
19 BuildRequires: ocaml-pcre-devel
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Modules for Internet programming in OCaml.
26 Modu³y u³atwiaj±ce pisanie programów internetowych w OCamlu.
28 %package netstring-devel
29 Summary: String processing library
30 Summary(pl): Biblioteka do przetwarzania napisów
31 Group: Development/Libraries
32 %requires_eq ocaml-pcre-devel
35 %description netstring-devel
36 String processing library, part of Ocamlnet. This package contains
37 files needed to develop OCaml programs using this library.
39 %description netstring-devel -l pl
40 Biblioteka do przetwarzania napisów, czê¶æ pakietu Ocamlnet. Pakiet
41 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
44 #%package nethttpd-devel
47 Summary: Common Gateway Interface library
48 Summary(pl): Biblioteka do tworzenia skryptów CGI
49 Group: Development/Libraries
50 Requires: %{name}-netstring-devel = %{version}-%{release}
53 %description cgi-devel
54 Common Gateway Interface library, part of Ocamlnet. This package
55 contains files needed to develop OCaml programs using this library.
57 %description cgi-devel -l pl
58 Biblioteka do tworzenia skryptów CGI, czê¶æ pakietu Ocamlnet. Pakiet
59 ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej
63 Summary: Post Office Protocol (POP3) library
64 Summary(pl): Biblioteka do obs³ugi POP3
65 Group: Development/Libraries
66 Requires: %{name}-netstring-devel = %{version}-%{release}
69 %description pop3-devel
70 Post Office Protocol (POP3) library, part of Ocamlnet. This package
71 contains files needed to develop OCaml programs using this library.
73 %description pop3-devel -l pl
74 Biblioteka do obs³ugi POP3, czê¶æ pakietu Ocamlnet. Pakiet ten zawiera
75 pliki niezbêdne do tworzenia programów u¿ywaj±cych tej biblioteki.
78 Summary: Simple Mail Transfer Protocol (SMTP) library
79 Summary(pl): Biblioteka do obs³ugi SMTP
80 Group: Development/Libraries
81 Requires: %{name}-netstring-devel = %{version}-%{release}
84 %description smtp-devel
85 Interface for the Simple Mail Tranfer Protocol (SMTP) as specified by RFC 2821.
87 %description smtp-devel -l pl
88 Interfejs dla protoko³u SMTP wyszczególniony w RFC 2821.
91 %setup -q -n ocamlnet-%{version}
96 # no %%configure, please
103 sed -e 's/-g//' Makefile.rules > Makefile.rules.tmp
104 mv -f Makefile.rules.tmp Makefile.rules
108 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml
113 %{__make} -j1 install OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
115 for f in cgi pop netstring ; do
116 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f
117 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/$f/META \
118 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/
119 echo "directory = \"+$f\"" \
120 >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/$f/META
124 rm $RPM_BUILD_ROOT%{_libdir}/ocaml/*/*.mli
126 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-{pop3,cgi}-%{version}
127 cp -r examples/{cgi,jserv} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-cgi-%{version}
128 cp -r examples/pop/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-pop3-%{version}
131 rm -rf $RPM_BUILD_ROOT
133 #%files nethttpd-devel
134 #%defattr(644,root,root,755)
135 #%doc LICENSE README doc/html
136 #%dir %{_libdir}/ocaml/nethttpd
137 #%{_libdir}/ocaml/nethttpd/*.cm[ixao]*
138 #%{_libdir}/ocaml/nethttpd/*.a
139 #%{_libdir}/ocaml/nethttpd/*.o
141 %files netstring-devel
142 %defattr(644,root,root,755)
143 %doc LICENSE README doc/html
144 %dir %{_libdir}/ocaml/netstring
145 %{_libdir}/ocaml/netstring/*.cm[ixao]*
146 %{_libdir}/ocaml/netstring/*.a
147 %{_libdir}/ocaml/netstring/*.o
148 %{_libdir}/ocaml/site-lib/netstring
151 %defattr(644,root,root,755)
152 %dir %{_libdir}/ocaml/cgi
153 %{_libdir}/ocaml/cgi/*.cm[ixao]*
154 %{_libdir}/ocaml/cgi/*.a
155 %{_libdir}/ocaml/site-lib/cgi
156 %{_examplesdir}/%{name}-cgi-%{version}
159 %defattr(644,root,root,755)
160 %dir %{_libdir}/ocaml/pop
161 %{_libdir}/ocaml/pop/*.cm[ixao]*
162 %{_libdir}/ocaml/pop/*.a
163 %{_libdir}/ocaml/site-lib/pop
164 %{_examplesdir}/%{name}-pop3-%{version}
167 %defattr(644,root,root,755)
168 %dir %{_libdir}/ocaml/smtp
169 %{_libdir}/ocaml/smtp/*.cm[ixao]*
170 %{_libdir}/ocaml/smtp/*.a