summaryrefslogtreecommitdiffstats
path: root/ocaml/ocaml-cppo.spec
diff options
context:
space:
mode:
authorMichel Alexandre Salim <salimma@fedoraproject.org>2014-01-20 14:20:53 +0700
committerMichel Alexandre Salim <salimma@fedoraproject.org>2014-01-20 14:20:53 +0700
commit191de69dd9c4cc3edb07e59dd89d29b80a3cb5b1 (patch)
tree94a5b26b1a1702c3e31d252f0b8d83391ef07fc7 /ocaml/ocaml-cppo.spec
parent95f0db325c9b7302497b93607ce6d4bdae8f4cdc (diff)
downloadspecs-191de69dd9c4cc3edb07e59dd89d29b80a3cb5b1.tar.gz
specs-191de69dd9c4cc3edb07e59dd89d29b80a3cb5b1.tar.xz
specs-191de69dd9c4cc3edb07e59dd89d29b80a3cb5b1.zip
- Ocaml packages needed for 0install rewrite
- 0install 2.5.1 (superseding zero-install-injector 2.3.x)
Diffstat (limited to 'ocaml/ocaml-cppo.spec')
-rw-r--r--ocaml/ocaml-cppo.spec62
1 files changed, 62 insertions, 0 deletions
diff --git a/ocaml/ocaml-cppo.spec b/ocaml/ocaml-cppo.spec
new file mode 100644
index 0000000..2200fc8
--- /dev/null
+++ b/ocaml/ocaml-cppo.spec
@@ -0,0 +1,62 @@
+%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
+%global debug_package %{nil}
+%global _use_internal_dependency_generator 0
+%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
+%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh
+%define libname %(echo %{name} | sed -e 's/^ocaml-//')
+
+Name: ocaml-cppo
+Version: 0.9.3
+Release: 1%{?dist}
+Summary: Equivalent of the C preprocessor for OCaml programs
+
+License: BSD
+URL: http://mjambon.com/cppo.html
+Source0: http://mjambon.com/releases/cppo/cppo-%{version}.tar.gz
+
+BuildRequires: ocaml >= 3.10.0
+BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-ocamldoc
+BuildRequires: chrpath
+
+%description
+Cppo is an equivalent of the C preprocessor targeted at the OCaml
+language and its variants.
+
+The main purpose of cppo is to provide a lightweight tool for simple
+macro substitution (#define) and file inclusion (#include) for the
+occasional case when this is useful in OCaml. Processing specific
+sections of files by calling external programs is also possible via
+#ext directives.
+
+The implementation of cppo relies on the standard library of OCaml and
+on the standard parsing tools Ocamllex and Ocamlyacc, which contribute
+to the robustness of cppo across OCaml versions.
+
+
+%prep
+%setup -q -n %{libname}-%{version}
+
+
+%build
+make
+%if %opt
+make opt
+%endif
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+strip cppo
+%{__install} -d $RPM_BUILD_ROOT%{_bindir}
+%{__install} -p cppo $RPM_BUILD_ROOT%{_bindir}/
+
+
+%files
+%doc LICENSE README Changes
+%{_bindir}/cppo
+
+
+%changelog
+* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 0.9.3-1
+- Initial package