315 lines
9.3 KiB
RPMSpec
315 lines
9.3 KiB
RPMSpec
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
|
%define debug_package %{nil}
|
|
|
|
# Prevent RPM from stripping the binaries.
|
|
%define __strip /bin/true
|
|
|
|
Name: ocaml-ocamlnet
|
|
Version: 2.2.9
|
|
Release: 12%{?dist}
|
|
Summary: Network protocols for OCaml
|
|
|
|
Group: Development/Libraries
|
|
License: BSD
|
|
URL: http://projects.camlcity.org/projects/ocamlnet.html
|
|
Source0: http://download.camlcity.org/download/ocamlnet-%{version}.tar.gz
|
|
Patch0: ocamlnet-ocaml310.patch
|
|
Patch1: ocamlnet-ucred.patch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: ocaml >= 3.10.2
|
|
BuildRequires: ocaml-ocamldoc
|
|
BuildRequires: ocaml-camlp4-devel
|
|
BuildRequires: ocaml-findlib-devel
|
|
BuildRequires: ocaml-pcre-devel
|
|
BuildRequires: ocaml-ssl-devel
|
|
BuildRequires: ocaml-lablgtk-devel
|
|
BuildRequires: pcre-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: tcl-devel
|
|
|
|
%define _use_internal_dependency_generator 0
|
|
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -i Asttypes -i Outcometree -i Parsetree
|
|
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
|
|
|
|
%description
|
|
Ocamlnet is an ongoing effort to collect modules, classes and
|
|
functions that are useful to implement network protocols. Since
|
|
version 2.2, Ocamlnet incorporates the Equeue, RPC, and Netclient
|
|
libraries, so it now really a big player.
|
|
|
|
In detail, the following features are available:
|
|
|
|
* netstring is about processing strings that occur in network
|
|
context. Features: MIME encoding/decoding, Date/time parsing,
|
|
Character encoding conversion, HTML parsing and printing, URL
|
|
parsing and printing, OO-representation of channels, and a lot
|
|
more.
|
|
|
|
* netcgi1 and netcgi2 focus on portable web applications. netcgi1 is
|
|
the older, backward-compatible version, whereas netcgi2 bases on a
|
|
revised design, and is only partly backward-compatible. Supported
|
|
are CGI, FastCGI, AJP (mod_jk), and SCGI.
|
|
|
|
* rpc implements ONCRPC (alias SunRPC), the remote procedure call
|
|
technology behind NFS and other Unix services.
|
|
|
|
* netplex is a generic server framework. It can be used to build
|
|
stand-alone server programs from individual components like those
|
|
from netcgi2, nethttpd, and rpc.
|
|
|
|
* netclient implements clients for HTTP (version 1.1, of course), FTP
|
|
(currently partially), and Telnet.
|
|
|
|
* equeue is an event queue used for many protocol implementations. It
|
|
makes it possible to run several clients and/or servers in parallel
|
|
without having to use multi-threading or multi-processing.
|
|
|
|
* shell is about calling external commands like a Unix shell does.
|
|
|
|
* netshm provides shared memory for IPC purposes.
|
|
|
|
* netsys contains bindings for system functions missing in core O'Caml.
|
|
|
|
* smtp and pop are two further client implementations for the SMTP
|
|
and POP3 protocols.
|
|
|
|
%package devel
|
|
Summary: Development files for %{name}
|
|
Group: Development/Libraries
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
%description devel
|
|
The %{name}-devel package contains libraries and signature files for
|
|
developing applications that use %{name}.
|
|
|
|
|
|
%package nethttpd
|
|
Summary: Ocamlnet HTTP daemon
|
|
License: GPLv2+
|
|
Group: Development/Libraries
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
%description nethttpd
|
|
Nethttpd is a web server component (HTTP server implementation). It
|
|
can be used for web applications without using an extra web server, or
|
|
for serving web services.
|
|
|
|
|
|
%package nethttpd-devel
|
|
Summary: Development files for %{name}-nethttpd
|
|
License: GPLv2+
|
|
Group: Development/Libraries
|
|
Requires: %{name}-nethttpd = %{version}-%{release}
|
|
|
|
|
|
%description nethttpd-devel
|
|
The %{name}-nethttpd-devel package contains libraries and signature
|
|
files for developing applications that use %{name}-nethttpd.
|
|
|
|
|
|
%prep
|
|
%setup -q -n ocamlnet-%{version}
|
|
|
|
pushd src/equeue-gtk1
|
|
%patch0 -p2
|
|
popd
|
|
%patch1 -p1
|
|
|
|
./configure -enable-tcl -with-nethttpd \
|
|
-bindir %{_bindir} \
|
|
-datadir %{_datadir}/%{name} \
|
|
-prefer-netcgi2 \
|
|
-with-nethttpd \
|
|
-disable-apache \
|
|
-enable-ssl \
|
|
-enable-gtk2
|
|
# In future:
|
|
# -with-rpc-auth-dh (requires cryptgps)
|
|
|
|
|
|
%build
|
|
# Bletcherous hack to get that extra include path in camlp4 builds.
|
|
echo -e '#!/bin/sh\n%{_bindir}/camlp4 -I %{_libdir}/ocaml/camlp4/Camlp4Parsers "$@"' > camlp4; chmod 0755 camlp4; export PATH=`pwd`:$PATH
|
|
make all
|
|
%if %opt
|
|
make opt
|
|
%endif
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
export DESTDIR=$RPM_BUILD_ROOT
|
|
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
|
mkdir -p $OCAMLFIND_DESTDIR
|
|
mkdir -p $OCAMLFIND_DESTDIR/stublibs
|
|
make install
|
|
|
|
# cgi/META conflicts with mod_caml
|
|
rm $RPM_BUILD_ROOT%{_libdir}/ocaml/cgi/META
|
|
rmdir $RPM_BUILD_ROOT%{_libdir}/ocaml/cgi
|
|
|
|
# rpc-generator/dummy.mli is empty and according to Gerd Stolpmann can
|
|
# be deleted safely. This avoids an rpmlint warning.
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/rpc-generator/dummy.mli
|
|
|
|
# Strip libraries.
|
|
strip $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so
|
|
|
|
# NB. Do NOT strip the binaries and prevent prelink from stripping them too.
|
|
# (https://bugzilla.redhat.com/show_bug.cgi?id=435559)
|
|
mkdir -p $RPM_BUILD_ROOT/etc/prelink.conf.d
|
|
echo -e '-b /usr/bin/netplex-admin\n-b /usr/bin/ocamlrpcgen' \
|
|
> $RPM_BUILD_ROOT/etc/prelink.conf.d/ocaml-ocamlnet.conf
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc ChangeLog RELNOTES
|
|
%{_libdir}/ocaml/equeue
|
|
%{_libdir}/ocaml/equeue-gtk2
|
|
%{_libdir}/ocaml/equeue-ssl
|
|
%{_libdir}/ocaml/equeue-tcl
|
|
%{_libdir}/ocaml/netcgi1
|
|
%{_libdir}/ocaml/netcgi2
|
|
%{_libdir}/ocaml/netcgi2-plex
|
|
%{_libdir}/ocaml/netclient
|
|
%{_libdir}/ocaml/netplex
|
|
%{_libdir}/ocaml/netshm
|
|
%{_libdir}/ocaml/netstring
|
|
%{_libdir}/ocaml/netsys
|
|
%{_libdir}/ocaml/pop
|
|
%{_libdir}/ocaml/rpc
|
|
%{_libdir}/ocaml/rpc-auth-local
|
|
%{_libdir}/ocaml/rpc-generator
|
|
%{_libdir}/ocaml/rpc-ssl
|
|
%{_libdir}/ocaml/shell
|
|
%{_libdir}/ocaml/smtp
|
|
%if %opt
|
|
%exclude %{_libdir}/ocaml/*/*.a
|
|
%exclude %{_libdir}/ocaml/*/*.cmxa
|
|
%exclude %{_libdir}/ocaml/*/*.cmx
|
|
%exclude %{_libdir}/ocaml/*/*.o
|
|
%endif
|
|
%exclude %{_libdir}/ocaml/*/*.mli
|
|
%{_libdir}/ocaml/stublibs/*.so
|
|
%{_libdir}/ocaml/stublibs/*.so.owner
|
|
%{_datadir}/%{name}/
|
|
%{_bindir}/netplex-admin
|
|
%{_bindir}/ocamlrpcgen
|
|
%config(noreplace) /etc/prelink.conf.d/ocaml-ocamlnet.conf
|
|
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%doc ChangeLog RELNOTES
|
|
%if %opt
|
|
%{_libdir}/ocaml/*/*.a
|
|
%{_libdir}/ocaml/*/*.cmxa
|
|
%{_libdir}/ocaml/*/*.cmx
|
|
%{_libdir}/ocaml/*/*.o
|
|
%endif
|
|
%{_libdir}/ocaml/*/*.mli
|
|
|
|
|
|
%files nethttpd
|
|
%defattr(-,root,root,-)
|
|
%doc ChangeLog RELNOTES
|
|
%{_libdir}/ocaml/nethttpd-for-netcgi1
|
|
%{_libdir}/ocaml/nethttpd-for-netcgi2
|
|
%{_libdir}/ocaml/nethttpd
|
|
%if %opt
|
|
%exclude %{_libdir}/ocaml/*/*.a
|
|
%exclude %{_libdir}/ocaml/*/*.cmxa
|
|
%endif
|
|
%exclude %{_libdir}/ocaml/*/*.mli
|
|
|
|
|
|
%files nethttpd-devel
|
|
%defattr(-,root,root,-)
|
|
%doc ChangeLog RELNOTES
|
|
%if %opt
|
|
%{_libdir}/ocaml/*/*.a
|
|
%{_libdir}/ocaml/*/*.cmxa
|
|
%endif
|
|
%{_libdir}/ocaml/*/*.mli
|
|
|
|
|
|
%changelog
|
|
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.9-12
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
* Sat Feb 7 2009 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-11
|
|
- Rebuild against updated lablgtk.
|
|
|
|
* Wed Jan 21 2009 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-10
|
|
- Fix prelink configuration file.
|
|
|
|
* Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-9
|
|
- Rebuild for OCaml 3.11.0+rc1.
|
|
|
|
* Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-8
|
|
- Rebuild for OCaml 3.11.0
|
|
|
|
* Tue Sep 2 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-7
|
|
- Prevent RPM & prelink from stripping bytecode.
|
|
|
|
* Wed Apr 23 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-6
|
|
- Rebuild for OCaml 3.10.2
|
|
|
|
* Mon Apr 21 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-5
|
|
- New upstream URL.
|
|
|
|
* Mon Mar 3 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-4
|
|
- Do not strip binaries (bz 435559).
|
|
|
|
* Sat Mar 1 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-3
|
|
- Rebuild for ppc64.
|
|
|
|
* Tue Feb 12 2008 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-2
|
|
- Rebuild for OCaml 3.10.1.
|
|
|
|
* Wed Nov 7 2007 Richard W.M. Jones <rjones@redhat.com> - 2.2.9-1
|
|
- New upstream release 2.2.9.
|
|
- A more bletcherous, but more working, patch to fix the camlp4
|
|
missing path bug. Hopefully this is very temporary.
|
|
- Fixes for mock build under F8:
|
|
+ BR tcl-devel
|
|
|
|
* Thu Sep 13 2007 Richard W.M. Jones <rjones@redhat.com> - 2.2.8.1-1
|
|
- New upstream version 2.2.8.1.
|
|
- License of the base package is in fact BSD. Clarified also that
|
|
the license of nethttpd is GPLv2+.
|
|
- Removed the camlp4 paths patch as it doesn't seem to be necessary.
|
|
- Add BRs for camlp4, ocaml-pcre-devel, ocaml-lablgtk-devel,
|
|
openssl-devel
|
|
- Removed explicit requires, they're not needed.
|
|
- Strip binaries and libraries.
|
|
- Ignore Parsetree module in deps.
|
|
|
|
* Thu Aug 2 2007 Richard W.M. Jones <rjones@redhat.com> - 2.2.7-6
|
|
- ExcludeArch ppc64
|
|
- BR ocaml-pcre-devel
|
|
- Fix for camlp4 missing path
|
|
|
|
* Mon Jun 11 2007 Richard W.M. Jones <rjones@redhat.com> - 2.2.7-5
|
|
- Updated to latest packaging guidelines.
|
|
|
|
* Tue May 29 2007 Richard W.M. Jones <rjones@redhat.com> - 2.2.7-4
|
|
- Added support for ocaml-lablgtk2
|
|
|
|
* Tue May 29 2007 Richard W.M. Jones <rjones@redhat.com> - 2.2.7-3
|
|
- Remove empty file rpc-generator/dummy.mli.
|
|
|
|
* Sat May 26 2007 Richard W.M. Jones <rjones@redhat.com> - 2.2.7-2
|
|
- Added support for SSL.
|
|
|
|
* Sat May 26 2007 Richard W.M. Jones <rjones@redhat.com> - 2.2.7-1
|
|
- Initial RPM.
|