]> git.pld-linux.org Git - packages/ocaml-pcre.git/blob - ocaml-pcre.spec
b25e3a6cf6d1f90c27418acef91ddb26da6e42b7
[packages/ocaml-pcre.git] / ocaml-pcre.spec
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), update when upstream will support it
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine       with_ocaml_opt
8 %endif
9
10 Summary:        PCRE binding for OCaml
11 Summary(pl.UTF-8):      Wiązania PCRE dla OCamla
12 Name:           ocaml-pcre
13 Version:        7.4.6
14 Release:        2
15 License:        LGPL v2.1+ with OCaml linking exception
16 Group:          Libraries
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)
25
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
30 %endif
31
32 %description
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.
36
37 This package contains files needed to run bytecode executables using
38 this library.
39
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''.
45
46 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
47 używających tej biblioteki.
48
49 %package devel
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}
54 %requires_eq ocaml
55
56 %description devel
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.
60
61 This package contains files needed to develop OCaml programs using
62 this library.
63
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''.
69
70 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
71 tej biblioteki.
72
73 %prep
74 %setup -q -n pcre-ocaml-%{version}
75
76 %build
77 dune build
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
82
83 dune install --destdir=$RPM_BUILD_ROOT
84
85 # packaged as %doc
86 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/pcre/*.mli
87
88 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
89 cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %files
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
105 %endif
106
107 %files devel
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
117 %endif
118 %{_examplesdir}/%{name}-%{version}
This page took 0.030237 seconds and 2 git commands to generate.