]>
Commit | Line | Data |
---|---|---|
170a6c18 JR |
1 | Summary: Objective Caml Preprocessor |
2 | Summary(pl.UTF-8): Preprocesor OCamla | |
3 | Name: camlp5 | |
4 | Version: 5.11 | |
5 | Release: 0.1 | |
6 | License: distributable | |
7 | Group: Development/Languages | |
8 | Source0: http://pauillac.inria.fr/~ddr/camlp5/distrib/src/%{name}-%{version}.tgz | |
9 | # Source0-md5: 26d69abd669c5fda43dbf35074debc81 | |
10 | Source1: http://pauillac.inria.fr/~ddr/camlp5/doc/pdf/%{name}-%{version}.pdf | |
11 | # Source1-md5: 57cf4eb162568d9b755e8120a1b82d43 | |
12 | Source2: http://pauillac.inria.fr/~ddr/camlp5/doc/htmlz/%{name}-%{version}.html.tgz | |
13 | # Source2-md5: fcf3aa4d88a311aa27ff23e50c6f510f | |
14 | URL: http://caml.inria.fr/ | |
15 | BuildRequires: db-devel >= 4.1 | |
16 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %description | |
20 | Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers | |
21 | tools for syntax (grammars) and the ability to modify the concrete | |
22 | syntax of the language (quotations, syntax extensions). | |
23 | ||
24 | Camlp4 can parse normal Ocaml concrete syntax or any other | |
25 | user-definable syntax. As an example, an alternative syntax is | |
26 | provided, named revised, because it tries to fix some small problems | |
27 | of the normal syntax. | |
28 | ||
29 | Camlp4 can pretty print the normal Ocaml concrete syntax or the | |
30 | revised one. It is therefore always possible to have a version of your | |
31 | sources compilable by the Objective Caml compiler without | |
32 | preprocessing. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | Camlp4 jest preprocesorem OCamla. Oferuje narzędzia do manipulowania | |
36 | składnią (gramatyki) oraz możliwość modyfikowania oryginalnej składni | |
37 | języka (cytowania, rozszerzenia). | |
38 | ||
39 | Camlp4 może sparsować oryginalną składnię Ocamla lub dowolną inną | |
40 | definiowalną przez użytkownika. Jako przykład podana jest alternatywna | |
41 | składnia (revised syntax), która próbuje poprawić drobne problemy | |
42 | występujące w składni oryginalnej. | |
43 | ||
44 | Camlp4 umie ładnie formatować źródła zarówno w oryginalnej jak i | |
45 | poprawionej składni OCamla. Potrafi także tłumaczyć programy z jednej | |
46 | składni na drugą. | |
47 | ||
48 | %package doc-html | |
49 | Summary: Objective Caml Preprocessor - HTML documentation | |
50 | Summary(pl.UTF-8): Preprocesor OCamla - dokumentacja HTML | |
51 | Group: Development/Languages | |
52 | ||
53 | %description doc-html | |
54 | Objective Caml Preprocessor - HTML documentation. | |
55 | ||
56 | %description doc-html -l pl.UTF-8 | |
57 | Preprocesor OCamla - dokumentacja HTML. | |
58 | ||
59 | %prep | |
60 | %setup -q | |
61 | cp %{SOURCE1} docs/camlp4.pdf | |
62 | tar xzf %{SOURCE2} | |
63 | ||
64 | %build | |
65 | cp -f /usr/share/automake/config.sub config/gnu | |
66 | ./configure \ | |
67 | -cc "%{__cc}" \ | |
68 | -bindir %{_bindir} \ | |
69 | -libdir %{_libdir}/%{name} \ | |
70 | -mandir %{_mandir}/man1 \ | |
71 | -host %{_host} \ | |
72 | %{!?with_tk:-no-tk} \ | |
73 | -with-pthread \ | |
74 | -x11lib %{_libdir} | |
75 | ||
76 | %{__make} -j1 world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall" | |
77 | %{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall" -j1 | |
78 | ||
79 | # broken build system | |
80 | sed -e 's,LIBDIR,%{_libdir},' camlp4/man/camlp4.1.tpl > camlp4/man/camlp4.1 | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-{labltk-,}%{version}} | |
85 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lib | |
86 | ||
87 | %{__make} install \ | |
88 | BINDIR=$RPM_BUILD_ROOT%{_bindir} \ | |
89 | LIBDIR=$RPM_BUILD_ROOT%{_libdir}/%{name} \ | |
90 | MANDIR=$RPM_BUILD_ROOT%{_mandir} | |
91 | ||
92 | cat > $RPM_BUILD_ROOT%{_libdir}/%{name}/ld.conf <<EOF | |
93 | %{_libdir}/%{name}/stublibs | |
94 | %{_libdir}/%{name} | |
95 | EOF | |
96 | ||
97 | %if %{with emacs} | |
98 | %{__make} -C emacs DESTDIR=$RPM_BUILD_ROOT install \ | |
99 | EMACS="`if [ -x %{_bindir}/emacs ]; then echo emacs; \ | |
100 | else echo xemacs; fi`" \ | |
101 | EMACSDIR="$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp" | |
102 | %endif | |
103 | ||
104 | # symlink .opt versions of compilers (if present) | |
105 | # warning: don't do that with camlp4 (can't load extensions then) | |
106 | for f in ocamlc ocamlopt ocamldoc ocamllex; do | |
107 | if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then | |
108 | mv -f $RPM_BUILD_ROOT%{_bindir}/$f \ | |
109 | $RPM_BUILD_ROOT%{_bindir}/$f.byte | |
110 | ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f | |
111 | fi | |
112 | done | |
113 | ||
114 | # move includes to the proper place | |
115 | mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml | |
116 | # but leave compatibility symlink | |
117 | ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml | |
118 | ||
119 | # compiled sources of compiler, needed by some programs | |
120 | for f in {asm,byte}comp parsing typing utils ; do | |
121 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f | |
122 | cp $f/*.{cmi,cmo,cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f | |
123 | done | |
124 | ||
125 | # this isn't installed by default, but is useful | |
126 | install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo | |
127 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
128 | cp -r otherlibs/labltk/examples* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-labltk-%{version} | |
129 | ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir} | |
130 | ||
131 | # shutup checkfiles | |
132 | rm -rf $RPM_BUILD_ROOT%{_mandir}/man3 | |
133 | rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp} | |
134 | ||
135 | # install info pages | |
136 | cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir} | |
137 | ||
138 | # broken build system | |
139 | install camlp4/man/camlp4.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
140 | for f in camlp4o.1 camlp4r.1 mkcamlp4.1 camlp4o.opt.1 camlp4r.opt.1 ; do | |
141 | echo '.so camlp4.1' >$RPM_BUILD_ROOT%{_mandir}/man1/$f | |
142 | done | |
143 | ||
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
147 | %files | |
148 | %defattr(644,root,root,755) | |
149 | %attr(755,root,root) %{_bindir}/camlp4* | |
150 | %attr(755,root,root) %{_bindir}/mkcamlp4 | |
151 | %{_libdir}/%{name}/camlp4 | |
152 | %{_mandir}/man1/camlp4*.1* | |
153 | %{_mandir}/man1/mkcamlp4.1* | |
154 | ||
155 | %files doc-html | |
156 | %defattr(644,root,root,755) | |
157 | %doc docs/html/camlp4* |