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