X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fpxp%2Focaml-pxp.spec;fp=helm%2FDEVEL%2Fpxp%2Focaml-pxp.spec;h=ee2080d942c74813f634f078732d5e86103516b5;hb=758057e85325f94cd88583feb1fdf6b038e35055;hp=0000000000000000000000000000000000000000;hpb=ef35bce6975cc94557ecdce77a2d7fb4dd8adb4c;p=helm.git diff --git a/helm/DEVEL/pxp/ocaml-pxp.spec b/helm/DEVEL/pxp/ocaml-pxp.spec new file mode 100644 index 000000000..ee2080d94 --- /dev/null +++ b/helm/DEVEL/pxp/ocaml-pxp.spec @@ -0,0 +1,73 @@ +%define toolname pxp + +Summary: OCAML PXP XML library +Name: ocaml-%{toolname} +Version: 1.0 +Release: 1 +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, ocaml-netstring +Requires: fileutils, ocaml, ocaml-netstring + +%define dir_sitelib usr/lib/ocaml/site-lib +%define files_doc LICENSE README INSTALL SPEC EXTENSIONS + +BuildRoot: /tmp/root-%{name} + +%description +PXP is a validating parser for XML-1.0 written entirely in Objective Caml. +PXP stands for Polymorphic XML parser, emphasizes its most useful property: +the API is polymorphic and can be configured such that different objects are +used to store different types of elements. +PXP was formerly known as "Markup". + +%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 + +# HTML manual +if test -d doc/manual/html ; then mv doc/manual/html htmlman; else mkdir htmlman ; fi + + +# Create a symbolic link to version-specific HTML manual +%post +cd /usr/doc/HTML/ +if test -L "%{name}" ; then rm -f "%{name}" ; fi +if test ! -e "%{name}" ; then ln -s "../%{name}-%{version}/htmlman" "%{name}" ; fi + +%postun +cd /usr/doc/HTML/ +if test "$1" = "0" -a -L %{name} ; then rm -f %{name} ; fi + +%clean +if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi + +%files +%defattr(-,root,root) +%doc %{files_doc} htmlman examples +/%{dir_sitelib}/%{toolname} + +%changelog +* Fri Sep 1 2000 Olivier Montanuy +- created and tested package