--- /dev/null
+*.cmo
+*.cmx
+*.cmi
+
+*.o
+*.a
+
--- /dev/null
+%define toolname findlib
+
+Summary: OCAML FindLib package manager
+Name: ocaml-%{toolname}
+Version: 0.4.0
+Release: 1
+Copyright: GPL-like
+Group: Development/Languages
+Source: http://www.ocaml-programming.de/packages/%{toolname}-%{version}.tar.gz
+Vendor: Gerd Stolpmann
+Url: http://www.ocaml-programming.de/packages/documentation/%{toolname}/
+Prereq: fileutils, ocaml
+Requires: fileutils, ocaml
+
+%define dir_man usr/man
+%define dir_bin usr/bin
+%define dir_sitelib usr/lib/ocaml/site-lib
+%define files_doc LICENSE README INSTALL
+
+BuildRoot: /tmp/root-%{name}
+
+%description
+Provides a scheme to manage reusable software components (packages),
+as collections of OCaml modules for which metainformation can be stored.
+The library contains functions to look the directory up that
+stores a package, to query metainformation about a package, and
+to retrieve dependency information about multiple packages.
+Metainformation includes a version string, the archives the package consists of, additional linker
+options, and dependencies dependent on other packages.
+
+%prep
+%setup -n %{toolname}
+./configure -mandir "/%{dir_man}" -bindir "/%{dir_bin}" -sitelib "/%{dir_sitelib}"
+
+%build
+make all
+make opt
+
+%install
+# Install binary, libs, manuals
+DIR_BIN="${RPM_BUILD_ROOT}/%{dir_bin}"
+DIR_MAN="${RPM_BUILD_ROOT}/%{dir_man}"
+DIR_SITELIB="${RPM_BUILD_ROOT}/%{dir_sitelib}"
+install -m 755 -d "${DIR_BIN}"
+install -m 755 -d "${DIR_MAN}"
+install -m 755 -d "${DIR_SITELIB}"
+make install "OCAML_SITELIB=${DIR_SITELIB}" "OCAMLFIND_BIN=${DIR_BIN}" "OCAMLFIND_MAN=${DIR_MAN}"
+# Move doc files to root, if needed
+for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done
+
+# HTML manual
+if test -d doc/html ; then mv doc/html htmlman; else mkdir htmlman ; fi
+
+%post
+# Create a symbolic link to version-specific HTML manual
+cd /usr/doc/HTML/
+if test -L "%{name}" ; then rm -f "%{name}" ; fi
+if test ! -e "%{name}" ; then ln -s "../%{name}-%{version}/htmlman" "%{name}" ; fi
+
+%postun
+cd /usr/doc/HTML/
+if test "$1" = "0" -a -L %{name} ; then rm -f %{name} ; fi
+
+
+%clean
+if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi
+
+%files
+%defattr(-,root,root)
+%doc %{files_doc} htmlman
+/%{dir_bin}
+/%{dir_man}/man1
+/%{dir_man}/man3
+/%{dir_man}/man5
+/%{dir_sitelib}
+
+
+%changelog
+* Fri Sep 1 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
+- created and tested package, with html manual
--- /dev/null
+%define toolname netstring
+
+Summary: OCAML Netstring library
+Name: ocaml-%{toolname}
+Version: 0.9.3
+Release: 2
+Copyright: GPL-like
+Group: Development/Languages
+Source: http://www.ocaml-programming.de/packages/%{toolname}-%{version}.tar.gz
+Vendor: Gerd Stolpmann
+Url: http://www.ocaml-programming.de/packages/documentation/%{toolname}/
+Prereq: fileutils, ocaml, ocaml-findlib
+Requires: fileutils, ocaml
+
+%define dir_sitelib usr/lib/ocaml/site-lib
+%define files_doc LICENSE README INSTALL
+BuildRoot: /tmp/root-%{name}
+
+%description
+A collection of string processing functions for Internet protocols
+- Parse MIME messages
+- Encode/decode Base 64, Quoted Printable, Q, URL-encoding
+- CGI interface that allows users to upload files
+- Simple HTML parser
+- URL parsing, printing and processing
+
+%prep
+%setup -n %{toolname}
+make clean
+
+%build
+make all
+make opt
+
+%install
+# Install binary, libs, manuals
+
+DIR_INSTALL="${RPM_BUILD_ROOT}/%{dir_sitelib}/%{toolname}"
+install -m 755 -d "${DIR_INSTALL}"
+# Install in non-standard directory
+# replace "$(OCAMLFIND) install" or "ocamlfind install"
+cat Makefile | sed "s#[_A-Za-z\(\)\$]* install \$(NAME) #\$(TRICK) #" > Makefile.trick
+# Ugly trick: replace "findlib" by "cp"
+make -f Makefile.trick install "TRICK=cp -f --target-directory=${DIR_INSTALL}"
+# Reference to obsolete CGI and BASE64 packages
+for CMD in cgi base64 ; do
+ cat Makefile | sed "s#[_A-Za-z\(\)\$]* install $CMD #\$(TRICK) #" > Makefile.trick
+ DIR="${RPM_BUILD_ROOT}/%{dir_sitelib}/${CMD}"
+ install -m 755 -d "${DIR}"
+ make -f Makefile.trick "install-${CMD}" "TRICK=cp -f --target-directory=${DIR}"
+done
+
+# Move doc files to root, if needed
+for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done
+
+%clean
+#if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi
+
+%files
+%defattr(-,root,root)
+%doc %{files_doc}
+/%{dir_sitelib}/%{toolname}
+# Reference to obsolete CGI and BASE64 packages
+/%{dir_sitelib}/cgi
+/%{dir_sitelib}/base64
+
+%changelog
+* Wed Sep 6 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
+- attempt to install cgi and base64 modules, for obsolete Makefiles
+
+* Fri Sep 1 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
+- created and tested package
+
--- /dev/null
+%define toolname pxp
+
+Summary: OCAML PXP XML library
+Name: ocaml-%{toolname}
+Version: 1.0
+Release: 1
+Copyright: GPL-like
+Group: Development/Languages
+Source: http://www.ocaml-programming.de/packages/%{toolname}-%{version}.tar.gz
+Vendor: Gerd Stolpmann
+Url: http://www.ocaml-programming.de/packages/documentation/%{toolname}/
+Prereq: fileutils, ocaml, ocaml-findlib, ocaml-netstring
+Requires: fileutils, ocaml, ocaml-netstring
+
+%define dir_sitelib usr/lib/ocaml/site-lib
+%define files_doc LICENSE README INSTALL SPEC EXTENSIONS
+
+BuildRoot: /tmp/root-%{name}
+
+%description
+PXP is a validating parser for XML-1.0 written entirely in Objective Caml.
+PXP stands for Polymorphic XML parser, emphasizes its most useful property:
+the API is polymorphic and can be configured such that different objects are
+used to store different types of elements.
+PXP was formerly known as "Markup".
+
+%prep
+%setup -n %{toolname}
+make clean
+
+%build
+make all
+make opt
+
+%install
+# Install binary, libs, manuals
+
+DIR_INSTALL="${RPM_BUILD_ROOT}/%{dir_sitelib}/%{toolname}"
+install -m 755 -d "${DIR_INSTALL}"
+# Install in non-standard directory
+# replace "$(OCAMLFIND) install" or "ocamlfind install"
+cat Makefile | sed "s#[_A-Za-z\(\)\$]* install \$(NAME)#\$(TRICK)#" > Makefile.trick
+# Ugly trick: replace "findlib" by "cp"
+make -f Makefile.trick install "TRICK=cp -f --target-directory=${DIR_INSTALL}"
+
+# Move doc files to root, if needed
+for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done
+
+# HTML manual
+if test -d doc/manual/html ; then mv doc/manual/html htmlman; else mkdir htmlman ; fi
+
+
+# Create a symbolic link to version-specific HTML manual
+%post
+cd /usr/doc/HTML/
+if test -L "%{name}" ; then rm -f "%{name}" ; fi
+if test ! -e "%{name}" ; then ln -s "../%{name}-%{version}/htmlman" "%{name}" ; fi
+
+%postun
+cd /usr/doc/HTML/
+if test "$1" = "0" -a -L %{name} ; then rm -f %{name} ; fi
+
+%clean
+if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi
+
+%files
+%defattr(-,root,root)
+%doc %{files_doc} htmlman examples
+/%{dir_sitelib}/%{toolname}
+
+%changelog
+* Fri Sep 1 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
+- created and tested package