1 %define toolname netstring
3 Summary: OCAML Netstring library
4 Name: ocaml-%{toolname}
8 Group: Development/Languages
9 Source: http://www.ocaml-programming.de/packages/%{toolname}-%{version}.tar.gz
10 Vendor: Gerd Stolpmann
11 Url: http://www.ocaml-programming.de/packages/documentation/%{toolname}/
12 Prereq: fileutils, ocaml, ocaml-findlib
13 Requires: fileutils, ocaml
15 %define dir_sitelib usr/lib/ocaml/site-lib
16 %define files_doc LICENSE README INSTALL
17 BuildRoot: /tmp/root-%{name}
20 A collection of string processing functions for Internet protocols
22 - Encode/decode Base 64, Quoted Printable, Q, URL-encoding
23 - CGI interface that allows users to upload files
25 - URL parsing, printing and processing
36 # Install binary, libs, manuals
38 DIR_INSTALL="${RPM_BUILD_ROOT}/%{dir_sitelib}/%{toolname}"
39 install -m 755 -d "${DIR_INSTALL}"
40 # Install in non-standard directory
41 # replace "$(OCAMLFIND) install" or "ocamlfind install"
42 cat Makefile | sed "s#[_A-Za-z\(\)\$]* install \$(NAME) #\$(TRICK) #" > Makefile.trick
43 # Ugly trick: replace "findlib" by "cp"
44 make -f Makefile.trick install "TRICK=cp -f --target-directory=${DIR_INSTALL}"
45 # Reference to obsolete CGI and BASE64 packages
46 for CMD in cgi base64 ; do
47 cat Makefile | sed "s#[_A-Za-z\(\)\$]* install $CMD #\$(TRICK) #" > Makefile.trick
48 DIR="${RPM_BUILD_ROOT}/%{dir_sitelib}/${CMD}"
49 install -m 755 -d "${DIR}"
50 make -f Makefile.trick "install-${CMD}" "TRICK=cp -f --target-directory=${DIR}"
53 # Move doc files to root, if needed
54 for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done
57 #if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi
62 /%{dir_sitelib}/%{toolname}
63 # Reference to obsolete CGI and BASE64 packages
65 /%{dir_sitelib}/base64
68 * Wed Sep 6 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
69 - attempt to install cgi and base64 modules, for obsolete Makefiles
71 * Fri Sep 1 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
72 - created and tested package