summaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--ocaml/0install.spec289
-rw-r--r--ocaml/ocaml-biniou.spec102
-rw-r--r--ocaml/ocaml-cppo.spec62
-rw-r--r--ocaml/ocaml-easy-format.spec95
-rw-r--r--ocaml/ocaml-xmlm.spec87
-rw-r--r--ocaml/ocaml-yojson.spec96
6 files changed, 731 insertions, 0 deletions
diff --git a/ocaml/0install.spec b/ocaml/0install.spec
new file mode 100644
index 0000000..5d94ba7
--- /dev/null
+++ b/ocaml/0install.spec
@@ -0,0 +1,289 @@
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%global cache_dir /var/cache/0install.net
+
+Name: 0install
+Version: 2.5.1
+Release: 1%{?dist}
+Summary: A decentralized cross-distribution software installation system
+
+License: LGPLv2
+URL: http://0install.net
+Source0: http://downloads.sf.net/project/zero-install/%{name}/%{version}/%{name}-%{version}.tar.bz2
+Patch0: %{name}-2.5.1-destdir.patch
+
+#BuildArch:
+BuildRequires: python-devel
+BuildRequires: ocaml >= 3.10.0
+BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-camlp4-devel
+BuildRequires: ocaml-curl-devel
+BuildRequires: ocaml-extlib-devel
+BuildRequires: ocaml-lwt-devel
+BuildRequires: ocaml-ounit-devel
+BuildRequires: ocaml-ssl-devel
+BuildRequires: ocaml-xmlm-devel
+BuildRequires: ocaml-yojson-devel
+BuildRequires: libev-devel
+BuildRequires: gettext
+BuildRequires: desktop-file-utils
+
+Requires(pre): shadow-utils
+
+# for icons
+Requires: hicolor-icon-theme
+
+Provides: zeroinstall-injector = %{version}-%{release}
+Obsoletes: zeroinstall-injector < %{version}-%{release}
+
+%description
+Zero Install is a decentralised cross-distribution software
+installation system available under the LGPL. It allows software
+developers to publish programs directly from their own web-sites,
+while supporting features familiar from centralised distribution
+repositories such as shared libraries, automatic updates and digital
+signatures. It is intended to complement, rather than replace, the
+operating system's package management. 0install packages never
+interfere with those provided by the distribution.
+
+0install does not define a new packaging format; unmodified tarballs
+or zip archives can be used. Instead, it defines an XML metadata
+format to describe these packages and the dependencies between them. A
+single metadata file can be used on multiple platforms (e.g. Ubuntu,
+Debian, Fedora, openSUSE, Mac OS X and Windows), assuming binary or
+source archives are available that work on those systems.
+
+0install also has some interesting features not often found in
+traditional package managers. For example, while it will share
+libraries whenever possible, it can always install multiple versions
+of a package in parallel when there are conflicting
+requirements. Installation is always side-effect-free (each package is
+unpacked to its own directory and will not touch shared directories
+such as /usr/bin), making it ideal for use with sandboxing
+technologies and virtualisation.
+
+The XML file describing the program's requirements can also be
+included in a source-code repository, allowing full dependency
+handling for unreleased developer versions. For example, a user can
+clone a Git repository and build and test the program, automatically
+downloading newer versions of libraries where necessary, without
+interfering with the versions of those libraries installed by their
+distribution, which continue to be used for other software.
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .destdir
+
+
+%build
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+desktop-file-validate \
+ $RPM_BUILD_ROOT%{_datadir}/applications/0install.desktop
+
+%find_lang zero-install
+
+
+%pre
+# Add the "zeroinst" user.
+# This is not used by default, but is required if you want to
+# set up sharing of downloads later.
+getent group zeroinst >/dev/null || groupadd -r zeroinst
+getent passwd zeroinst >/dev/null || \
+useradd -r -g zeroinst -d %{cache_dir} -s /sbin/nologin \
+ -c "Zero Install shared cache" zeroinst
+exit 0
+
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+
+%files -f zero-install.lang
+%doc COPYING README.md
+%{_bindir}/0*
+%{python_sitelib}/*
+%{_datadir}/applications/0install.desktop
+%{_datadir}/icons/hicolor/*/apps/zeroinstall.*
+%dir %{_datadir}/bash-completion
+%dir %{_datadir}/bash-completion/completions
+%{_datadir}/bash-completion/completions/0*
+%dir %{_datadir}/fish
+%dir %{_datadir}/fish/completions
+%{_datadir}/fish/completions/0*.fish
+%dir %{_datadir}/zsh
+%dir %{_datadir}/zsh/site-functions
+%{_datadir}/zsh/site-functions/_0*
+%{_mandir}/man1/0*
+%dir %{cache_dir}
+%attr(755,zeroinst,zeroinst) %{cache_dir}/implementations
+
+
+%changelog
+* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 2.5.1-1
+- Rename package to 0install
+- Update to 2.5.1
+
+* Wed Aug 14 2013 Michel Salim <salimma@fedoraproject.org> - 2.3.3-1
+- Update to 2.3.3
+
+* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Fri Jul 5 2013 Michel Salim <salimma@fedoraproject.org> - 2.3-1
+- Update to 2.3
+
+* Mon May 6 2013 Michel Salim <salimma@fedoraproject.org> - 2.2-1
+- Update to 2.2
+
+* Fri Apr 5 2013 Michel Salim <salimma@fedoraproject.org> - 2.1-1
+- Update to 2.1
+
+* Wed Mar 6 2013 Michel Salim <salimma@fedoraproject.org> - 2.0-1
+- Update to 2.0
+
+* Mon Feb 25 2013 Michel Salim <salimma@fedoraproject.org> - 1.16-1
+- Update to 1.16
+
+* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Mon Nov 19 2012 Michel Salim <salimma@fedoraproject.org> - 1.13-1
+- Update to 1.13
+
+* Wed Sep 5 2012 Michel Salim <salimma@fedoraproject.org> - 1.11-1
+- Update to 1.11
+
+* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Fri Jun 29 2012 Michel Salim <salimma@fedoraproject.org> - 1.9-1
+- Update to 1.9
+- Remove redundant %%{python_sitelib} declaration
+
+* Wed May 23 2012 Michel Salim <salimma@fedoraproject.org> - 1.8-1
+- Update to 1.8
+
+* Tue Apr 24 2012 Michel Salim <salimma@fedoraproject.org> - 1.7-1
+- Update to 1.7
+
+* Thu Jan 26 2012 Michel Salim <salimma@fedoraproject.org> - 1.5-2
+- Prune dependencies
+
+* Thu Jan 26 2012 Michel Salim <salimma@fedoraproject.org> - 1.5-1
+- Update to 1.5
+
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Mon Jul 25 2011 Michel Salim <salimma@fedoraproject.org> - 1.2-1
+- Update to 1.2
+
+* Sat Jul 2 2011 Michel Salim <salimma@fedoraproject.org> - 1.1-2
+- Further launcher script clean-up
+
+* Wed Jun 29 2011 Michel Salim <salimma@fedoraproject.org> - 1.1-1
+- Update to 1.1
+- Remove --versions option, obsoleted in favor of '0alias launcher'
+
+* Wed Jun 22 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-3
+- Fix --versions handling of 0alias-generated launchers
+
+* Wed Jun 15 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-2
+- Add main category "System" to desktop entries
+
+* Tue Jun 14 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-1
+- Update to 1.0
+
+* Tue May 3 2011 Michel Salim <salimma@fedoraproject.org> - 1.0-0.rc1.1
+- Update to 1.0rc1
+
+* Thu Mar 17 2011 Michel Salim <salimma@fedoraproject.org> - 0.53-1
+- Update to 0.53
+
+* Sun Mar 13 2011 Michel Salim <salimma@fedoraproject.org> - 0.52-1
+- Update to 0.52
+
+* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.49-3
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+
+* Fri Jul 9 2010 Michel Salim <salimma@fedoraproject.org> - 0.49-2
+- Enable tests
+
+* Fri Jul 9 2010 Michel Salim <salimma@fedoraproject.org> - 0.49-1
+- Update to 0.49
+
+* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.38-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Sat Feb 28 2009 Michel Salim <salimma@fedoraproject.org> - 0.38-2
+- Workaround for RHEL's desktop-file-utils
+- Add missing dependency on xdg-utils
+
+* Fri Feb 27 2009 Michel Salim <salimma@fedoraproject.org> - 0.38-1
+- Update to 0.38
+- Upgrades now preserve the existing menu, if modified
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.34-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.34-2
+- Rebuild for Python 2.6
+
+* Sun Aug 3 2008 Michel Alexandre Salim <salimma@fedoraproject.org> - 0.34-1
+- Update to 0.34
+
+* Sat Apr 5 2008 Michel Salim <salimma@fedoraproject.org> - 0.32-1
+- Update to 0.32
+- Package .egg-info file on Fedora >= 9
+
+* Fri Jan 18 2008 Michel Salim <michel.sylvan@gmail.com> - 0.31-1
+- Update to 0.31
+
+* Sat Sep 8 2007 Michel Salim <michel.sylvan@gmail.com> 0.30-2
+- Update scriptlet that creates zeroinst user
+
+* Wed Sep 5 2007 Michel Salim <michel.sylvan@gmail.com> 0.30-1
+- Update to 0.30
+- License is now versioned
+- Incorporate changes from Thomas Leonard:
+ * create zeroinst user
+ * create shared cache
+
+* Mon Dec 18 2006 Michel Salim <michel.salim@gmail.com> 0.24-3
+- Rebuild for development branch
+
+* Sat Nov 11 2006 Michel Salim <michel.salim@gmail.com> 0.24-2
+- Allow installation of ix86 binaries on x86_64
+
+* Sat Nov 4 2006 Michel Salim <michel.salim@gmail.com> 0.24-1
+- Update to 0.24
+- Not ghosting .pyos any longer
+
+* Sun Oct 8 2006 Michel Salim <michel.salim@gmail.com> 0.23-1
+- Update to 0.23
+
+* Sun Mar 5 2006 Michel Salim <michel.salim@gmail.com> 0.18-4
+- Removed left-behind pushd and popd
+
+* Sat Feb 25 2006 Michel Salim <michel.salim@gmail.com> 0.18-3
+- Add Python-related requirements, BuildReq on gnupg to decrypt upstream source
+
+* Sat Feb 18 2006 Michel Salim <michel.salim@gmail.com> 0.18-2
+- Use _mandir, discard CFLAGS and unused python_sitearch definition
+
+* Thu Feb 16 2006 Michel Salim <michel.salim@gmail.com> 0.18-1
+- Initial Fedora Extras release, based on upstream spec contributed by Juan Carlos Jimenez Garcia
diff --git a/ocaml/ocaml-biniou.spec b/ocaml/ocaml-biniou.spec
new file mode 100644
index 0000000..89bd77d
--- /dev/null
+++ b/ocaml/ocaml-biniou.spec
@@ -0,0 +1,102 @@
+%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-biniou
+Version: 1.0.9
+Release: 1%{?dist}
+Summary: Safe and fast binary data format
+
+License: BSD
+URL: http://mjambon.com/biniou.html
+Source0: http://mjambon.com/releases/biniou/biniou-%{version}.tar.gz
+Patch0: %{libname}-1.0.9-destdir.patch
+
+BuildRequires: ocaml >= 3.10.0
+BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-easy-format-devel
+BuildRequires: ocaml-ocamldoc
+BuildRequires: chrpath
+
+%description
+Biniou (pronounced "be new") is a binary data format designed for
+speed, safety, ease of use and backward compatibility as protocols
+evolve. Biniou is vastly equivalent to JSON in terms of functionality
+but allows implementations several times faster (4 times faster than
+yojson), with 25-35% space savings.
+
+Biniou data can be decoded into human-readable form without knowledge
+of type definitions except for field and variant names which are
+represented by 31-bit hashes. A program named bdump is provided for
+routine visualization of biniou data files.
+
+The program atdgen can be used to derive OCaml-Biniou serializers and
+deserializers from type definitions.
+
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and signature files for
+developing applications that use %{name}.
+
+
+%prep
+%setup -q -n %{libname}-%{version}
+%patch0 -p1 -b .destdir
+
+
+%build
+# You may need a %%configure step here (or ./configure if it doesn't work).
+make
+%if %opt
+make opt
+%endif
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+# These rules work if the library uses 'ocamlfind install' to install itself.
+export DESTDIR=$RPM_BUILD_ROOT
+export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $OCAMLFIND_DESTDIR
+make install
+
+strip $RPM_BUILD_ROOT%{_bindir}/bdump
+strip $OCAMLFIND_DESTDIR/%{libname}/*.cmxs
+#chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
+
+
+%files
+%doc LICENSE
+%{_bindir}/bdump
+%{_libdir}/ocaml/%{libname}/
+%if %opt
+%exclude %{_libdir}/ocaml/*/*.a
+%exclude %{_libdir}/ocaml/*/*.cmxa
+%exclude %{_libdir}/ocaml/*/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/*/*.mli
+%exclude %{_libdir}/ocaml/*/*.o
+
+
+%files devel
+%doc LICENSE README.md Changes
+%if %opt
+%{_libdir}/ocaml/*/*.a
+%{_libdir}/ocaml/*/*.cmxa
+%{_libdir}/ocaml/*/*.cmx
+%endif
+%{_libdir}/ocaml/*/*.mli
+%{_libdir}/ocaml/*/*.o
+
+
+%changelog
+* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 1.0.9-1
+- Initial package
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
diff --git a/ocaml/ocaml-easy-format.spec b/ocaml/ocaml-easy-format.spec
new file mode 100644
index 0000000..f710cb2
--- /dev/null
+++ b/ocaml/ocaml-easy-format.spec
@@ -0,0 +1,95 @@
+%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-easy-format
+Version: 1.0.2
+Release: 1%{?dist}
+Summary: High-level and functional interface to the Format module
+
+License: BSD
+URL: http://mjambon.com/easy-format.html
+Source0: http://mjambon.com/releases/easy-format/easy-format-1.0.2.tar.gz
+
+BuildRequires: ocaml >= 3.10.0
+BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-ocamldoc
+BuildRequires: chrpath
+
+%description
+This module offers a high-level and functional interface to the Format
+module of the OCaml standard library. It is a pretty-printing
+facility, i.e. it takes as input some code represented as a tree and
+formats this code into the most visually satisfying result, breaking
+and indenting lines of code where appropriate.
+
+Input data must be first modelled and converted into a tree using 3
+kinds of nodes:
+
+ atoms
+ lists
+ labelled nodes
+
+Atoms represent any text that is guaranteed to be printed as-is. Lists
+can model any sequence of items such as arrays of data or lists of
+definitions that are labelled with something like "int main", "let x
+=" or "x:".
+
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and signature files for
+developing applications that use %{name}.
+
+
+%prep
+%setup -q -n %{libname}-%{version}
+
+
+%build
+make
+%if %opt
+make opt
+%endif
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+# These rules work if the library uses 'ocamlfind install' to install itself.
+export DESTDIR=$RPM_BUILD_ROOT
+export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
+mkdir -p $OCAMLFIND_DESTDIR
+make install
+
+strip $OCAMLFIND_DESTDIR/%{libname}/*.cmxs
+#chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
+
+
+%files
+%doc LICENSE
+%{_libdir}/ocaml/%{libname}/
+%if %opt
+%exclude %{_libdir}/ocaml/*/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/*/*.mli
+%exclude %{_libdir}/ocaml/*/*.o
+
+
+%files devel
+%doc LICENSE README.md Changes
+%if %opt
+%{_libdir}/ocaml/*/*.cmx
+%endif
+%{_libdir}/ocaml/*/*.mli
+%{_libdir}/ocaml/*/*.o
+
+
+%changelog
+* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 1.0.2-1
+- Initial package
diff --git a/ocaml/ocaml-xmlm.spec b/ocaml/ocaml-xmlm.spec
new file mode 100644
index 0000000..28f0b07
--- /dev/null
+++ b/ocaml/ocaml-xmlm.spec
@@ -0,0 +1,87 @@
+%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-xmlm
+Version: 1.2.0
+Release: 1%{?dist}
+Summary: A streaming XML codec
+
+License: BSD
+URL: http://erratique.ch/software/xmlm
+Source0: http://erratique.ch/software/xmlm/releases/xmlm-%{version}.tbz
+
+BuildRequires: ocaml >= 3.10.0
+BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-ocamldoc
+BuildRequires: chrpath
+
+%description
+Xmlm is an OCaml streaming codec to decode and encode the XML data
+format. It can process XML documents without a complete in-memory
+representation of the data.
+
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and signature files for
+developing applications that use %{name}.
+
+
+%prep
+%setup -q -n xmlm-%{version}
+
+
+%build
+./pkg/build true
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+# These rules work if the library uses 'ocamlfind install' to install itself.
+export DESTDIR=$RPM_BUILD_ROOT
+export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $OCAMLFIND_DESTDIR/%{libname}
+
+cp -p _build/test/xmltrip.native $RPM_BUILD_ROOT%{_bindir}/xmltrip
+cp -p _build/pkg/META _build/src/xmlm.{a,cm*,mli} $OCAMLFIND_DESTDIR/%{libname}/
+
+strip $RPM_BUILD_ROOT%{_bindir}/xmltrip
+strip $OCAMLFIND_DESTDIR/%{libname}/xmlm.cmxs
+#chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
+
+
+%files
+# LICENSE not bundled
+#doc LICENSE
+%{_bindir}/xmltrip
+%{_libdir}/ocaml/xmlm/
+%if %opt
+%exclude %{_libdir}/ocaml/*/*.a
+%exclude %{_libdir}/ocaml/*/*.cmxa
+%exclude %{_libdir}/ocaml/*/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/*/*.mli
+
+
+%files devel
+# LICENSE not bundled
+%doc README.md CHANGES.md _build/test/examples.ml _build/test/xhtml.ml
+%if %opt
+%{_libdir}/ocaml/*/*.a
+%{_libdir}/ocaml/*/*.cmxa
+%{_libdir}/ocaml/*/*.cmx
+%endif
+%{_libdir}/ocaml/*/*.mli
+
+
+%changelog
+* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 1.2.0-1
+- Initial package
diff --git a/ocaml/ocaml-yojson.spec b/ocaml/ocaml-yojson.spec
new file mode 100644
index 0000000..70700e2
--- /dev/null
+++ b/ocaml/ocaml-yojson.spec
@@ -0,0 +1,96 @@
+%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-yojson
+Version: 1.1.8
+Release: 1%{?dist}
+Summary: An optimized parsing and printing library for the JSON format
+
+License: BSD
+URL: http://mjambon.com/yojson.html
+Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz
+Patch0: %{libname}-1.1.8-destdir.patch
+
+BuildRequires: ocaml >= 3.10.0
+BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-ocamldoc
+BuildRequires: ocaml-biniou-devel
+BuildRequires: ocaml-cppo
+BuildRequires: ocaml-easy-format-devel
+BuildRequires: chrpath
+
+%description
+Yojson is an optimized parsing and printing library for the JSON
+format. It addresses a few shortcomings of json-wheel including 2x
+speedup, polymorphic variants and optional syntax for tuples and
+variants.
+
+ydump is a pretty-printing command-line program provided with the
+yojson package.
+
+The program atdgen can be used to derive OCaml-JSON serializers and
+deserializers from type definitions.
+
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and signature files for
+developing applications that use %{name}.
+
+
+%prep
+%setup -q -n %{libname}-%{version}
+%patch0 -p1 -b .destdir
+
+
+%build
+make
+%if %opt
+make opt
+%endif
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+# These rules work if the library uses 'ocamlfind install' to install itself.
+export DESTDIR=$RPM_BUILD_ROOT
+export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $OCAMLFIND_DESTDIR
+make install
+
+strip $RPM_BUILD_ROOT%{_bindir}/ydump
+strip $OCAMLFIND_DESTDIR/%{libname}/*.cmxs
+#chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
+
+
+%files
+%doc LICENSE
+%{_bindir}/ydump
+%{_libdir}/ocaml/%{libname}/
+%if %opt
+%exclude %{_libdir}/ocaml/*/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/*/*.mli
+%exclude %{_libdir}/ocaml/*/*.o
+
+
+%files devel
+%doc LICENSE README.md Changes
+%if %opt
+%{_libdir}/ocaml/*/*.cmx
+%endif
+%{_libdir}/ocaml/*/*.mli
+%{_libdir}/ocaml/*/*.o
+
+
+%changelog
+* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 1.1.8-1
+- Initial package