3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 Summary: Polimorphic XML Parser for OCaml
11 Summary(pl.UTF-8): Polimorficzny analizator składniowy XML-a dla OCamla
15 License: distributable
17 Source0: http://download.camlcity.org/download/pxp-%{version}.tar.gz
18 # Source0-md5: 8002253eade813b8355500f4c59f8da8
19 URL: http://projects.camlcity.org/projects/pxp.html
20 BuildRequires: ocaml >= 1:3.09.2
21 BuildRequires: ocaml-camlp4
22 BuildRequires: ocaml-findlib
23 BuildRequires: ocaml-ocamldoc-devel
24 BuildRequires: ocaml-net-netstring-devel >= 3.6-2
25 BuildRequires: ocaml-net-netsys-devel >= 3.6-2
26 BuildRequires: ocaml-net-netunidata-devel
27 BuildRequires: ocaml-ulex
28 BuildRequires: sed >= 4.0
29 BuildConflicts: ocaml-wlex-devel
30 %requires_eq ocaml-ulex
31 %requires_eq ocaml-runtime
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 PXP is a validating parser for XML 1.0 which has been written entirely
38 PXP means "Polymorphic XML Parser" and emphasizes its most useful
39 property: that the API is polymorphic and can be configured such that
40 different objects are used to store different types of elements.
42 %description -l pl.UTF-8
43 PXP jest walidującym analizatorem składniowym XML-a 1.0, napisanym w
46 PXP oznacza "Polymorphic XML Parser" (polimorficzny analizator
47 składniowy XML-a), co podkreśla jego najbardziej użyteczną własność:
48 API jest polimorficzne i może być skonfigurowane tak, że różne obiekty
49 są używane do przechowywania różnych typów elementów.
52 Summary: Polimorphic XML Parser for OCaml - development part
53 Summary(pl.UTF-8): Polimorficzny analizator składniowy XML-a dla OCamla - cześć programistyczna
54 Group: Development/Libraries
56 %requires_eq ocaml-net-netstring-devel
59 PXP is a validating parser for XML 1.0 which has been written entirely
62 PXP means "Polymorphic XML parser" and emphasizes its most useful
63 property: that the API is polymorphic and can be configured such that
64 different objects are used to store different types of elements.
66 This package contains files needed to develop OCaml programs using the
69 %description devel -l pl.UTF-8
70 PXP jest walidującym analizatorem składniowym XML-a 1.0, napisanym w
73 PXP oznacza "Polymorphic XML Parser" (polimorficzny analizator
74 składniowy XML-a), co podkreśla jego najbardziej użyteczną własność:
75 API jest polimorficzne i może być skonfigurowane tak, że różne obiekty
76 są używane do przechowywania różnych typów elementów.
78 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
82 %setup -q -n pxp-%{version}
91 sed -i -e 's/-g//' Makefile.rules
93 all %{?with_ocaml_opt:opt}
96 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{site-lib,pxp}
99 OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib %{__make} install
101 cd $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib
103 echo 'directory = "+pxp"' >> $f/META
104 if [ "`echo $f/*.*`" != "$f/*.*" ]; then
105 mv $f/*.* $RPM_BUILD_ROOT%{_libdir}/ocaml/pxp
110 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
111 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
114 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
118 %doc doc/README doc/SPEC
119 %doc doc/design.txt doc/manual/html
120 %dir %{_libdir}/ocaml/pxp
121 %{_libdir}/ocaml/pxp/*.cm[xi]
122 %{_libdir}/ocaml/pxp/*.cma
123 %{_libdir}/ocaml/pxp/*.cmo
124 %{_libdir}/ocaml/pxp/*.mli
125 %if %{with ocaml_opt}
126 %{_libdir}/ocaml/pxp/*.[ao]
127 %{_libdir}/ocaml/pxp/*.cmxa
129 %{_examplesdir}/%{name}-%{version}
130 %{_libdir}/ocaml/site-lib/*