OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-findlib?expand=0&rev=7
158 lines
5.0 KiB
RPMSpec
158 lines
5.0 KiB
RPMSpec
#
|
|
# spec file for package ocaml-findlib
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2010-2011 Andrew Psaltis <ampsaltis at gmail dot com>
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
# Permission is hereby granted, free of charge, to any person
|
|
# obtaining a copy of this software and associated documentation files
|
|
# (the "Software"), to deal in the Software without restriction,
|
|
# including without limitation the rights to use, copy, modify, merge,
|
|
# publish, distribute, sublicense, and/or sell copies of the Software,
|
|
# and to permit persons to whom the Software is furnished to do so,
|
|
# subject to the following conditions:
|
|
|
|
# The above copyright notice and this permission notice shall be
|
|
# included in all copies or substantial portions of the Software.
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
# SOFTWARE.
|
|
|
|
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
|
|
|
Name: ocaml-findlib
|
|
Version: 1.3.3
|
|
Release: 0
|
|
Summary: Objective CAML package manager and build helper
|
|
License: MIT
|
|
Group: Development/Libraries/Other
|
|
|
|
Url: http://projects.camlcity.org/projects/findlib.html
|
|
Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
ExcludeArch: sparc64 s390 s390x
|
|
|
|
Provides: ocamlfind = %{version}
|
|
|
|
BuildRequires: camlp4
|
|
BuildRequires: ocaml
|
|
#BuildRequires: labltk
|
|
BuildRequires: gawk
|
|
BuildRequires: m4
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: ocaml-ocamldoc
|
|
|
|
%description
|
|
Findlib is a library manager for Objective Caml. It provides a
|
|
convention how to store libraries, and a file format ("META") to
|
|
describe the properties of libraries. There is also a tool (ocamlfind)
|
|
for interpreting the META files, so that it is very easy to use
|
|
libraries in programs and scripts.
|
|
|
|
|
|
%package devel
|
|
Summary: Development files for %{name}
|
|
Group: Development/Libraries/Other
|
|
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 findlib-%{version}
|
|
|
|
%build
|
|
(cd tools/extract_args && make)
|
|
tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmktop ocamlopt ocamldep ocamldoc ||:
|
|
#cat src/findlib/ocaml_args.ml
|
|
./configure -config %{_sysconfdir}/ocamlfind.conf \
|
|
-bindir %{_bindir} \
|
|
-sitelib `ocamlc -where` \
|
|
-mandir %{_mandir} \
|
|
-with-toolbox
|
|
make all
|
|
%if %opt
|
|
make opt
|
|
%endif
|
|
rm doc/guide-html/TIMESTAMP
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
# Grrr destdir grrrr
|
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
make install prefix=$RPM_BUILD_ROOT OCAMLFIND_BIN=$RPM_BUILD_ROOT%{_bindir}
|
|
mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
|
|
|
|
strip $RPM_BUILD_ROOT%{_bindir}/ocamlfind
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE doc/README
|
|
%config(noreplace) %{_sysconfdir}/ocamlfind.conf
|
|
%{_bindir}/*
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man5/*
|
|
# Needed for Factory (or 11.4)
|
|
%{_libdir}/ocaml/bigarray
|
|
%{_libdir}/ocaml/dbm
|
|
%{_libdir}/ocaml/dynlink
|
|
%{_libdir}/ocaml/graphics
|
|
%{_libdir}/ocaml/num
|
|
%{_libdir}/ocaml/stdlib
|
|
%{_libdir}/ocaml/str
|
|
%{_libdir}/ocaml/unix
|
|
%{_libdir}/ocaml/camlp4
|
|
%{_libdir}/ocaml/ocamlbuild
|
|
%{_libdir}/ocaml/threads
|
|
%{_libdir}/ocaml/topfind
|
|
%{_libdir}/ocaml/findlib
|
|
%if %opt
|
|
%exclude %{_libdir}/ocaml/findlib/*.a
|
|
%exclude %{_libdir}/ocaml/findlib/*.cmxa
|
|
%endif
|
|
%exclude %{_libdir}/ocaml/findlib/*.mli
|
|
%exclude %{_libdir}/ocaml/findlib/Makefile.config
|
|
%{_libdir}/ocaml/num-top
|
|
# These are for the labltk-dependent stuff
|
|
#%%exclude %%{_libdir}/ocaml/findlib/make_wizard
|
|
#%%exclude %%{_libdir}/ocaml/findlib/make_wizard.pattern
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE doc/README doc/guide-html
|
|
%if %opt
|
|
%{_libdir}/ocaml/findlib/*.a
|
|
%{_libdir}/ocaml/findlib/*.cmxa
|
|
%endif
|
|
%{_libdir}/ocaml/findlib/*.mli
|
|
%{_libdir}/ocaml/findlib/Makefile.config
|
|
# These are for the labltk-dependent stuff
|
|
#%%{_libdir}/ocaml/findlib/make_wizard
|
|
#%%{_libdir}/ocaml/findlib/make_wizard.pattern
|
|
|
|
%changelog
|