[packages/ocaml-curses] - cleaned up install, unified paths - pl - release 13
qboosh
qboosh at pld-linux.org
Fri Jun 9 21:50:50 CEST 2017
commit 5dfa651076fb3b229445b03340a71e0ecde35434
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Jun 9 21:51:59 2017 +0200
- cleaned up install, unified paths
- pl
- release 13
ocaml-curses.spec | 77 +++++++++++++++++++++++++++++++++----------------------
1 file changed, 46 insertions(+), 31 deletions(-)
---
diff --git a/ocaml-curses.spec b/ocaml-curses.spec
index 2a929f7..d059931 100644
--- a/ocaml-curses.spec
+++ b/ocaml-curses.spec
@@ -3,25 +3,25 @@
%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
-%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
%undefine with_ocaml_opt
%endif
Summary: OCaml bindings for ncurses
+Summary(pl.UTF-8): Wiązania OCamla do ncurses
Name: ocaml-curses
Version: 1.0.3
-Release: 12
+Release: 13
License: LGPL v2+
Group: Development/Libraries
Source0: http://download.savannah.gnu.org/releases/ocaml-tmk/%{name}-%{version}.tar.gz
# Source0-md5: 3c11b46b7c057f8fd110ace319589877
URL: http://savannah.nongnu.org/projects/ocaml-tmk/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.50
BuildRequires: gawk
-BuildRequires: libtool
-BuildRequires: ncurses-devel
+BuildRequires: ncurses-devel >= 5
BuildRequires: ocaml >= 1:3.10.2
-BuildRequires: ocaml-findlib-devel >= 1.3.3-3
+BuildRequires: ocaml-findlib >= 1.3.3-3
ExcludeArch: sparc64 s390 s390x
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%requires_eq ocaml-runtime
@@ -30,22 +30,28 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
OCaml bindings for ncurses.
-%package devel
-Summary: Development files for %{name}
+%description -l pl.UTF-8
+Wiązania OCamla do ncurses.
+
+%package devel
+Summary: Development files for OCaml curses library
+Summary(pl.UTF-8): Pliki programistyczne biblioteki OCamla curses
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%requires_eq ocaml
-%description devel
-The %{name}-devel package contains libraries and signature files for
-developing applications that use %{name}.
+%description devel
+This package contains libraries and signature files for developing
+applications that use OCaml curses library.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
+z użyciem biblioteki OCamla curses.
%prep
%setup -q
%build
-%{__libtoolize}
-%{__aclocal}
%{__autoconf}
%{__autoheader}
%configure \
@@ -55,32 +61,41 @@ developing applications that use %{name}.
%install
rm -rf $RPM_BUILD_ROOT
-export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib
-install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
-ocamlfind install curses META *.cmi *.cma %{?with_ocaml_opt:*.cmx *.cmxa *.a} *.so *.mli
+install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{site-lib/curses,stublibs}
+
+%{__make} install \
+ OCAMLFIND_INSTFLAGS="-destdir $RPM_BUILD_ROOT%{_libdir}/ocaml"
+
+%if %{with ocaml_opt}
+# *.cmx missing from make install
+cp -p *.cmx $RPM_BUILD_ROOT%{_libdir}/ocaml/curses
+%endif
+
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/{,site-lib/}curses/META
+cat <<EOF >>$RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curses/META
+directory="+curses"
+EOF
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so.owner
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%{_libdir}/ocaml/site-lib/curses
-%exclude %{_libdir}/ocaml/site-lib/curses/*.mli
-%if %{with ocaml_opt}
-%exclude %{_libdir}/ocaml/site-lib/curses/*.a
-%exclude %{_libdir}/ocaml/site-lib/curses/*.cmxa
-%exclude %{_libdir}/ocaml/site-lib/curses/*.cmx
-%endif
-# XXX: proper packaging this would be?
-%dir %{_libdir}/ocaml/site-lib/stublibs
-%attr(755,root,root) %{_libdir}/ocaml/site-lib/stublibs/*.so
-%{_libdir}/ocaml/site-lib/stublibs/*.so.owner
+%dir %{_libdir}/ocaml/curses
+%{_libdir}/ocaml/curses/*.cmi
+%{_libdir}/ocaml/curses/curses.cma
+%dir %{_libdir}/ocaml/stublibs
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurses_stubs.so
%files devel
%defattr(644,root,root,755)
-%{_libdir}/ocaml/site-lib/curses/*.mli
+%{_libdir}/ocaml/curses/curses.mli
%if %{with ocaml_opt}
-%{_libdir}/ocaml/site-lib/curses/*.a
-%{_libdir}/ocaml/site-lib/curses/*.cmxa
-%{_libdir}/ocaml/site-lib/curses/*.cmx
+%{_libdir}/ocaml/curses/*.cmx
+%{_libdir}/ocaml/curses/curses.a
+%{_libdir}/ocaml/curses/curses.cmxa
+%{_libdir}/ocaml/curses/libcurses_stubs.a
%endif
+%{_libdir}/ocaml/site-lib/curses
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocaml-curses.git/commitdiff/5dfa651076fb3b229445b03340a71e0ecde35434
More information about the pld-cvs-commit
mailing list