]>
Commit | Line | Data |
---|---|---|
93614797 JR |
1 | # |
2 | # Conditional build: | |
56935b58 | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
93614797 | 4 | |
b2e2e7a9 | 5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it |
45793ec7 | 6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
93614797 JR |
7 | %undefine with_ocaml_opt |
8 | %endif | |
9 | ||
27d247d1 | 10 | Summary: PCRE binding for OCaml |
c920d8f0 | 11 | Summary(pl.UTF-8): Wiązania PCRE dla OCamla |
27d247d1 | 12 | Name: ocaml-pcre |
56935b58 JB |
13 | Version: 7.5.0 |
14 | Release: 1 | |
d90ed784 | 15 | License: LGPL v2.1+ with OCaml linking exception |
27d247d1 | 16 | Group: Libraries |
56935b58 JB |
17 | #Source0Download: https://github.com/mmottl/pcre-ocaml/releases |
18 | Source0: https://github.com/mmottl/pcre-ocaml/releases/download/%{version}/pcre-%{version}.tbz | |
19 | # Source0-md5: 3f91ab553a59b661e5e7debbb876918c | |
10b1e4d4 | 20 | URL: http://mmottl.github.io/pcre-ocaml/ |
56935b58 JB |
21 | BuildRequires: ocaml >= 1:4.12 |
22 | BuildRequires: ocaml-dune >= 2.7 | |
10b1e4d4 | 23 | BuildRequires: ocaml-findlib >= 1.5 |
344cfd0a | 24 | BuildRequires: pcre-devel |
27d247d1 MM |
25 | %requires_eq ocaml-runtime |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
b2e2e7a9 JB |
28 | %if %{without ocaml_opt} |
29 | %define no_install_post_strip 1 | |
30 | # no opt means no native binary, stripping bytecode breaks such programs | |
31 | %define _enable_debug_packages 0 | |
32 | %endif | |
33 | ||
27d247d1 MM |
34 | %description |
35 | This OCaml-library interfaces the PCRE (Perl-compatibility regular | |
36 | expressions) library which is written in C. It can be used for | |
37 | matching regular expressions which are written in "Perl"-style. | |
38 | ||
39 | This package contains files needed to run bytecode executables using | |
40 | this library. | |
41 | ||
bc9ee53e JR |
42 | %description -l pl.UTF-8 |
43 | Biblioteka zawarta w tym pakiecie umożliwia korzystanie z biblioteki | |
44 | PCRE (wyrażenia regularne kompatybilne z Perlem), która jest z kolei | |
45 | napisana w C. Może być ona używana do dopasowywania wyrażeń | |
27d247d1 MM |
46 | regularnych napisanym w ,,stylu Perla''. |
47 | ||
bc9ee53e JR |
48 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów |
49 | używających tej biblioteki. | |
27d247d1 MM |
50 | |
51 | %package devel | |
52 | Summary: PCRE binding for OCaml - development part | |
c920d8f0 | 53 | Summary(pl.UTF-8): Wiązania PCRE dla OCamla - cześć programistyczna |
27d247d1 MM |
54 | Group: Development/Libraries |
55 | Requires: %{name} = %{version}-%{release} | |
56935b58 | 56 | %requires_eq ocaml |
27d247d1 MM |
57 | |
58 | %description devel | |
59 | This OCaml-library interfaces the PCRE (Perl-compatibility regular | |
60 | expressions) library which is written in C. It can be used for | |
61 | matching regular expressions which are written in "Perl"-style. | |
62 | ||
63 | This package contains files needed to develop OCaml programs using | |
64 | this library. | |
65 | ||
bc9ee53e JR |
66 | %description devel -l pl.UTF-8 |
67 | Biblioteka zawarta w tym pakiecie umożliwia korzystanie z biblioteki | |
68 | PCRE (wyrażenia regularne kompatybilne z Perlem), która jest z kolei | |
69 | napisana w C. Może być ona używana do dopasowywania wyrażeń | |
27d247d1 MM |
70 | regularnych napisanym w ,,stylu Perla''. |
71 | ||
bc9ee53e | 72 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających |
27d247d1 MM |
73 | tej biblioteki. |
74 | ||
75 | %prep | |
56935b58 | 76 | %setup -q -n pcre-%{version} |
27d247d1 MM |
77 | |
78 | %build | |
56935b58 | 79 | dune build --display=verbose |
27d247d1 MM |
80 | |
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
f6ff52ba | 83 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs |
27d247d1 | 84 | |
24476028 | 85 | dune install --destdir=$RPM_BUILD_ROOT |
7573fd08 | 86 | |
b2e2e7a9 | 87 | # packaged as %doc |
d90ed784 | 88 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/pcre/*.mli |
27d247d1 MM |
89 | |
90 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
d90ed784 | 91 | cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
27d247d1 | 92 | |
56935b58 JB |
93 | # sources |
94 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/pcre/*.ml | |
95 | # packaged as %doc | |
96 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/pcre | |
97 | ||
27d247d1 MM |
98 | %clean |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
56935b58 | 103 | %doc CHANGES.md LICENSE.md README.md |
27d247d1 | 104 | %dir %{_libdir}/ocaml/pcre |
d90ed784 | 105 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllpcre_stubs.so |
24476028 | 106 | %{_libdir}/ocaml/pcre/META |
8d5e2f02 JB |
107 | %{_libdir}/ocaml/pcre/pcre.cma |
108 | %if %{with ocaml_opt} | |
109 | %attr(755,root,root) %{_libdir}/ocaml/pcre/pcre.cmxs | |
110 | %endif | |
27d247d1 MM |
111 | |
112 | %files devel | |
113 | %defattr(644,root,root,755) | |
56935b58 JB |
114 | %{_libdir}/ocaml/pcre/dune-package |
115 | %{_libdir}/ocaml/pcre/opam | |
d90ed784 | 116 | %{_libdir}/ocaml/pcre/libpcre_stubs.a |
b2e2e7a9 | 117 | %{_libdir}/ocaml/pcre/pcre.cmi |
24476028 JR |
118 | %{_libdir}/ocaml/pcre/pcre.cmt |
119 | %{_libdir}/ocaml/pcre/pcre.cmti | |
93614797 | 120 | %if %{with ocaml_opt} |
d90ed784 | 121 | %{_libdir}/ocaml/pcre/pcre.a |
b2e2e7a9 | 122 | %{_libdir}/ocaml/pcre/pcre.cmx |
93614797 JR |
123 | %{_libdir}/ocaml/pcre/pcre.cmxa |
124 | %endif | |
7573fd08 | 125 | %{_examplesdir}/%{name}-%{version} |