3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
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
10 Summary: PCRE binding for OCaml
11 Summary(pl.UTF-8): Wiązania PCRE dla OCamla
15 License: LGPL v2.1+ with OCaml linking exception
17 Source0: https://github.com/mmottl/pcre-ocaml/archive/%{version}/pcre-ocaml-%{version}.tar.gz
18 # Source0-md5: da29a597a1a6f4744b191260651fe3a6
19 URL: http://mmottl.github.io/pcre-ocaml/
20 BuildRequires: ocaml >= 1:3.12
21 BuildRequires: ocaml-findlib >= 1.5
22 BuildRequires: pcre-devel
23 %requires_eq ocaml-runtime
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %if %{without ocaml_opt}
27 %define no_install_post_strip 1
28 # no opt means no native binary, stripping bytecode breaks such programs
29 %define _enable_debug_packages 0
33 This OCaml-library interfaces the PCRE (Perl-compatibility regular
34 expressions) library which is written in C. It can be used for
35 matching regular expressions which are written in "Perl"-style.
37 This package contains files needed to run bytecode executables using
40 %description -l pl.UTF-8
41 Biblioteka zawarta w tym pakiecie umożliwia korzystanie z biblioteki
42 PCRE (wyrażenia regularne kompatybilne z Perlem), która jest z kolei
43 napisana w C. Może być ona używana do dopasowywania wyrażeń
44 regularnych napisanym w ,,stylu Perla''.
46 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
47 używających tej biblioteki.
50 Summary: PCRE binding for OCaml - development part
51 Summary(pl.UTF-8): Wiązania PCRE dla OCamla - cześć programistyczna
52 Group: Development/Libraries
53 Requires: %{name} = %{version}-%{release}
57 This OCaml-library interfaces the PCRE (Perl-compatibility regular
58 expressions) library which is written in C. It can be used for
59 matching regular expressions which are written in "Perl"-style.
61 This package contains files needed to develop OCaml programs using
64 %description devel -l pl.UTF-8
65 Biblioteka zawarta w tym pakiecie umożliwia korzystanie z biblioteki
66 PCRE (wyrażenia regularne kompatybilne z Perlem), która jest z kolei
67 napisana w C. Może być ona używana do dopasowywania wyrażeń
68 regularnych napisanym w ,,stylu Perla''.
70 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
74 %setup -q -n pcre-ocaml-%{version}
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
83 dune install --destdir=$RPM_BUILD_ROOT
86 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/pcre/*.mli
88 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
89 cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
92 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc CHANGES.md README.md
97 %dir %{_libdir}/ocaml/pcre
98 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllpcre_stubs.so
99 %{_libdir}/ocaml/pcre/META
100 %{_libdir}/ocaml/pcre/dune-package
101 %{_libdir}/ocaml/pcre/opam
102 %{_libdir}/ocaml/pcre/pcre.cma
103 %if %{with ocaml_opt}
104 %attr(755,root,root) %{_libdir}/ocaml/pcre/pcre.cmxs
108 %defattr(644,root,root,755)
109 %{_libdir}/ocaml/pcre/libpcre_stubs.a
110 %{_libdir}/ocaml/pcre/pcre.cmi
111 %{_libdir}/ocaml/pcre/pcre.cmt
112 %{_libdir}/ocaml/pcre/pcre.cmti
113 %if %{with ocaml_opt}
114 %{_libdir}/ocaml/pcre/pcre.a
115 %{_libdir}/ocaml/pcre/pcre.cmx
116 %{_libdir}/ocaml/pcre/pcre.cmxa
118 %{_examplesdir}/%{name}-%{version}