]>
Commit | Line | Data |
---|---|---|
f233a9c3 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) | |
4 | ||
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 | |
8 | %endif | |
9 | ||
096bc182 | 10 | Summary: Polimorphic XML Parser for OCaml |
24595200 | 11 | Summary(pl.UTF-8): Polimorficzny analizator składniowy XML-a dla OCamla |
096bc182 | 12 | Name: ocaml-pxp |
930bf146 | 13 | Version: 1.2.4 |
f233a9c3 | 14 | Release: 2 |
096bc182 MM |
15 | License: distributable |
16 | Group: Libraries | |
eb36b6e2 | 17 | Source0: http://download.camlcity.org/download/pxp-%{version}.tar.gz |
930bf146 | 18 | # Source0-md5: bd6f7608797cbcb44d4495d92e69f9c6 |
8da13f22 | 19 | URL: http://projects.camlcity.org/projects/pxp.html |
f233a9c3 | 20 | BuildRequires: ocaml >= 1:3.09.2 |
7ab93796 | 21 | BuildRequires: ocaml-findlib |
eb36b6e2 | 22 | BuildRequires: ocaml-ocamldoc-devel |
86de20c2 JR |
23 | BuildRequires: ocaml-net-netstring-devel >= 3.6-2 |
24 | BuildRequires: ocaml-net-netsys-devel >= 3.6-2 | |
eb36b6e2 | 25 | BuildRequires: ocaml-ulex |
7ab93796 | 26 | BuildRequires: sed >= 4.0 |
eb36b6e2 | 27 | %requires_eq ocaml-ulex |
096bc182 MM |
28 | %requires_eq ocaml-runtime |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
63e3bb41 MM |
32 | PXP is a validating parser for XML 1.0 which has been written entirely |
33 | in Objective Caml. | |
34 | ||
a30cc339 | 35 | PXP means "Polymorphic XML Parser" and emphasizes its most useful |
63e3bb41 MM |
36 | property: that the API is polymorphic and can be configured such that |
37 | different objects are used to store different types of elements. | |
215c635a | 38 | |
6dbe4d6c JR |
39 | %description -l pl.UTF-8 |
40 | PXP jest walidującym analizatorem składniowym XML-a 1.0, napisanym w | |
41 | całości w OCamlu. | |
63e3bb41 | 42 | |
a30cc339 | 43 | PXP oznacza "Polymorphic XML Parser" (polimorficzny analizator |
6dbe4d6c JR |
44 | składniowy XML-a), co podkreśla jego najbardziej użyteczną własność: |
45 | API jest polimorficzne i może być skonfigurowane tak, że różne obiekty | |
46 | są używane do przechowywania różnych typów elementów. | |
096bc182 MM |
47 | |
48 | %package devel | |
49 | Summary: Polimorphic XML Parser for OCaml - development part | |
24595200 | 50 | Summary(pl.UTF-8): Polimorficzny analizator składniowy XML-a dla OCamla - cześć programistyczna |
096bc182 MM |
51 | Group: Development/Libraries |
52 | %requires_eq ocaml | |
53 | %requires_eq ocaml-net-netstring-devel | |
54 | %requires_eq ocaml-wlex-devel | |
55 | ||
56 | %description devel | |
63e3bb41 MM |
57 | PXP is a validating parser for XML 1.0 which has been written entirely |
58 | in Objective Caml. | |
59 | ||
60 | PXP means "Polymorphic XML parser" and emphasizes its most useful | |
61 | property: that the API is polymorphic and can be configured such that | |
62 | different objects are used to store different types of elements. | |
63 | ||
7ab93796 ER |
64 | This package contains files needed to develop OCaml programs using the |
65 | PXP library. | |
096bc182 | 66 | |
6dbe4d6c JR |
67 | %description devel -l pl.UTF-8 |
68 | PXP jest walidującym analizatorem składniowym XML-a 1.0, napisanym w | |
69 | całości w OCamlu. | |
63e3bb41 | 70 | |
a30cc339 | 71 | PXP oznacza "Polymorphic XML Parser" (polimorficzny analizator |
6dbe4d6c JR |
72 | składniowy XML-a), co podkreśla jego najbardziej użyteczną własność: |
73 | API jest polimorficzne i może być skonfigurowane tak, że różne obiekty | |
74 | są używane do przechowywania różnych typów elementów. | |
63e3bb41 | 75 | |
6dbe4d6c | 76 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających |
a30cc339 | 77 | biblioteki PXP. |
096bc182 MM |
78 | |
79 | %prep | |
80 | %setup -q -n pxp-%{version} | |
096bc182 MM |
81 | |
82 | %build | |
83 | ./configure \ | |
eb36b6e2 JR |
84 | -with-lex \ |
85 | -with-ulex \ | |
86 | -without-wlex \ | |
87 | -with-pp | |
096bc182 | 88 | |
7ab93796 ER |
89 | sed -i -e 's/-g//' Makefile.rules |
90 | %{__make} -j1 \ | |
f233a9c3 | 91 | all %{?with_ocaml_opt:opt} |
096bc182 MM |
92 | |
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{site-lib,pxp} | |
97 | OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib %{__make} install | |
98 | dir=`pwd` | |
99 | cd $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib | |
100 | for f in * ; do | |
101 | echo 'directory = "+pxp"' >> $f/META | |
102 | if [ "`echo $f/*.*`" != "$f/*.*" ]; then | |
103 | mv $f/*.* $RPM_BUILD_ROOT%{_libdir}/ocaml/pxp | |
104 | fi | |
105 | done | |
106 | cd $dir | |
107 | ||
108 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
109 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
110 | ||
096bc182 MM |
111 | %clean |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %files devel | |
115 | %defattr(644,root,root,755) | |
86de20c2 | 116 | %doc doc/README doc/SPEC |
eb36b6e2 | 117 | %doc doc/design.txt doc/manual/html |
096bc182 | 118 | %dir %{_libdir}/ocaml/pxp |
f233a9c3 JR |
119 | %{_libdir}/ocaml/pxp/*.cm[xi] |
120 | %{_libdir}/ocaml/pxp/*.cma | |
121 | %{_libdir}/ocaml/pxp/*.cmo | |
122 | %{_libdir}/ocaml/pxp/*.mli | |
123 | %if %{with ocaml_opt} | |
124 | %{_libdir}/ocaml/pxp/*.[ao] | |
125 | %{_libdir}/ocaml/pxp/*.cmxa | |
126 | %endif | |
096bc182 MM |
127 | %{_examplesdir}/%{name}-%{version} |
128 | %{_libdir}/ocaml/site-lib/* |