]> git.pld-linux.org Git - packages/ocaml-lablgl.git/blobdiff - ocaml-lablgl.spec
- use arm macro, updated download URL
[packages/ocaml-lablgl.git] / ocaml-lablgl.spec
index 277b855a59437bf4ab6eaa9002099f8fd18550ce..67f9cb44fa4adb0b9967b23695b4d742fd081d1e 100644 (file)
@@ -1,15 +1,28 @@
+#
+# Conditional build:
+%bcond_without ocaml_opt       # skip building native optimized binaries (bytecode is always built)
+
+# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
+%undefine      with_ocaml_opt
+%endif
+
+%if %{without ocaml_opt}
+%define                _enable_debug_packages  0
+%endif
+
 %define                ocaml_ver       1:3.09.2
 Summary:       OpenGL binding for OCaml
 Summary(pl.UTF-8):     Wiązania OpenGL dla OCamla
 Name:          ocaml-lablgl
-Version:       1.04
-Release:       4
+Version:       1.06
+Release:       2
 License:       BSD
 Group:         Libraries
-#Source0Download: https://forge.ocamlcore.org/frs/?group_id=291
-Source0:       https://forge.ocamlcore.org/frs/download.php/814/lablgl-%{version}.tar.gz
-# Source0-md5: dcf05a0cffffdf06cbe0fe55f9eff974
-URL:           https://forge.ocamlcore.org/projects/lablgl/
+#Source0Download: https://github.com/garrigue/lablgl/releases
+Source0:       https://github.com/garrigue/lablgl/archive/v%{version}/lablgl-%{version}.tar.gz
+# Source0-md5: 8ee7a37b016095c4f7cd066f0ebd4436
+URL:           http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
 BuildRequires: OpenGL-GLX-devel
 BuildRequires: OpenGL-glut-devel >= 3.7
 BuildRequires: ocaml >= %{ocaml_ver}
@@ -150,18 +163,21 @@ biblioteki GL i GLU.
 Pakiet ten zawiera system interaktywny OCamla skonsolidowany z lablgl.
 
 %prep
-%setup -q -n lablGL-%{version}
+%setup -q -n lablgl-%{version}
+
+find LablGlut/examples -name '*.ml' -print0 | xargs --null \
+       %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+lablglut(\s|$),#!%{_bindir}/lablglut\1,' \
 
 %build
 sed -e 's|^\(X\|TK\)INCLUDES|#&|;
        s|^GLLIBS.*|GLLIBS = -lGL -lGLU -lXmu|;
        s|^COPTS.*|COPTS = %{rpmcflags} -c -fPIC|;' \
        Makefile.config.ex > Makefile.config
-%{__make} -j1 all opt
+%{__make} -j1 all %{?with_ocaml_opt:opt}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/{stublibs,site-lib/{lablgl,togl}}} \
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/stublibs} \
        $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{LablGlut,Togl}
 
 %{__make} install \
@@ -170,30 +186,12 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/{stublibs,site-lib/{lablg
        LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
        BINDIR=$RPM_BUILD_ROOT%{_bindir}
 
-mv -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli .
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli .
 
 cp -r LablGlut/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/LablGlut
 cp -r Togl/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/Togl
 
-cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgl/META <<EOF
-# Specifications for the "lablgl" library:
-requires = ""
-version = "%{version}"
-directory = "+lablGL"
-archive(byte) = "lablgl.cma"
-archive(native) = "lablgl.cmxa"
-linkopts = ""
-EOF
-
-cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/togl/META <<EOF
-# Specifications for the "togl" library:
-requires = "lablgl"
-version = "%{version}"
-directory = "+lablGL"
-archive(byte) = "togl.cma"
-archive(native) = "togl.cmxa"
-linkopts = ""
-EOF
+cp -p META $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -201,17 +199,18 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc COPYRIGHT CHANGES README
+%dir %{_libdir}/ocaml/lablGL
+%{_libdir}/ocaml/lablGL/META
 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgl.so
 
 %files devel
 %defattr(644,root,root,755)
 %doc *.mli
-%dir %{_libdir}/ocaml/lablGL
+%{_libdir}/ocaml/lablGL/build.ml
 %{_libdir}/ocaml/lablGL/gl*
 %{_libdir}/ocaml/lablGL/lablgl.*
 %{_libdir}/ocaml/lablGL/liblablgl.a
 %{_libdir}/ocaml/lablGL/raw.*
-%{_libdir}/ocaml/site-lib/lablgl
 %{_examplesdir}/%{name}-%{version}
 
 %files glut
@@ -231,8 +230,8 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/ocaml/lablGL/togl.*
 %{_libdir}/ocaml/lablGL/libtogl.a
-%{_libdir}/ocaml/site-lib/togl
 
 %files toplevel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/lablgl
+%attr(755,root,root) %{_bindir}/lablglut
This page took 0.039592 seconds and 4 git commands to generate.