]> git.pld-linux.org Git - packages/ocaml-pcre.git/blob - ocaml-pcre.spec
0770886fb97fe05e1277bcbac27b17907002202e
[packages/ocaml-pcre.git] / ocaml-pcre.spec
1 %define         ocaml_ver       1:3.09.2
2 Summary:        PCRE binding for OCaml
3 Summary(pl.UTF-8):      Wiązania PCRE dla OCamla
4 Name:           ocaml-pcre
5 Version:        6.2.2
6 Release:        2
7 License:        LGPL
8 Group:          Libraries
9 Source0:        http://hg.ocaml.info/release/pcre-ocaml/archive/release-%{version}.tar.bz2
10 # Source0-md5:  9c89466d8bb801a6235598b04a98af26
11 URL:            http://www.ocaml.info/home/ocaml_sources.html#toc15
12 BuildRequires:  ocaml >= %{ocaml_ver}
13 BuildRequires:  ocaml-findlib
14 BuildRequires:  pcre-devel
15 %requires_eq    ocaml-runtime
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 This OCaml-library interfaces the PCRE (Perl-compatibility regular
20 expressions) library which is written in C. It can be used for
21 matching regular expressions which are written in "Perl"-style.
22
23 This package contains files needed to run bytecode executables using
24 this library.
25
26 %description -l pl.UTF-8
27 Biblioteka zawarta w tym pakiecie umożliwia korzystanie z biblioteki
28 PCRE (wyrażenia regularne kompatybilne z Perlem), która jest z kolei
29 napisana w C. Może być ona używana do dopasowywania wyrażeń
30 regularnych napisanym w ,,stylu Perla''.
31
32 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
33 używających tej biblioteki.
34
35 %package devel
36 Summary:        PCRE binding for OCaml - development part
37 Summary(pl.UTF-8):      Wiązania PCRE dla OCamla - cześć programistyczna
38 Group:          Development/Libraries
39 Requires:       %{name} = %{version}-%{release}
40 %requires_eq    ocaml
41
42 %description devel
43 This OCaml-library interfaces the PCRE (Perl-compatibility regular
44 expressions) library which is written in C. It can be used for
45 matching regular expressions which are written in "Perl"-style.
46
47 This package contains files needed to develop OCaml programs using
48 this library.
49
50 %description devel -l pl.UTF-8
51 Biblioteka zawarta w tym pakiecie umożliwia korzystanie z biblioteki
52 PCRE (wyrażenia regularne kompatybilne z Perlem), która jest z kolei
53 napisana w C. Może być ona używana do dopasowywania wyrażeń
54 regularnych napisanym w ,,stylu Perla''.
55
56 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
57 tej biblioteki.
58
59 %prep
60 %setup -q -n pcre-ocaml-release-%{version}
61
62 %build
63 %{__make} -j1 all \
64         CC="%{__cc}" \
65         CFLAGS="%{rpmcflags} -fPIC -DPIC"
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{site-lib/pcre,stublibs}
70
71 %{__make} install \
72         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
73
74 install lib/pcre.cmx $RPM_BUILD_ROOT%{_libdir}/ocaml/pcre
75 rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/pcre/*.mli
76
77 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
78 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
79 # Makefiles there ain't usable
80 rm -f $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*/Makefile
81
82 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/pcre/META \
83         $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/pcre/
84 echo 'directory = "+pcre"' >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/pcre/META
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(644,root,root,755)
91 %doc README.txt Changelog
92 %dir %{_libdir}/ocaml/pcre
93 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
94
95 %files devel
96 %defattr(644,root,root,755)
97 %doc lib/*.mli
98 %{_libdir}/ocaml/pcre/*.cm[ixa]*
99 %{_libdir}/ocaml/pcre/*.a
100 %{_libdir}/ocaml/site-lib/pcre
101 %{_examplesdir}/%{name}-%{version}
This page took 0.023684 seconds and 2 git commands to generate.