]> git.pld-linux.org Git - packages/ocaml-ocamlbuild.git/commitdiff
- added symlink patch (symlink .byte/.native executable instead of copying) auto/th/ocaml-ocamlbuild-0.11.0-2
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 9 Jun 2017 15:39:53 +0000 (17:39 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 9 Jun 2017 15:39:53 +0000 (17:39 +0200)
- fix ocaml_opt bcond handling
- pl
- release 2

ocaml-ocamlbuild-symlink.patch [new file with mode: 0644]
ocaml-ocamlbuild.spec

diff --git a/ocaml-ocamlbuild-symlink.patch b/ocaml-ocamlbuild-symlink.patch
new file mode 100644 (file)
index 0000000..00848ad
--- /dev/null
@@ -0,0 +1,18 @@
+--- ocamlbuild-0.11.0/Makefile.orig    2017-03-05 23:48:09.000000000 +0100
++++ ocamlbuild-0.11.0/Makefile 2017-06-09 17:33:40.208846050 +0200
+@@ -247,13 +247,13 @@
+       mkdir -p $(INSTALL_BINDIR)
+       $(CP) ocamlbuild.byte $(INSTALL_BINDIR)/ocamlbuild.byte$(EXE)
+ ifneq ($(OCAML_NATIVE), true)
+-      $(CP) ocamlbuild.byte $(INSTALL_BINDIR)/ocamlbuild$(EXE)
++      ln -s ocamlbuild.byte$(EXE) $(INSTALL_BINDIR)/ocamlbuild$(EXE)
+ endif
+ install-bin-native:
+       mkdir -p $(INSTALL_BINDIR)
+-      $(CP) ocamlbuild.native $(INSTALL_BINDIR)/ocamlbuild$(EXE)
+       $(CP) ocamlbuild.native $(INSTALL_BINDIR)/ocamlbuild.native$(EXE)
++      ln -s ocamlbuild.native$(EXE) $(INSTALL_BINDIR)/ocamlbuild$(EXE)
+ ifeq ($(OCAML_NATIVE), true)
+ install-bin: install-bin-byte install-bin-native
index 184ee75a4aaf5c46e4a1b1c3a7f3a608c92f4195..143e933ab5a2e11bf3697716942d6399536d556f 100644 (file)
@@ -9,13 +9,15 @@
 
 %define                module  ocamlbuild
 Summary:       Build tool for OCaml libraries and programs
+Summary(pl.UTF-8):     Narzędzie do budowania bibliotek i programów napisanych w OCamlu
 Name:          ocaml-%{module}
 Version:       0.11.0
-Release:       1
-License:       LGPLv2+ with exceptions
+Release:       2
+License:       LGPL v2+ with exceptions
 Group:         Development/Languages
 Source0:       https://github.com/ocaml/ocamlbuild/archive/%{version}/%{module}-%{version}.tar.gz
 # Source0-md5: e3b83c842f82ef909b6d2a2d2035f0fe
+Patch0:                %{name}-symlink.patch
 URL:           https://github.com/ocaml/ocamlbuild
 BuildRequires: ocaml >= 1:4.04.0
 %requires_eq   ocaml-runtime
@@ -24,45 +26,51 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %description
 OCamlbuild is a build tool for building OCaml libraries and programs.
 
+%description -l pl.UTF-8
+OCamlbuild to narzędzie do budowania bibliotek i programów napisanych
+w OCamlu.
+
 %package devel
-Summary:       Development files for %{module}
+Summary:       Development files for OCamlbuild library
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki OCamlbuild
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
-This package contains development files for %{module}.
+This package contains development files for OCamlbuild library.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki programistyczne biblioteki OCamlbuild.
 
 %prep
 %setup -q -n %{module}-%{version}
+%patch0 -p1
 
 %build
 %{__make} configure \
-  OCAMLBUILD_PREFIX=%{_prefix} \
-  OCAMLBUILD_BINDIR=%{_bindir} \
-  OCAMLBUILD_LIBDIR=%{_libdir}/ocaml \
-%ifarch %{ocaml_opt}
-  OCAML_NATIVE=true
-%else
-  OCAML_NATIVE=false
-%endif
+       OCAMLBUILD_PREFIX=%{_prefix} \
+       OCAMLBUILD_BINDIR=%{_bindir} \
+       OCAMLBUILD_LIBDIR=%{_libdir}/ocaml \
+       OCAML_NATIVE=%{?with_ocaml_opt:true}%{!?with_ocaml_opt:false}
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} install \
-     DESTDIR=$RPM_BUILD_ROOT \
-     CHECK_IF_PREINSTALLED=false
+       DESTDIR=$RPM_BUILD_ROOT \
+       CHECK_IF_PREINSTALLED=false
 
 # Install the man page, which for some reason is not copied
 # in by the make install rule above.
-install -d $RPM_BUILD_ROOT%{_mandir}/man1/
-install -p man/ocamlbuild.1 $RPM_BUILD_ROOT%{_mandir}/man1/
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+install -p man/ocamlbuild.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
 # move to dir pld ocamlfind looks
 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
-mv $OCAMLFIND_DESTDIR/%{module}/META \
+%{__mv} $OCAMLFIND_DESTDIR/%{module}/META \
        $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
 directory="+%{module}"
@@ -76,27 +84,23 @@ rm -rf $RPM_BUILD_ROOT
 %doc Changes Readme.md VERSION
 %attr(755,root,root) %{_bindir}/ocamlbuild
 %attr(755,root,root) %{_bindir}/ocamlbuild.byte
-%ifarch %{ocaml_opt}
+%if %{with ocaml_opt}
 %attr(755,root,root) %{_bindir}/ocamlbuild.native
 %endif
 %{_mandir}/man1/ocamlbuild.1*
-%{_libdir}/ocaml/ocamlbuild
-%ifarch %{ocaml_opt}
-%exclude %{_libdir}/ocaml/ocamlbuild/*.a
-%exclude %{_libdir}/ocaml/ocamlbuild/*.o
-%exclude %{_libdir}/ocaml/ocamlbuild/*.cmx
-%exclude %{_libdir}/ocaml/ocamlbuild/*.cmxa
-%endif
-%exclude %{_libdir}/ocaml/ocamlbuild/*.mli
+%dir %{_libdir}/ocaml/ocamlbuild
+%{_libdir}/ocaml/ocamlbuild/ocamlbuild*.cmi
+%{_libdir}/ocaml/ocamlbuild/ocamlbuild.cmo
+%{_libdir}/ocaml/ocamlbuild/ocamlbuildlib.cma
 
 %files devel
 %defattr(644,root,root,755)
 %doc manual/*
-%ifarch %{ocaml_opt}
-%{_libdir}/ocaml/ocamlbuild/*.a
-%{_libdir}/ocaml/ocamlbuild/*.o
-%{_libdir}/ocaml/ocamlbuild/*.cmx
-%{_libdir}/ocaml/ocamlbuild/*.cmxa
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/ocamlbuild/ocamlbuild*.o
+%{_libdir}/ocaml/ocamlbuild/ocamlbuild*.cmx
+%{_libdir}/ocaml/ocamlbuild/ocamlbuildlib.a
+%{_libdir}/ocaml/ocamlbuild/ocamlbuildlib.cmxa
 %endif
-%{_libdir}/ocaml/ocamlbuild/*.mli
-%{_libdir}/ocaml/site-lib/%{module}
+%{_libdir}/ocaml/ocamlbuild/signatures.mli
+%{_libdir}/ocaml/site-lib/ocamlbuild
This page took 0.092881 seconds and 4 git commands to generate.