%define toolname netclient Summary: OCAML Netclient HTTP/1.1 library Name: ocaml-%{toolname} Version: 0.3 Release: 1 Copyright: GPL-like Group: Development/Languages Source: http://www.ocaml-programming.de/packages/%{toolname}-%{version}-OCaml3.tar.gz Vendor: Gerd Stolpmann Url: http://www.ocaml-programming.de/packages/documentation/%{toolname}/ Prereq: fileutils, ocaml >= 3.0 , ocaml-findlib, ocaml-netstring, ocaml-xstr Requires: fileutils, ocaml >= 3.0 , ocaml-netstring, ocaml-xstr %define dir_sitelib usr/lib/ocaml/site-lib %define files_doc LICENSE README BuildRoot: /tmp/root-%{name} %description HTTP 1.1-compliant client, implements enough of HTTP 1.1 to communicate with any HTTP 1.1 or 1.0 server. Simple to use, can process whole requests and whole replies, or customized requests with specific headers. Features persistent connections, chunked messages, authentication (basic and digest), automatic redirections, support for proxies %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 %clean if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi %files %defattr(-,root,root) %doc %{files_doc} /%{dir_sitelib}/%{toolname} %changelog * Wed Sep 6 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr> - created and tested package