- drop separate site-lib only for META files, this is causing mess and auto/th/ocaml-findlib-1.9.1-2
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 27 Mar 2021 09:06:02 +0000 (10:06 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 27 Mar 2021 09:06:02 +0000 (10:06 +0100)
  issues with other build systems line dune or opam
- rel 2

ocaml-findlib.spec

index c0069e2ef0388f51ac6a846a47386dba7db524d1..c3e534503a9e7cc3b492854049bb398134e7ae63 100644 (file)
@@ -12,7 +12,7 @@ Summary:      OCaml module manager
 Summary(pl.UTF-8):     Zarządca modułów OCamla
 Name:          ocaml-findlib
 Version:       1.9.1
-Release:       1
+Release:       2
 License:       distributable
 Group:         Development/Tools
 Source0:       http://download.camlcity.org/download/findlib-%{version}.tar.gz
@@ -79,6 +79,7 @@ Ten pakiet zawiera biblioteki i skompilowane interfejsy findliba.
        -bindir %{_bindir} \
        -mandir %{_mandir} \
        -config %{_sysconfdir}/ocamlfind.conf \
+       -sitelib %{_libdir}/ocaml \
        -with-toolbox
 
 sed -i -e 's/-g//' Makefile
@@ -91,38 +92,22 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        prefix=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib/*.mli
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib/*.mli
 
 # now provided by ocaml-dbm.spec (might not exist if building without ocaml-dbm installed)
-%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/dbm
+%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/dbm
 # now provided by ocaml-labltk.spec (might not exist if building without ocaml-labltk installed)
-%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/labltk
+%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
 # now provided by ocaml-ocamlbuild.spec (might not exist if building without ocaml-ocamlbuild installed)
-%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlbuild
+%{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlbuild
 
-# in PLD only META files are stored in site-lib/pkg
-sed -i -e 's|/site-lib||' $RPM_BUILD_ROOT%{_libdir}/ocaml/topfind
 ln -sf topfind $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlfind
-%{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib \
-       $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib
-install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib
-%{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib/META \
-       $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib
-echo 'directory = "+findlib"' >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib/META
 
 echo 'ldconf = "ignore"' >> $RPM_BUILD_ROOT%{_sysconfdir}/ocamlfind.conf
 
-ln -sf ../stublibs $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/libexec
-ln -sf ../stublibs $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/stublibs
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%pretrans
-# handle ocaml-findlib-1.6.2-{2,3} + ocaml-curses < 1.0.3-13 mess
-[ -L %{_libdir}/ocaml/site-lib/libexec ] || rmdir %{_libdir}/ocaml/site-lib/libexec || :
-[ -L %{_libdir}/ocaml/site-lib/stublibs ] || rmdir %{_libdir}/ocaml/site-lib/stublibs || :
-
 %files
 %defattr(644,root,root,755)
 %doc doc/README LICENSE doc/*-html
@@ -144,22 +129,19 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib_dynload.cmxs
 %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib_top.cmxs
 %endif
-%{_libdir}/ocaml/site-lib/findlib
-# symlinks
-%{_libdir}/ocaml/site-lib/libexec
-%{_libdir}/ocaml/site-lib/stublibs
+%{_libdir}/ocaml/findlib
 # META files for base ocaml packages
-%{_libdir}/ocaml/site-lib/bigarray
-%{_libdir}/ocaml/site-lib/bytes
-%{_libdir}/ocaml/site-lib/compiler-libs
-%{_libdir}/ocaml/site-lib/dynlink
-%{_libdir}/ocaml/site-lib/ocamldoc
-%{_libdir}/ocaml/site-lib/stdlib
-%{_libdir}/ocaml/site-lib/str
-%{_libdir}/ocaml/site-lib/threads
-%{_libdir}/ocaml/site-lib/unix
+%{_libdir}/ocaml/bigarray
+%{_libdir}/ocaml/bytes
+%{_libdir}/ocaml/compiler-libs
+%{_libdir}/ocaml/dynlink
+%{_libdir}/ocaml/ocamldoc
+%{_libdir}/ocaml/stdlib
+%{_libdir}/ocaml/str
+%{_libdir}/ocaml/threads
+%{_libdir}/ocaml/unix
 # camlp4 4.02 doesn't provide its META itself
-%{_libdir}/ocaml/site-lib/camlp4
+%{_libdir}/ocaml/camlp4
 %{_mandir}/man1/ocamlfind.1*
 %{_mandir}/man5/META.5*
 %{_mandir}/man5/findlib.conf.5*
This page took 0.587889 seconds and 4 git commands to generate.