]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) | |
4 | ||
5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it | |
6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 | |
7 | %undefine with_ocaml_opt | |
8 | %endif | |
9 | ||
10 | Summary: Polimorphic XML Parser for OCaml | |
11 | Summary(pl.UTF-8): Polimorficzny analizator składniowy XML-a dla OCamla | |
12 | Name: ocaml-pxp | |
13 | Version: 1.2.9 | |
14 | Release: 3 | |
15 | License: distributable | |
16 | Group: Libraries | |
17 | Source0: http://download.camlcity.org/download/pxp-%{version}.tar.gz | |
18 | # Source0-md5: 8002253eade813b8355500f4c59f8da8 | |
19 | Patch0: %{name}-debian-build-fix.patch | |
20 | URL: http://projects.camlcity.org/projects/pxp.html | |
21 | BuildRequires: ocaml >= 1:3.09.2 | |
22 | BuildRequires: ocaml-camlp4 | |
23 | BuildRequires: ocaml-findlib | |
24 | BuildRequires: ocaml-ocamldoc-devel | |
25 | BuildRequires: ocaml-net-netstring-devel >= 3.6-2 | |
26 | BuildRequires: ocaml-net-netsys-devel >= 3.6-2 | |
27 | BuildRequires: ocaml-net-netunidata-devel | |
28 | BuildRequires: ocaml-ulex | |
29 | BuildRequires: sed >= 4.0 | |
30 | BuildConflicts: ocaml-wlex-devel | |
31 | %requires_eq ocaml-ulex | |
32 | %requires_eq ocaml-runtime | |
33 | Conflicts: ocaml-pxp-devel < 1.2.9-3 | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | PXP is a validating parser for XML 1.0 which has been written entirely | |
38 | in Objective Caml. | |
39 | ||
40 | PXP means "Polymorphic XML Parser" and emphasizes its most useful | |
41 | property: that the API is polymorphic and can be configured such that | |
42 | different objects are used to store different types of elements. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | PXP jest walidującym analizatorem składniowym XML-a 1.0, napisanym w | |
46 | całości w OCamlu. | |
47 | ||
48 | PXP oznacza "Polymorphic XML Parser" (polimorficzny analizator | |
49 | składniowy XML-a), co podkreśla jego najbardziej użyteczną własność: | |
50 | API jest polimorficzne i może być skonfigurowane tak, że różne obiekty | |
51 | są używane do przechowywania różnych typów elementów. | |
52 | ||
53 | %package devel | |
54 | Summary: Polimorphic XML Parser for OCaml - development part | |
55 | Summary(pl.UTF-8): Polimorficzny analizator składniowy XML-a dla OCamla - część programistyczna | |
56 | Group: Development/Libraries | |
57 | %requires_eq ocaml | |
58 | %requires_eq ocaml-net-netstring-devel | |
59 | ||
60 | %description devel | |
61 | PXP is a validating parser for XML 1.0 which has been written entirely | |
62 | in Objective Caml. | |
63 | ||
64 | PXP means "Polymorphic XML parser" and emphasizes its most useful | |
65 | property: that the API is polymorphic and can be configured such that | |
66 | different objects are used to store different types of elements. | |
67 | ||
68 | This package contains files needed to develop OCaml programs using the | |
69 | PXP library. | |
70 | ||
71 | %description devel -l pl.UTF-8 | |
72 | PXP jest walidującym analizatorem składniowym XML-a 1.0, napisanym w | |
73 | całości w OCamlu. | |
74 | ||
75 | PXP oznacza "Polymorphic XML Parser" (polimorficzny analizator | |
76 | składniowy XML-a), co podkreśla jego najbardziej użyteczną własność: | |
77 | API jest polimorficzne i może być skonfigurowane tak, że różne obiekty | |
78 | są używane do przechowywania różnych typów elementów. | |
79 | ||
80 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu | |
81 | używających biblioteki PXP. | |
82 | ||
83 | %prep | |
84 | %setup -q -n pxp-%{version} | |
85 | %patch0 -p1 | |
86 | ||
87 | %build | |
88 | ./configure \ | |
89 | -with-lex \ | |
90 | -with-ulex \ | |
91 | -without-wlex \ | |
92 | -with-pp | |
93 | ||
94 | sed -i -e 's/-g//' Makefile.rules | |
95 | %{__make} -j1 \ | |
96 | all %{?with_ocaml_opt:opt} | |
97 | ||
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml | |
101 | ||
102 | OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \ | |
103 | %{__make} install | |
104 | ||
105 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
106 | cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %files | |
112 | %defattr(644,root,root,755) | |
113 | %doc doc/README doc/SPEC | |
114 | %dir %{_libdir}/ocaml/pxp | |
115 | %{_libdir}/ocaml/pxp/META | |
116 | %dir %{_libdir}/ocaml/pxp-engine | |
117 | %{_libdir}/ocaml/pxp-engine/META | |
118 | %{_libdir}/ocaml/pxp-engine/*.cma | |
119 | %dir %{_libdir}/ocaml/pxp-lex-iso8859* | |
120 | %{_libdir}/ocaml/pxp-lex-iso8859*/META | |
121 | %{_libdir}/ocaml/pxp-lex-iso8859*/*.cma | |
122 | %{_libdir}/ocaml/pxp-lex-utf8/META | |
123 | %{_libdir}/ocaml/pxp-lex-utf8/*.cma | |
124 | %dir %{_libdir}/ocaml/pxp-pp | |
125 | %{_libdir}/ocaml/pxp-pp/META | |
126 | %{_libdir}/ocaml/pxp-pp/*.cma | |
127 | %dir %{_libdir}/ocaml/pxp-ulex-utf8 | |
128 | %{_libdir}/ocaml/pxp-ulex-utf8/META | |
129 | %{_libdir}/ocaml/pxp-ulex-utf8/*.cma | |
130 | ||
131 | %files devel | |
132 | %defattr(644,root,root,755) | |
133 | %doc doc/design.txt doc/manual/html | |
134 | %{_libdir}/ocaml/pxp-engine/*.cmi | |
135 | %{_libdir}/ocaml/pxp-engine/*.cmo | |
136 | %{_libdir}/ocaml/pxp-engine/*.mli | |
137 | %{_libdir}/ocaml/pxp-lex-iso8859*/*.cmi | |
138 | %{_libdir}/ocaml/pxp-lex-iso8859*/*.cmo | |
139 | %{_libdir}/ocaml/pxp-lex-utf8/*.cmi | |
140 | %{_libdir}/ocaml/pxp-lex-utf8/*.cmo | |
141 | %{_libdir}/ocaml/pxp-ulex-utf8/*.cmi | |
142 | %{_libdir}/ocaml/pxp-ulex-utf8/*.cmo | |
143 | %if %{with ocaml_opt} | |
144 | %{_libdir}/ocaml/pxp-engine/*.a | |
145 | %{_libdir}/ocaml/pxp-engine/*.cmxa | |
146 | %{_libdir}/ocaml/pxp-lex-iso8859*/*.a | |
147 | %{_libdir}/ocaml/pxp-lex-iso8859*/*.cmx | |
148 | %{_libdir}/ocaml/pxp-lex-iso8859*/*.cmxa | |
149 | %{_libdir}/ocaml/pxp-lex-iso8859*/*.o | |
150 | %{_libdir}/ocaml/pxp-lex-utf8/*.a | |
151 | %{_libdir}/ocaml/pxp-lex-utf8/*.cmx | |
152 | %{_libdir}/ocaml/pxp-lex-utf8/*.cmxa | |
153 | %{_libdir}/ocaml/pxp-lex-utf8/*.o | |
154 | %{_libdir}/ocaml/pxp-ulex-utf8/*.a | |
155 | %{_libdir}/ocaml/pxp-ulex-utf8/*.cmx | |
156 | %{_libdir}/ocaml/pxp-ulex-utf8/*.cmxa | |
157 | %{_libdir}/ocaml/pxp-ulex-utf8/*.o | |
158 | %endif | |
159 | %{_examplesdir}/%{name}-%{version} |