]> 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 18eb9a8ee96513462f9ba5e64554617c8e8b3735..67f9cb44fa4adb0b9967b23695b4d742fd081d1e 100644 (file)
@@ -3,22 +3,26 @@
 %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 
+%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.05
-Release:       3
+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/1254/lablgl-%{version}.tar.gz
-# Source0-md5: b64662bf47f2973f836d33ae1365244f
-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}
@@ -161,6 +165,9 @@ Pakiet ten zawiera system interaktywny OCamla skonsolidowany z lablgl.
 %prep
 %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|;
@@ -170,7 +177,7 @@ sed -e 's|^\(X\|TK\)INCLUDES|#&|;
 
 %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 \
@@ -179,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
@@ -210,18 +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
@@ -241,7 +230,6 @@ 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)
This page took 0.074575 seconds and 4 git commands to generate.