ocaml-sedlex/ocaml-sedlex.spec
Fedora Release Engineering 1a21f78c2b - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-08 08:58:21 +00:00

95 lines
2.3 KiB
RPMSpec

Name: ocaml-sedlex
Version: 1.99.4
Release: 2%{?dist}
Summary: Unicode-friendly lexer generator
License: MIT
URL: https://github.com/alainfrisch/sedlex
Source0: https://github.com/alainfrisch/sedlex/archive/v%{version}/%{name}-%{version}.tar.gz
# add -g when calling ocamlopt
Patch0: native_debug.diff
BuildRequires: ocaml
BuildRequires: ocaml-findlib
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-result-devel
BuildRequires: ocaml-migrate-parsetree-devel
BuildRequires: ocaml-ppx-tools-versioned-devel
BuildRequires: ocaml-gen-devel
%description
A lexer generator for OCaml, similar to ocamllex, but supporting Unicode.
Contrary to ocamllex, lexer specifications for sedlex are embedded in
regular OCaml source files.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature
files for developing applications that use %{name}.
%prep
%setup -q -n sedlex-%{version}
%patch0 -p1
# spurious-executable-perm
chmod a-x src/syntax/sedlex_cset.ml
%build
%make_build
%ifarch %{ocaml_native_compiler}
%make_build opt
%endif
%install
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
# don't use make_install macro since it passes INSTALL,
# which is used differently in the Makefile
%ifarch %{ocaml_native_compiler}
make install
%else
make install_byteonly
%endif
# Makes *.cmxs and *.opt executable such that they will be stripped.
find $RPM_BUILD_ROOT -name '*.{cmxs,opt}' -exec chmod 0755 {} \;
%files
%doc README.md CHANGES
%license LICENSE
%{_libdir}/ocaml/*
%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/*/*.a
%exclude %{_libdir}/ocaml/*/*.cmxa
%exclude %{_libdir}/ocaml/*/*.cmx
%endif
%files devel
%doc README.md CHANGES
%license LICENSE
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.a
%{_libdir}/ocaml/*/*.cmxa
%{_libdir}/ocaml/*/*.cmx
%endif
%changelog
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.99.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 12 2018 Andy Li <andy@onthewings.net> - 1.99.4-1
- Initial RPM release.