ocaml-cudf/ocaml-cudf.spec

112 lines
2.9 KiB
RPMSpec
Raw Normal View History

2017-08-28 22:19:21 +00:00
# cudf includes C bindings, but it produces a static library.
# therefore for now, we'll not build them.
Name: ocaml-cudf
Version: 0.9
Release: 1%{?dist}
Summary: Format for describing upgrade scenarios
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
# Linking exception, see included COPYING file.
License: LGPLv3+ with exceptions
URL: http://www.mancoosi.org/cudf/
Source0: https://gforge.inria.fr/frs/download.php/file/36602/cudf-0.9.tar.gz
BuildRequires: ocaml
BuildRequires: ocaml-ocamlbuild
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-extlib-devel
BuildRequires: ocaml-ounit-devel
# Depend on pod2man.
BuildRequires: /usr/bin/pod2man
%description
CUDF (for Common Upgradeability Description Format) is a format for
describing upgrade scenarios in package-based Free and Open Source
Software distribution.
In every such scenario there exists a package universe (i.e. a set
of packages) known to a package manager application, a package status
(i.e. the currently installed packages), and a user request (i.e. a
wish to change the set of installed packages) that need to be
fulfilled.
CUDF permits to describe an upgrade scenario in a way that is
both distribution-independent and package-manager-independent.
CUDF offers a rigorous semantics of dependency solving that
enables to independently check the correctness of upgrade
solutions proposed by package managers.
CUDF adoption would enable to share dependency solver components
across different package managers, both intra- and
inter-distributions.
%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
%autosetup -n %{libname}-%{version}
# Add debug tag.
sed 's/pkg_extlib/pkg_extlib, debug/g' -i _tags
%build
%make_build
%ifarch %{ocaml_native_compiler}
%make_build opt
%endif
%make_build doc
%install
make install DESTDIR=%{buildroot}
# Install the man page for cudf-check.
mkdir -p %{buildroot}%{_mandir}/man1
cp -a doc/cudf-check.1* %{buildroot}%{_mandir}/man1
# Remove .o files from cudf directory.
rm -rf %{buildroot}%{_libdir}/ocaml/cudf/*.o
%check
make test
%files
%license COPYING
%doc README
%{_bindir}/cudf-check
%{_mandir}/man1/cudf-check.1*
%{_bindir}/cudf-parse-822
%{_libdir}/ocaml/%{libname}
%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/*/*.a
%exclude %{_libdir}/ocaml/*/*.cmxa
%exclude %{_libdir}/ocaml/*/*.cmx
%endif
%exclude %{_libdir}/ocaml/*/*.mli
%files devel
# include API documentation here.
%doc cudf.docdir/*
%license COPYING
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/*/*.a
%{_libdir}/ocaml/*/*.cmxa
%{_libdir}/ocaml/*/*.cmx
%endif
%{_libdir}/ocaml/*/*.mli
%changelog
* Fri Aug 11 2017 Ben Rosser <rosser.bjr@gmail.com> 0.9-1
- Initial package.