]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/ocaml-findlib.spec
Initial revision
[helm.git] / helm / DEVEL / pxp / ocaml-findlib.spec
1 %define toolname  findlib
2
3 Summary: OCAML FindLib package manager
4 Name: ocaml-%{toolname}
5 Version: 0.4.0
6 Release: 1
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
13 Requires: fileutils, ocaml
14
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
19
20 BuildRoot: /tmp/root-%{name}
21
22 %description
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.
30
31 %prep
32 %setup -n %{toolname}
33 ./configure -mandir "/%{dir_man}" -bindir "/%{dir_bin}" -sitelib "/%{dir_sitelib}"
34
35 %build
36 make all
37 make opt
38
39 %install
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
50
51 # HTML manual
52 if test -d doc/html ; then mv doc/html htmlman; else mkdir htmlman ; fi
53
54 %post
55 # Create a symbolic link to version-specific HTML manual 
56 cd /usr/doc/HTML/
57 if test -L "%{name}" ; then rm -f "%{name}" ; fi
58 if test ! -e "%{name}" ; then ln -s "../%{name}-%{version}/htmlman" "%{name}" ; fi
59
60 %postun
61 cd /usr/doc/HTML/
62 if test "$1" = "0" -a -L %{name} ; then rm -f %{name} ; fi
63
64
65 %clean
66 if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi
67
68 %files
69 %defattr(-,root,root)
70 %doc %{files_doc} htmlman
71 /%{dir_bin}
72 /%{dir_man}/man1
73 /%{dir_man}/man3
74 /%{dir_man}/man5
75 /%{dir_sitelib}
76
77
78 %changelog
79 * Fri Sep  1 2000 Olivier Montanuy <Olivier.Montanuy@wanadoo.fr> 
80 - created and tested package, with html manual