]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/ocaml-netstring.spec
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / DEVEL / pxp / ocaml-netstring.spec
1 %define toolname  netstring
2
3 Summary: OCAML Netstring library
4 Name: ocaml-%{toolname}
5 Version: 0.9.3
6 Release: 2
7 Copyright: GPL-like
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
14
15 %define dir_sitelib  usr/lib/ocaml/site-lib
16 %define files_doc    LICENSE README INSTALL
17 BuildRoot: /tmp/root-%{name}
18
19 %description
20 A collection of string processing functions for Internet protocols
21 - Parse MIME messages
22 - Encode/decode Base 64, Quoted Printable, Q, URL-encoding   
23 - CGI interface that allows users to upload files
24 - Simple HTML parser 
25 - URL parsing, printing and processing
26
27 %prep
28 %setup -n %{toolname}
29 make clean
30
31 %build
32 make all
33 make opt
34
35 %install
36 # Install binary, libs, manuals
37
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}"
51 done
52
53 # Move doc files to root, if needed
54 for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done
55
56 %clean
57 #if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi
58
59 %files
60 %defattr(-,root,root)
61 %doc %{files_doc}
62 /%{dir_sitelib}/%{toolname}
63 # Reference to obsolete CGI and BASE64 packages
64 /%{dir_sitelib}/cgi
65 /%{dir_sitelib}/base64
66
67 %changelog
68 * Wed Sep  6 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
69 - attempt to install cgi and base64 modules, for obsolete Makefiles
70
71 * Fri Sep  1 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr> 
72 - created and tested package
73