X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fpxp%2Focaml-netstring.spec;fp=helm%2FDEVEL%2Fpxp%2Focaml-netstring.spec;h=073539989fd1b71a6fcb1b7cf543a30b059b48f1;hb=758057e85325f94cd88583feb1fdf6b038e35055;hp=0000000000000000000000000000000000000000;hpb=ef35bce6975cc94557ecdce77a2d7fb4dd8adb4c;p=helm.git diff --git a/helm/DEVEL/pxp/ocaml-netstring.spec b/helm/DEVEL/pxp/ocaml-netstring.spec new file mode 100644 index 000000000..073539989 --- /dev/null +++ b/helm/DEVEL/pxp/ocaml-netstring.spec @@ -0,0 +1,73 @@ +%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 +- attempt to install cgi and base64 modules, for obsolete Makefiles + +* Fri Sep 1 2000 Olivier Montanuy +- created and tested package +