74ee164
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
74ee164
%if !%{opt}
74ee164
%global debug_package %{nil}
74ee164
%endif
74ee164
74ee164
Name:           ocaml-cppo
0d9f80b
Version:        1.5.0
5a69756
Release:        7%{?dist}
74ee164
Summary:        Equivalent of the C preprocessor for OCaml programs
74ee164
74ee164
License:        BSD
74ee164
URL:            http://mjambon.com/cppo.html
7e4bb93
Source0:        https://github.com/mjambon/cppo/archive/v%{version}.tar.gz
74ee164
74ee164
BuildRequires:  ocaml >= 3.10.0
74ee164
BuildRequires:  ocaml-findlib
74ee164
%if !%{opt}
74ee164
Requires:       ocaml >= 3.10.0
74ee164
%endif
74ee164
74ee164
%define libname %(sed -e 's/^ocaml-//' <<< %{name})
74ee164
74ee164
%description
74ee164
Cppo is an equivalent of the C preprocessor targeted at the OCaml
74ee164
language and its variants.
74ee164
74ee164
The main purpose of cppo is to provide a lightweight tool for simple
74ee164
macro substitution (#define) and file inclusion (#include) for the
74ee164
occasional case when this is useful in OCaml. Processing specific
74ee164
sections of files by calling external programs is also possible via
74ee164
#ext directives.
74ee164
74ee164
The implementation of cppo relies on the standard library of OCaml and
74ee164
on the standard parsing tools Ocamllex and Ocamlyacc, which contribute
74ee164
to the robustness of cppo across OCaml versions.
74ee164
74ee164
74ee164
%prep
74ee164
%setup -q -n %{libname}-%{version}
74ee164
sed -i.add-debuginfo \
74ee164
    's/ocamlopt/ocamlopt -g/;s/ocamlc \(-[co]\)/ocamlc -g \1/' \
74ee164
    Makefile
74ee164
74ee164
74ee164
%build
74ee164
%if %opt
74ee164
make %{?_smp_mflags} opt
74ee164
%else
74ee164
make %{?_smp_mflags} all
74ee164
%endif
74ee164
74ee164
74ee164
%install
74ee164
%{__install} -d $RPM_BUILD_ROOT%{_bindir}
74ee164
%{__install} -p cppo $RPM_BUILD_ROOT%{_bindir}/
74ee164
74ee164
74ee164
%check
74ee164
make test
74ee164
74ee164
74ee164
%files
041a3eb
%doc LICENSE README.md Changes
74ee164
%{_bindir}/cppo
74ee164
74ee164
74ee164
%changelog
5a69756
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-7
5a69756
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5a69756
662c63f
* Tue Nov 07 2017 Richard W.M. Jones <rjones@redhat.com> - 1.5.0-6
662c63f
- OCaml 4.06.0 rebuild.
662c63f
0612aab
* Mon Aug 07 2017 Richard W.M. Jones <rjones@redhat.com> - 1.5.0-5
0612aab
- OCaml 4.05.0 rebuild.
0612aab
003be6d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-4
003be6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
003be6d
c5c4afb
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-3
c5c4afb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c5c4afb
758d4f5
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 1.5.0-2
758d4f5
- OCaml 4.04.2 rebuild.
758d4f5
0d9f80b
* Thu May 11 2017 Richard W.M. Jones <rjones@redhat.com> - 1.5.0-1
0d9f80b
- New upstream version 1.5.0 (for OCaml 4.04.1).
0d9f80b
567e7dc
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
567e7dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
567e7dc
7e4bb93
* Sat Nov 05 2016 Richard W.M. Jones <rjones@redhat.com> - 1.4.0-1
7e4bb93
- New upstream version 1.4.0.
7e4bb93
- Fix download source URL.
7e4bb93
501edd6
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-3
501edd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
501edd6
067a0be
* Tue Jul 28 2015 Richard W.M. Jones <rjones@redhat.com> - 1.1.2-2
067a0be
- OCaml 4.02.3 rebuild.
067a0be
d00d9fe
* Fri Jul 24 2015 Richard W.M. Jones <rjones@redhat.com> - 1.1.2-1
d00d9fe
- New upstream release 1.1.2.
d00d9fe
48c1bb5
* Wed Jun 24 2015 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-4
48c1bb5
- ocaml-4.02.2 final rebuild.
48c1bb5
b2c2c4a
* Wed Jun 17 2015 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-3
b2c2c4a
- ocaml-4.02.2 rebuild.
b2c2c4a
e4738d4
* Tue Feb 17 2015 Richard W.M. Jones <rjones@redhat.com> - 1.0.1-2
e4738d4
- ocaml-4.02.1 rebuild.
e4738d4
296421c
* Mon Nov  3 2014 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.0.1-1
041a3eb
- Update to 1.0.1
041a3eb
0c0d3e2
* Sat Aug 30 2014 Richard W.M. Jones <rjones@redhat.com> - 0.9.3-9
0c0d3e2
- ocaml-4.02.0 final rebuild.
0c0d3e2
e240f41
* Sat Aug 23 2014 Richard W.M. Jones <rjones@redhat.com> - 0.9.3-8
e240f41
- ocaml-4.02.0+rc1 rebuild.
e240f41
c17390b
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-7
c17390b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
c17390b
2c16826
* Sat Aug 02 2014 Richard W.M. Jones <rjones@redhat.com> - 0.9.3-6
2c16826
- ocaml-4.02.0-0.8.git10e45753.fc22 rebuild.
2c16826
9fb3676
* Mon Jul 28 2014 Richard W.M. Jones <rjones@redhat.com> - 0.9.3-5
9fb3676
- Rebuild for OCaml 4.02.0 beta.
9fb3676
c97960d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-4
c97960d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c97960d
Jaromir Capik 5372a6b
* Thu Apr 24 2014 Jaromir Capik <jcapik@redhat.com> - 0.9.3-3
Jaromir Capik 5372a6b
- Removing ExclusiveArch
Jaromir Capik 5372a6b
74ee164
* Mon Jan 27 2014 Michel Salim <salimma@fedoraproject.org> - 0.9.3-2
74ee164
- Incorporate review feedback
74ee164
74ee164
* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 0.9.3-1
74ee164
- Initial package