]> git.pld-linux.org Git - packages/ocaml.git/blobdiff - ocaml.spec
- release 8 (by relup.sh)
[packages/ocaml.git] / ocaml.spec
index ca07f8341f55cec1d3986bfbdbbb0664b7f43740..1ff9646218d49a0b25f05ccc8e9ff97cd74f4d09 100644 (file)
@@ -16,7 +16,7 @@ Summary:      The Objective Caml compiler and programming environment
 Summary(pl.UTF-8):     Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
 Name:          ocaml
 Version:       4.04.1
-Release:       1
+Release:       8
 Epoch:         1
 License:       QPL v1.0 with linking exception (compiler), LGPL v2 with linking exception (library)
 Group:         Development/Languages
@@ -271,17 +271,18 @@ EOF
        EMACS="emacs"
 %endif
 
-# symlink .opt versions of compilers (if present)
-for f in ocamlc ocamlopt ocamldoc ocamllex; do
-       if test -f $RPM_BUILD_ROOT%{_bindir}/$f.opt; then
-               mv -f $RPM_BUILD_ROOT%{_bindir}/$f \
-                       $RPM_BUILD_ROOT%{_bindir}/$f.byte
-               ln -sf %{_bindir}/$f.opt $RPM_BUILD_ROOT%{_bindir}/$f
+# symlink .opt version of executable (if present)
+for f in ocamldoc ; do
+       if test -f $RPM_BUILD_ROOT%{_bindir}/${f}.opt; then
+               [ ! -f $RPM_BUILD_ROOT%{_bindir}/${f}.byte ] || exit 1 # drop rename if .opt/.byte already handled upstream
+               %{__mv} $RPM_BUILD_ROOT%{_bindir}/$f \
+                       $RPM_BUILD_ROOT%{_bindir}/${f}.byte
+               ln -sf ${f}.opt $RPM_BUILD_ROOT%{_bindir}/$f
        fi
 done
 
 # move includes to the proper place
-mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name}/caml $RPM_BUILD_ROOT%{_includedir}/caml
 # but leave compatibility symlink
 ln -s ../../include/caml $RPM_BUILD_ROOT%{_libdir}/%{name}/caml
 
@@ -292,8 +293,6 @@ for f in {asm,byte}comp parsing typing utils ; do
        %{?with_ocaml_opt:cp $f/*.{cmx,o} $RPM_BUILD_ROOT%{_libdir}/%{name}/compiler/$f}
 done
 
-# this isn't installed by default, but is useful
-#install tools/objinfo $RPM_BUILD_ROOT%{_bindir}/ocamlobjinfo
 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 ln -sf %{_libdir}/%{name}/{scrape,add}labels $RPM_BUILD_ROOT%{_bindir}
 
@@ -318,28 +317,39 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/addlabels
 %attr(755,root,root) %{_bindir}/ocaml
 %attr(755,root,root) %{_bindir}/ocamlc
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.*}
+%attr(755,root,root) %{_bindir}/ocamlc.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlc.opt}
 %attr(755,root,root) %{_bindir}/ocamlcp
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlcp.*}
+%attr(755,root,root) %{_bindir}/ocamlcp.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlcp.opt}
 %attr(755,root,root) %{_bindir}/ocamldebug
 %attr(755,root,root) %{_bindir}/ocamldep
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldep.*}
+%attr(755,root,root) %{_bindir}/ocamldep.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldep.opt}
 %attr(755,root,root) %{_bindir}/ocamldoc
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.*}
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.byte}
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamldoc.opt}
 %attr(755,root,root) %{_bindir}/ocamllex
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamllex.*}
+%attr(755,root,root) %{_bindir}/ocamllex.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamllex.opt}
 %attr(755,root,root) %{_bindir}/ocamlmklib
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmklib.*}
+%attr(755,root,root) %{_bindir}/ocamlmklib.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmklib.opt}
 %attr(755,root,root) %{_bindir}/ocamlmktop
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmktop.*}
+%attr(755,root,root) %{_bindir}/ocamlmktop.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlmktop.opt}
 %attr(755,root,root) %{_bindir}/ocamlobjinfo
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlobjinfo.*}
+%attr(755,root,root) %{_bindir}/ocamlobjinfo.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlobjinfo.opt}
 %{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt}
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.*}
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.byte}
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlopt.opt}
 %attr(755,root,root) %{_bindir}/ocamloptp
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamloptp.*}
+%attr(755,root,root) %{_bindir}/ocamloptp.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamloptp.opt}
 %attr(755,root,root) %{_bindir}/ocamlprof
-%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlprof.*}
+%attr(755,root,root) %{_bindir}/ocamlprof.byte
+%{?with_ocaml_opt:%attr(755,root,root) %{_bindir}/ocamlprof.opt}
 %attr(755,root,root) %{_bindir}/ocamlyacc
 %attr(755,root,root) %{_bindir}/scrapelabels
 %{_includedir}/caml
This page took 0.033636 seconds and 4 git commands to generate.