Initial import (rhbz#1477363).
This commit is contained in:
parent
124dcbbab8
commit
bbeca4cf86
|
@ -0,0 +1 @@
|
|||
/ocaml-cmdliner-1.0.2.tar.gz
|
|
@ -0,0 +1,131 @@
|
|||
Name: ocaml-cmdliner
|
||||
Version: 1.0.2
|
||||
Release: 5%{?dist}
|
||||
Summary: Declarative definition of command line interfaces for OCaml
|
||||
|
||||
# In order for this to work as a "global" macro it has to come after the
|
||||
# definition of Name:, evidently.
|
||||
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
|
||||
|
||||
License: ISC
|
||||
URL: https://github.com/dbuenzli/cmdliner/
|
||||
Source0: https://github.com/dbuenzli/%{libname}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: ocaml
|
||||
BuildRequires: ocaml-findlib-devel
|
||||
BuildRequires: ocaml-ocamlbuild
|
||||
BuildRequires: ocaml-result-devel
|
||||
|
||||
%description
|
||||
Cmdliner allows the declarative definition of command line
|
||||
interfaces for OCaml.
|
||||
|
||||
It provides a simple and compositional mechanism to convert
|
||||
command line arguments to OCaml values and pass them to your
|
||||
functions. The module automatically handles syntax errors,
|
||||
help messages and UNIX man page generation. It supports
|
||||
programs with single or multiple commands and respects
|
||||
most of the POSIX and GNU conventions.
|
||||
|
||||
Cmdliner has no dependencies and is distributed under
|
||||
the ISC license.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and signature files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{libname}-%{version}
|
||||
|
||||
# The makefile requires some cleanup to put things in correct place.
|
||||
sed 's,/lib/,/%{_lib}/,g' -i Makefile
|
||||
|
||||
# Enable debuginfo generation.
|
||||
sed 's/, package(result)/, package(result), debug/g' -i _tags
|
||||
sed 's/ocamlbuild/ocamlbuild -lflag -g/g' -i Makefile
|
||||
|
||||
# Use install -p.
|
||||
sed 's/INSTALL=install/INSTALL=install -p/g' -i Makefile
|
||||
|
||||
%build
|
||||
make build-byte %{?_smp_mflags}
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
make build-native %{?_smp_mflags}
|
||||
%endif
|
||||
|
||||
%ifarch %{ocaml_natdynlink}
|
||||
make build-native-dynlink %{?_smp_mflags}
|
||||
%endif
|
||||
|
||||
%install
|
||||
make install-common DESTDIR=%{buildroot}
|
||||
make install-byte DESTDIR=%{buildroot}
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
make install-native DESTDIR=%{buildroot}
|
||||
%endif
|
||||
|
||||
%ifarch %{ocaml_natdynlink}
|
||||
make install-native-dynlink DESTDIR=%{buildroot}
|
||||
%endif
|
||||
|
||||
# Fix some spurious executable perms?
|
||||
chmod -x %{buildroot}%{_libdir}/ocaml/%{libname}/*.cmx
|
||||
chmod -x %{buildroot}%{_libdir}/ocaml/%{libname}/*.cmxa
|
||||
chmod -x %{buildroot}%{_libdir}/ocaml/%{libname}/*.mli
|
||||
chmod -x %{buildroot}%{_libdir}/ocaml/%{libname}/*.a
|
||||
chmod -x %{buildroot}%{_libdir}/ocaml/%{libname}/META
|
||||
chmod -x %{buildroot}%{_libdir}/ocaml/%{libname}/opam
|
||||
|
||||
%files
|
||||
%license LICENSE.md
|
||||
%doc README.md CHANGES.md
|
||||
%{_libdir}/ocaml/%{libname}
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%exclude %{_libdir}/ocaml/%{libname}/*.a
|
||||
%exclude %{_libdir}/ocaml/%{libname}/*.cmxa
|
||||
%exclude %{_libdir}/ocaml/%{libname}/*.cmx
|
||||
%endif
|
||||
%exclude %{_libdir}/ocaml/%{libname}/*.mli
|
||||
|
||||
%files devel
|
||||
%doc README.md CHANGES.md
|
||||
%license LICENSE.md
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_libdir}/ocaml/%{libname}/*.a
|
||||
%{_libdir}/ocaml/%{libname}/*.cmxa
|
||||
%{_libdir}/ocaml/%{libname}/*.cmx
|
||||
%endif
|
||||
%{_libdir}/ocaml/%{libname}/*.mli
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Nov 25 2017 Ben Rosser <rosser.bjr@gmail.com> 1.0.2-5
|
||||
- Added archful dependency (isa) on main package to devel package.
|
||||
- Added documentation line to devel package.
|
||||
|
||||
* Sat Sep 02 2017 Ben Rosser <rosser.bjr@gmail.com> 1.0.2-4
|
||||
- Add result dependency, now that ocaml-result is packaged.
|
||||
|
||||
* Tue Aug 15 2017 Ben Rosser <rosser.bjr@gmail.com> 1.0.2-3
|
||||
- Fix debuginfo generation by not blindly chmod -x all the files.
|
||||
- Pass -g to the link step of ocamlbuild as well as the compilation step.
|
||||
- Use ocaml_natdynlink macro to determine when to compile the *.cmxs files.
|
||||
- Modify the makefile to use install -p instead of just install.
|
||||
- Switch License tag to the more correct ISC license.
|
||||
- Added parallel build macro to make invocation.
|
||||
- Made libname macro a global rather than a define.
|
||||
|
||||
* Fri Aug 11 2017 Ben Rosser <rosser.bjr@gmail.com> 1.0.2-2
|
||||
- Attempt debuginfo generation by setting true : debug in tags file.
|
||||
- Modernize ocaml packaging: use ocaml_native_compiler macro.
|
||||
- Also remove old ocaml dependency generator scripts.
|
||||
|
||||
* Fri Aug 11 2017 Ben Rosser <rosser.bjr@gmail.com> 1.0.2-1
|
||||
- Update to latest upstream release.
|
||||
|
||||
* Tue Aug 1 2017 Ben Rosser <rosser.bjr@gmail.com> 1.0.0-1.20170801git8c4bc23
|
||||
- Initial package.
|
Loading…
Reference in New Issue