]> git.pld-linux.org Git - packages/ocaml-pcre.git/blob - ocaml-pcre.spec
- typo
[packages/ocaml-pcre.git] / ocaml-pcre.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # 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.5.0
14 Release:        1
15 License:        LGPL v2.1+ with OCaml linking exception
16 Group:          Libraries
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
20 URL:            http://mmottl.github.io/pcre-ocaml/
21 BuildRequires:  ocaml >= 1:4.12
22 BuildRequires:  ocaml-dune >= 2.7
23 BuildRequires:  ocaml-findlib >= 1.5
24 BuildRequires:  pcre-devel
25 %requires_eq    ocaml-runtime
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
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
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
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ń
46 regularnych napisanym w ,,stylu Perla''.
47
48 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
49 używających tej biblioteki.
50
51 %package devel
52 Summary:        PCRE binding for OCaml - development part
53 Summary(pl.UTF-8):      Wiązania PCRE dla OCamla - część programistyczna
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56 %requires_eq    ocaml
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
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ń
70 regularnych napisanym w ,,stylu Perla''.
71
72 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
73 tej biblioteki.
74
75 %prep
76 %setup -q -n pcre-%{version}
77
78 %build
79 dune build --display=verbose
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
84
85 dune install --destdir=$RPM_BUILD_ROOT
86
87 # packaged as %doc
88 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/pcre/*.mli
89
90 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
91 cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
92
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
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %files
102 %defattr(644,root,root,755)
103 %doc CHANGES.md LICENSE.md README.md
104 %dir %{_libdir}/ocaml/pcre
105 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllpcre_stubs.so
106 %{_libdir}/ocaml/pcre/META
107 %{_libdir}/ocaml/pcre/pcre.cma
108 %if %{with ocaml_opt}
109 %attr(755,root,root) %{_libdir}/ocaml/pcre/pcre.cmxs
110 %endif
111
112 %files devel
113 %defattr(644,root,root,755)
114 %{_libdir}/ocaml/pcre/dune-package
115 %{_libdir}/ocaml/pcre/opam
116 %{_libdir}/ocaml/pcre/libpcre_stubs.a
117 %{_libdir}/ocaml/pcre/pcre.cmi
118 %{_libdir}/ocaml/pcre/pcre.cmt
119 %{_libdir}/ocaml/pcre/pcre.cmti
120 %if %{with ocaml_opt}
121 %{_libdir}/ocaml/pcre/pcre.a
122 %{_libdir}/ocaml/pcre/pcre.cmx
123 %{_libdir}/ocaml/pcre/pcre.cmxa
124 %endif
125 %{_examplesdir}/%{name}-%{version}
This page took 0.084798 seconds and 3 git commands to generate.