+#
+# Conditional build:
+%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
+
+# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
+%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+%undefine with_ocaml_opt
+%endif
+
%define apxs /usr/sbin/apxs
+%define apache /usr/sbin/httpd
Summary: Modules for Internet programming in OCaml
Summary(pl.UTF-8): Moduły ułatwiające pisanie programów internetowych w OCamlu
Name: ocaml-net
-Version: 3.3.4
-Release: 1
+Version: 3.7.7
+Release: 2
License: GPL v2+ (nethttpd), LGPL v2+ (mod_caml), BSD-like (the rest)
Group: Libraries
Source0: http://download.camlcity.org/download/ocamlnet-%{version}.tar.gz
-# Source0-md5: 2fb725528725d6fb839ba4fdd5e8ac1c
+# Source0-md5: e15e0961d09057f0bbe4f69d6055506c
Patch0: %{name}-buildfix.patch
Patch1: %{name}-lablgtk2.patch
-Patch2: %{name}-zip.patch
-Patch3: %{name}-apache-link.patch
+Patch2: %{name}-apache-link.patch
URL: http://projects.camlcity.org/projects/ocamlnet.html
+BuildRequires: %{apache}
BuildRequires: %{apxs}
BuildRequires: apache-devel >= 2.0
BuildRequires: ncurses-devel
BuildRequires: ocaml >= 1:3.09.2
+BuildRequires: ocaml-camlp4
+BuildRequires: ocaml-cryptgps-devel
+BuildRequires: ocaml-cryptokit-devel
BuildRequires: ocaml-findlib
-BuildRequires: ocaml-pcre-devel
-BuildRequires: ocaml-lablgtk-devel
+BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-lablgtk2-devel >= 2.14.2
+BuildRequires: ocaml-labltk-devel
+BuildRequires: ocaml-pcre-devel
BuildRequires: ocaml-ssl-devel
BuildRequires: ocaml-zip-devel
-BuildRequires: ocaml-cryptgps-devel
-BuildRequires: ocaml-cryptokit-devel
-BuildRequires: ocaml-labltk-devel
BuildRequires: tcl-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Requires: %{name}-netplex-devel = %{version}-%{release}
Requires: %{name}-netstring-devel = %{version}-%{release}
Requires: %{name}-netsys-devel = %{version}-%{release}
-Obsoletes: %{name}-cgi-devel
+Obsoletes: ocaml-net-cgi-devel
%requires_eq ocaml
%description netcgi-devel
Ten pakiet zawiera pliki niezbędne do tworzenia programów używających
biblioteki equeue.
-%package equeue-gtk-devel
-Summary: GTK event queue library for OCaml
-Summary(pl.UTF-8): Biblioteka obsługująca kolejkę zdarzeń GTK dla OCamla
-License: BSD-like
-Group: Development/Libraries
-Requires: %{name}-equeue-devel = %{version}-%{release}
-Requires: ocaml-lablgtk-devel = %{version}-%{release}
-%requires_eq ocaml
-
-%description equeue-gtk-devel
-Equeue provides a generic event queue module, and a specific module
-for file descriptor events.
-
-This package contains files needed to develop OCaml programs using
-GTK equeue library.
-
-%description equeue-gtk-devel -l pl.UTF-8
-Equeue dostarcza ogólnego modułu obsługi kolejki zdarzeń jak również
-modułu obsługi zdarzeń na deskryptorach plików.
-
-Ten pakiet zawiera pliki niezbędne do tworzenia programów używających
-biblioteki equeue GTK.
-
%package equeue-gtk2-devel
Summary: GTK2 event queue library for OCaml
Summary(pl.UTF-8): Biblioteka obsługująca kolejkę zdarzeń GTK2 dla OCamla
License: BSD-like
Group: Development/Libraries
Requires: %{name}-equeue-devel = %{version}-%{release}
-Requires: ocaml-lablgtk2-devel = %{version}-%{release}
+Requires: ocaml-lablgtk2-devel
%requires_eq ocaml
%description equeue-gtk2-devel
%requires_eq ocaml
%description netcamlbox-devel
-Camlboxes are a fast IPC mechanism to send Ocaml values from one process
-to another. Source and destination processes must run on the same machine
-(no network). The Ocaml value is copied to a shared memory object where it
-can be directly accessed by the receiver without unmarshalling step. This
-means the sender writes the value into the shared memory in a format that
-can immediately interpreted by the receiver.
+Camlboxes are a fast IPC mechanism to send Ocaml values from one
+process to another. Source and destination processes must run on the
+same machine (no network). The Ocaml value is copied to a shared
+memory object where it can be directly accessed by the receiver
+without unmarshalling step. This means the sender writes the value
+into the shared memory in a format that can immediately interpreted by
+the receiver.
This package contains files needed to develop OCaml programs using
netcamlbox library.
%description netcamlbox-devel -l pl.UTF-8
-Camlboxy są szybkim mechanizmem IPC do przesyłania danych Ocamla pomiędzy procesami.
-Nadawca i odbiorca muszą być uruchomione na tej samej maszynie. Dane Ocamla
-są kopiowane do segmentu pamięci dzielonej, gdzie mogą byc bezpośrednio
-odczytywane przez odbiorcę.
+Camlboxy są szybkim mechanizmem IPC do przesyłania danych Ocamla
+pomiędzy procesami. Nadawca i odbiorca muszą być uruchomione na tej
+samej maszynie. Dane Ocamla są kopiowane do segmentu pamięci
+dzielonej, gdzie mogą byc bezpośrednio odczytywane przez odbiorcę.
Ten pakiet zawiera pliki niezbędne do tworzenia programów używających
biblioteki netcamlbox.
Summary(pl.UTF-8): Biblioteka do obsługi protokołu HTTP
License: GPL v2+
Group: Development/Libraries
-Requires: %{name}-netcgi-devel = %{version}-%{release}
Requires: %{name}-equeue-devel = %{version}-%{release}
+Requires: %{name}-netcgi-devel = %{version}-%{release}
Requires: %{name}-netplex-devel = %{version}-%{release}
%requires_eq ocaml-pcre-devel
%requires_eq ocaml
%requires_eq ocaml
%description netmech-scram-devel
-Netmech-scram library, part of Ocamlnet. This package contains the files
-needed to develop OCaml programs using netmech-scram library.
+Netmech-scram library, part of Ocamlnet. This package contains the
+files needed to develop OCaml programs using netmech-scram library.
%description netmech-scram-devel -l pl.UTF-8
-Biblioteka do obsługi wieloprocesorowych obliczeń, część pakietu Ocamlnet. Ten
-pakiet zawiera pliki niezbędne do tworzenia programów używających
-biblioteki netmech-scram.
+Biblioteka do obsługi wieloprocesorowych obliczeń, część pakietu
+Ocamlnet. Ten pakiet zawiera pliki niezbędne do tworzenia programów
+używających biblioteki netmech-scram.
%package netmulticore-devel
Summary: Multi-processing for compute jobs
needed to develop OCaml programs using netmulticore library.
%description netmulticore-devel -l pl.UTF-8
-Biblioteka do obsługi wieloprocesorowych obliczeń, część pakietu Ocamlnet. Ten
-pakiet zawiera pliki niezbędne do tworzenia programów używających
-biblioteki netmulticore.
+Biblioteka do obsługi wieloprocesorowych obliczeń, część pakietu
+Ocamlnet. Ten pakiet zawiera pliki niezbędne do tworzenia programów
+używających biblioteki netmulticore.
%package netplex
Summary: Server framework
Summary(pl.UTF-8): Szkielet serwerowy - cześć programistyczna
License: BSD-like
Group: Development/Libraries
-Requires: %{name}-netplex = %{version}-%{release}
Requires: %{name}-equeue-devel = %{version}-%{release}
+Requires: %{name}-netplex = %{version}-%{release}
Requires: %{name}-netstring-devel = %{version}-%{release}
-Requires: %{name}-rpc-devel = %{version}-%{release}
Requires: %{name}-netsys-devel = %{version}-%{release}
+Requires: %{name}-rpc-devel = %{version}-%{release}
%requires_eq ocaml
%description netplex-devel
Ten pakiet zawiera pliki niezbędne do tworzenia programów używających
biblioteki netshm.
+%package netstring
+Summary: String processing library
+Summary(pl.UTF-8): Biblioteka do przetwarzania napisów
+License: BSD-like
+Group: Libraries
+Requires: %{name}-netsys-devel = %{version}-%{release}
+%requires_eq ocaml-pcre-devel
+%requires_eq ocaml
+
+%description netstring
+String processing library, part of Ocamlnet.
+
+%description netstring -l pl.UTF-8
+Biblioteka do przetwarzania napisów, część pakietu Ocamlnet.
+
%package netstring-devel
Summary: String processing library
Summary(pl.UTF-8): Biblioteka do przetwarzania napisów
License: BSD-like
Group: Development/Libraries
+Requires: %{name}-netstring = %{version}-%{release}
Requires: %{name}-netsys-devel = %{version}-%{release}
%requires_eq ocaml-pcre-devel
%requires_eq ocaml
Summary(pl.UTF-8): Funkcje do kompresji kanałow - cześć programistyczna
License: BSD-like
Group: Development/Libraries
-Requires: %{name}-netstring = %{version}-%{release}
+Requires: %{name}-netstring-devel = %{version}-%{release}
%requires_eq ocaml
%description netzip-devel
Summary(pl.UTF-8): Funkcje powłoki uniksowej
License: BSD-like
Group: Development/Libraries
-Requires: %{name}-netsys-devel = %{version}-%{release}
Requires: %{name}-equeue-devel = %{version}-%{release}
+Requires: %{name}-netsys-devel = %{version}-%{release}
%requires_eq ocaml
%description shell-devel
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
%build
# no %%configure, please
./configure \
- -enable-gtk \
+ -disable-gtk \
-enable-gtk2 \
-enable-ssl \
-enable-zip \
-equeue-tcl-libs "-ltcl" \
-with-nethttpd \
-apxs %{apxs} \
- -apache /usr/sbin/httpd
+ -apache %{apache}
-%{__make} -j1 all opt
+%{__make} -j1 all %{?with_ocaml_opt:opt}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir}/ocaml,%{_apachepkglibdir},%{_apachesysconfdir}}
+install -d $RPM_BUILD_ROOT{%{_libdir}/ocaml/stublibs,%{_apachepkglibdir},%{_apachesysconfdir}}
%{__make} -j1 install \
OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
done
cd ..
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/netcgi_apache/500netcgi_apache.info
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/netcgi_apache/META
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/netcgi_apache/mod_netcgi_apache.so
-
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/netcgi2-apache/500netcgi_apache.info
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/mod_netcgi_apache.so*
+
install -p src/netcgi2-apache/mod_netcgi_apache.so $RPM_BUILD_ROOT%{_apachepkglibdir}/mod_netcgi.so
cat <<EOF >$RPM_BUILD_ROOT%{_apachesysconfdir}/90_mod_netcgi.conf
LoadModule netcgi_module modules/mod_netcgi.so
%{_libdir}/ocaml/site-lib/equeue
%{_examplesdir}/%{name}-equeue-%{version}
-%files equeue-gtk-devel
-%defattr(644,root,root,755)
-%dir %{_libdir}/ocaml/equeue-gtk1
-%{_libdir}/ocaml/equeue-gtk1/*.cm[ixao]*
-%{_libdir}/ocaml/equeue-gtk1/*.a
-%{_libdir}/ocaml/site-lib/equeue-gtk1
-
%files equeue-gtk2-devel
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/equeue-gtk2
%files equeue-ssl
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/equeue-ssl
-%attr(755,root,root) %{_libdir}/ocaml/equeue-ssl/*.so
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllequeue_ssl.so
+%{_libdir}/ocaml/stublibs/dllequeue_ssl.so.owner
%files equeue-ssl-devel
%defattr(644,root,root,755)
%files equeue-tcl
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/equeue-tcl
-%attr(755,root,root) %{_libdir}/ocaml/equeue-tcl/*.so
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllequeue_tcl.so
+%{_libdir}/ocaml/stublibs/dllequeue_tcl.so.owner
%files equeue-tcl-devel
%defattr(644,root,root,755)
%files netplex
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/netplex-admin
+%dir %{_libdir}/ocaml/netplex
+%{_libdir}/ocaml/netplex/*.o
%files netplex-devel
%defattr(644,root,root,755)
-%dir %{_libdir}/ocaml/netplex
%{_libdir}/ocaml/netplex/netplex-packlist
%{_libdir}/ocaml/netplex/*.cm[ixao]*
%{_libdir}/ocaml/netplex/*.a
-%{_libdir}/ocaml/netplex/*.o
%{_libdir}/ocaml/site-lib/netplex
%files netshm-devel
%{_libdir}/ocaml/netshm/*.a
%{_libdir}/ocaml/site-lib/netshm
-%files netstring-devel
+%files netstring
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/netstring
+%{_libdir}/ocaml/netstring/*.o
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllnetaccel_c.so
+%{_libdir}/ocaml/stublibs/dllnetaccel_c.so.owner
+
+%files netstring-devel
+%defattr(644,root,root,755)
%{_libdir}/ocaml/netstring/netdb-packlist
%{_libdir}/ocaml/netstring/*.cm[ixao]*
%{_libdir}/ocaml/netstring/*.a
-%{_libdir}/ocaml/netstring/*.o
-%attr(755,root,root) %{_libdir}/ocaml/netstring/*.so
%{_libdir}/ocaml/site-lib/netstring
%files netsys
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/netsys
-%attr(755,root,root) %{_libdir}/ocaml/netsys/*.so
%{_libdir}/ocaml/netsys/*.o
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllnetsys.so
+%{_libdir}/ocaml/stublibs/dllnetsys.so.owner
%files netsys-devel
%defattr(644,root,root,755)
%{_libdir}/ocaml/netsys/*.cm[ixao]*
%{_libdir}/ocaml/netsys/*.a
+%{_libdir}/ocaml/netsys/netsys_c_event.h
%{_libdir}/ocaml/site-lib/netsys
%files netzip-devel
%defattr(644,root,root,755)
+%dir %{_libdir}/ocaml/netzip
%{_libdir}/ocaml/netzip/*.cm[ixao]*
%{_libdir}/ocaml/netzip/*.a
%{_libdir}/ocaml/site-lib/netzip
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ocamlrpcgen
%dir %{_libdir}/ocaml/rpc-auth-local
-%dir %{_libdir}/ocaml/rpc-generator
-%attr(755,root,root) %{_libdir}/ocaml/rpc-auth-local/dllrpc_auth_local.so
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllrpc_auth_local.so
+%{_libdir}/ocaml/stublibs/dllrpc_auth_local.so.owner
%files rpc-devel
%defattr(644,root,root,755)
%dir %{_libdir}/ocaml/rpc
+%dir %{_libdir}/ocaml/rpc-auth-dh
+%dir %{_libdir}/ocaml/rpc-generator
%dir %{_libdir}/ocaml/rpc-ssl
%{_libdir}/ocaml/rpc-generator/rpcgen-packlist
%{_libdir}/ocaml/rpc*/*.cm[ixao]*