1 %define toolname findlib
3 Summary: OCAML FindLib package manager
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
13 Requires: fileutils, ocaml
15 %define dir_man usr/man
16 %define dir_bin usr/bin
17 %define dir_sitelib usr/lib/ocaml/site-lib
18 %define files_doc LICENSE README INSTALL
20 BuildRoot: /tmp/root-%{name}
23 Provides a scheme to manage reusable software components (packages),
24 as collections of OCaml modules for which metainformation can be stored.
25 The library contains functions to look the directory up that
26 stores a package, to query metainformation about a package, and
27 to retrieve dependency information about multiple packages.
28 Metainformation includes a version string, the archives the package consists of, additional linker
29 options, and dependencies dependent on other packages.
33 ./configure -mandir "/%{dir_man}" -bindir "/%{dir_bin}" -sitelib "/%{dir_sitelib}"
40 # Install binary, libs, manuals
41 DIR_BIN="${RPM_BUILD_ROOT}/%{dir_bin}"
42 DIR_MAN="${RPM_BUILD_ROOT}/%{dir_man}"
43 DIR_SITELIB="${RPM_BUILD_ROOT}/%{dir_sitelib}"
44 install -m 755 -d "${DIR_BIN}"
45 install -m 755 -d "${DIR_MAN}"
46 install -m 755 -d "${DIR_SITELIB}"
47 make install "OCAML_SITELIB=${DIR_SITELIB}" "OCAMLFIND_BIN=${DIR_BIN}" "OCAMLFIND_MAN=${DIR_MAN}"
48 # Move doc files to root, if needed
49 for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done
52 if test -d doc/html ; then mv doc/html htmlman; else mkdir htmlman ; fi
55 # Create a symbolic link to version-specific HTML manual
57 if test -L "%{name}" ; then rm -f "%{name}" ; fi
58 if test ! -e "%{name}" ; then ln -s "../%{name}-%{version}/htmlman" "%{name}" ; fi
62 if test "$1" = "0" -a -L %{name} ; then rm -f %{name} ; fi
66 if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi
70 %doc %{files_doc} htmlman
79 * Fri Sep 1 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr>
80 - created and tested package, with html manual