-- Merge the camlp4 subpackage into the devel package because

-  camlp4 will disappear with ocaml 4.09

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-findlib?expand=0&rev=76
This commit is contained in:
Olaf Hering 2019-10-01 06:42:41 +00:00 committed by Git OBS Bridge
parent 46b9f471b4
commit 8f5151c572
2 changed files with 34 additions and 39 deletions

View File

@ -13,8 +13,6 @@ Mon Sep 23 16:35:39 UTC 2019 - ohering@suse.de
New "warning" property for packages. New "warning" property for packages.
Forgetting to pass -thread/-vmthread only prints a warning now, but doesn't stop the build. Forgetting to pass -thread/-vmthread only prints a warning now, but doesn't stop the build.
For dealing with case-sensitive filesystems it is now only tried to match ASCII characters, but not encoding-dependent characters. For dealing with case-sensitive filesystems it is now only tried to match ASCII characters, but not encoding-dependent characters.
- Merge the camlp4 subpackage into the devel package because
camlp4 will disappear with ocaml 4.09
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 22 13:24:21 UTC 2019 - ohering@suse.de Thu Aug 22 13:24:21 UTC 2019 - ohering@suse.de

View File

@ -37,11 +37,11 @@ Provides: ocamlfind = %{version}
BuildRequires: gawk BuildRequires: gawk
BuildRequires: m4 BuildRequires: m4
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: ocaml >= 4.02.0 BuildRequires: ocaml
BuildRequires: ocaml-camlp4-devel >= 4.02.0 BuildRequires: ocaml-camlp4-devel
BuildRequires: ocaml-ocamlbuild BuildRequires: ocaml-ocamlbuild
BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-rpm-macros >= 4.02.1 BuildRequires: ocaml-rpm-macros >= 20190930
%description %description
Findlib is a library manager for Objective Caml. It provides a Findlib is a library manager for Objective Caml. It provides a
@ -55,14 +55,18 @@ libraries in programs and scripts.
Summary: Development files for ocaml-findlib Summary: Development files for ocaml-findlib
Group: Development/Languages/OCaml Group: Development/Languages/OCaml
Requires: %{name} = %{version} Requires: %{name} = %{version}
Provides: %{name}-camlp4 = %{version}-%{release}
Obsoletes: %{name}-camlp4 < %{version}-%{release}
%{expand:%(if test -x "$(type -P camlp4)" ; then echo 'Requires: ocaml-camlp4-devel' ; fi)}
%description devel %description devel
The ocaml-findlib-devel package contains libraries and signature files The ocaml-findlib-devel package contains libraries and signature files
for developing applications that use ocaml-findlib. for developing applications that use ocaml-findlib.
%package camlp4
Summary: Development files for ocaml-findlib
Group: Development/Languages/OCaml
Requires: ocaml-camlp4-devel
%description camlp4
The ocaml-findlib-camlp4 contains signature files for developing applications that use camlp4
%prep %prep
%setup -q -n findlib-%{version} %setup -q -n findlib-%{version}
@ -82,49 +86,42 @@ make opt
rm doc/guide-html/TIMESTAMP rm doc/guide-html/TIMESTAMP
%install %install
make install prefix=$RPM_BUILD_ROOT make install prefix=%{buildroot}
rm -rfv $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlbuild rm -rfv %{buildroot}%{_libdir}/ocaml/ocamlbuild
%ocaml_create_file_list
> files cp %{name}.files %{name}.files.prev
> files.devel # camlp4 support nee
sed -i~ '
find $RPM_BUILD_ROOT%{_libdir}/ocaml -name META | \ /\/camlp4/ {
sed 's@^%{buildroot}@@' | \ w %{name}.files.camlp4
tee -a files
find $RPM_BUILD_ROOT%{_libdir}/ocaml -type d | \
sed 's@^%{buildroot}@%%dir @' | \
tee -a files
sed -i~ '/\/\(camlp4\|findlib\|num-top\)/{
w files.devel
d d
}' files }
/\/findlib/ {
b
}
/\/num-top/ {
b
}
w %{name}.files.x
d
' %{name}.files.devel
diff -u "$_"~ "$_" && exit 2 diff -u "$_"~ "$_" && exit 2
cat files.devel tee -a %{name}.files < %{name}.files.x
%files -f files %files -f %{name}.files
%doc doc/README %doc doc/README
%license LICENSE %license LICENSE
%{_libdir}/ocaml/ocamlfind.conf %{_libdir}/ocaml/ocamlfind.conf
%{_libdir}/ocaml/topfind
%{_bindir}/* %{_bindir}/*
%{_mandir}/man?/* %{_mandir}/man?/*
# #
%{_libdir}/ocaml/topfind
%if 0%{?ocaml_native_compiler}
%{_libdir}/ocaml/*/*.cmxs
%endif
%files devel -f files.devel %files devel -f %{name}.files.devel
%doc doc/README doc/guide-html %doc doc/README doc/guide-html
%{_libdir}/ocaml/*/Makefile.config %{_libdir}/ocaml/*/Makefile.config
#
%dir %{_libdir}/ocaml %files camlp4 -f %{name}.files.camlp4
%if 0%{?ocaml_native_compiler}
%{_libdir}/ocaml/*/*.a
%{_libdir}/ocaml/*/*.cmxa
%endif
%{_libdir}/ocaml/*/*.cma
%{_libdir}/ocaml/*/*.cmi
%{_libdir}/ocaml/*/*.mli
%changelog %changelog