3 Summary: OCAML PXP XML 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, ocaml-netstring
13 Requires: fileutils, ocaml, ocaml-netstring
15 %define dir_sitelib usr/lib/ocaml/site-lib
16 %define files_doc LICENSE README INSTALL SPEC EXTENSIONS
18 BuildRoot: /tmp/root-%{name}
21 PXP is a validating parser for XML-1.0 written entirely in Objective Caml.
22 PXP stands for Polymorphic XML parser, emphasizes its most useful property:
23 the API is polymorphic and can be configured such that different objects are
24 used to store different types of elements.
25 PXP was formerly known as "Markup".
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}"
46 # Move doc files to root, if needed
47 for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done
50 if test -d doc/manual/html ; then mv doc/manual/html htmlman; else mkdir htmlman ; fi
53 # Create a symbolic link to version-specific HTML manual
56 if test -L "%{name}" ; then rm -f "%{name}" ; fi
57 if test ! -e "%{name}" ; then ln -s "../%{name}-%{version}/htmlman" "%{name}" ; fi
61 if test "$1" = "0" -a -L %{name} ; then rm -f %{name} ; fi
64 if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi
68 %doc %{files_doc} htmlman examples
69 /%{dir_sitelib}/%{toolname}
72 * Fri Sep 1 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
73 - created and tested package