diff --git a/README.md b/README.md index 28a5576..bcdb9f3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # ocaml-pcre +This OCaml-library interfaces the C-library PCRE (Perl-compatibility Regular Expressions). +It can be used for matching regular expressions which are written in "PERL"-style. + diff --git a/ocaml-pcre.spec b/ocaml-pcre.spec new file mode 100644 index 0000000..dce04ce --- /dev/null +++ b/ocaml-pcre.spec @@ -0,0 +1,109 @@ +%define ocamlpck pcre + +Name: ocaml-pcre +Version: 7.0.4 +Release: 1mamba +Summary: Perl Compatibility Regular Expressions for OCaml +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://bitbucket.org/mmottl/pcre-ocaml +Source: https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-%{version}.tar.gz +License: BSD +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libpcre-devel +## AUTOBUILDREQ-END +BuildRequires: ocaml +BuildRequires: ocaml-ocamldoc +BuildRequires: ocaml-findlib +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +This OCaml-library interfaces the C-library PCRE (Perl-compatibility Regular Expressions). +It can be used for matching regular expressions which are written in "PERL"-style. + +%package devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +This package contains libraries and signature files for developing applications that use %{name}. + +%package apidocs +Group: Documentation +Summary: %{name} API documentation +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description apidocs +This package includes the %{name} API documentation. + +%prep +%setup -q -n pcre-ocaml-%{version} + +%build +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --destdir %{buildroot} \ + --disable-debug + +make all + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +export DESTDIR=%{buildroot} +export OCAMLFIND_DESTDIR=%{buildroot}$(ocamlfind printconf destdir) +export DLLDIR=$OCAMLFIND_DESTDIR/stublibs + +install -d $OCAMLFIND_DESTDIR/%{ocamlpck} +install -d $OCAMLFIND_DESTDIR/stublibs + +make install + +rm -fr %{buildroot}%{_datadir}/doc + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%dir %{_libdir}/ocaml/%{ocamlpck} +%{_libdir}/ocaml/%{ocamlpck}/META +%{_libdir}/ocaml/%{ocamlpck}/*.cma +%{_libdir}/ocaml/%{ocamlpck}/*.cmi +%{_libdir}/ocaml/%{ocamlpck}/*.cmxs +%{_libdir}/ocaml/stublibs/*.so* + +%files devel +%defattr(-,root,root) +%{_libdir}/ocaml/%{ocamlpck}/*.a +%{_libdir}/ocaml/%{ocamlpck}/*.cmx +%{_libdir}/ocaml/%{ocamlpck}/*.cmxa +%{_libdir}/ocaml/%{ocamlpck}/*.mli +%doc examples/ + +%files apidocs +%defattr(-,root,root) +%doc API.docdir/* + +%changelog +* Sat Dec 21 2013 Automatic Build System 7.0.4-1mamba +- automatic update by autodist + +* Sun Jun 23 2013 Davide Madrisan 7.0.2-5mamba +- install dll libs in stublibs because this directory is known by ocaml ans so we do not need to modify ld.conf + +* Sun Jun 23 2013 Davide Madrisan 7.0.2-4mamba +- provide a devel package + +* Sat Jun 22 2013 Davide Madrisan 7.0.2-3mamba +- install the files in in a path known by ocamlfind + +* Sat Jun 22 2013 openmamba WebBuild System 7.0.2-2mamba +- add build requirements + +* Wed Jan 23 2013 Silvan Calarco 7.0.2-1mamba +- package created by silvan using the webbuild interface