]> git.pld-linux.org Git - packages/ocaml-SDL.git/blob - ocaml-SDL.spec
b692a55072b6dc17db6f796038a14626f913999c
[packages/ocaml-SDL.git] / ocaml-SDL.spec
1 Summary:        SDL binding for OCaml
2 Summary(pl):    Wi±zania SDL dla OCamla
3 Name:           ocaml-SDL
4 Version:        0.7.1
5 Release:        0.1
6 License:        GPL
7 Group:          Libraries
8 Source0:        http://dl.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz
9 # Source0-md5:  3829b20bd975e3bef5195a54e2cd04cb
10 URL:            http://ocamlsdl.sourceforge.net/
11 BuildRequires:  SDL-devel
12 BuildRequires:  SDL_mixer-devel
13 BuildRequires:  SDL_ttf-devel
14 BuildRequires:  SDLimage-devel
15 BuildRequires:  glut-devel
16 BuildRequires:  ocaml >= 3.07
17 %requires_eq    ocaml-runtime
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 Simply speaking, OCamlSDL is an attempt to write a software interface
22 between the ML programming language and the SDL C library.
23
24 This package contains files needed to run bytecode executables using
25 this library.
26
27 %package devel
28 Summary:        SDL binding for OCaml - development part
29 Summary(pl):    Wi±zania SDL dla OCamla - cze¶æ programistyczna
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}-%{release}
32 %requires_eq    ocaml
33
34 %description devel
35 Simply speaking, OCamlSDL is an attempt to write a software interface
36 between the ML programming language and the SDL C library.
37
38 This package contains files needed to develop OCaml programs using
39 this library.
40
41 %prep
42 %setup -q -n ocamlsdl
43
44 %build
45 %{__make} -C gl \
46         CC="%{__cc}" \
47         CFLAGS="%{rpmcflags} -fPIC"
48 %{__make} -C hgl \
49         CC="%{__cc}" \
50         CFLAGS="%{rpmcflags} -fPIC"
51 %{__make} -C glfw \
52         CC="%{__cc}" \
53         CFLAGS="%{rpmcflags} -fPIC" \
54         X11LIBS="-L/usr/X11R6/%{_lib}"
55 %{__make} -C glut \
56         CC="%{__cc}" \
57         CFLAGS="%{rpmcflags} -fPIC" \
58         X11LIBS="-L/usr/X11R6/%{_lib}"
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{gl,stublibs}
63
64 install lib/*.cm[ixa]* lib/*.a $RPM_BUILD_ROOT%{_libdir}/ocaml/gl
65 install lib/dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
66
67 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
68 cp -r demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
69
70 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlgl-gl
71 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlgl-gl/META <<EOF
72 requires = "bigarray"
73 version = "%{version}"
74 directory = "+gl"
75 archive(byte) = "gl.cma"
76 archive(native) = "gl.cmxa"
77 linkopts = ""
78 EOF
79
80 for f in glut hgl glfw ; do
81         install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlgl-$f
82         cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlgl-$f/META <<EOF
83 requires = "ocamlgl-gl"
84 version = "%{version}"
85 directory = "+gl"
86 archive(byte) = "$f.cma"
87 archive(native) = "$f.cmxa"
88 linkopts = ""
89 EOF
90 done
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %files
96 %defattr(644,root,root,755)
97 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
98
99 %files devel
100 %defattr(644,root,root,755)
101 %doc LICENSE glfw/license.txt README Announce doc/*
102 %dir %{_libdir}/ocaml/gl
103 %{_libdir}/ocaml/gl/*.cm[ixa]*
104 %{_libdir}/ocaml/gl/*.a
105 %{_libdir}/ocaml/site-lib/*
106 %{_examplesdir}/%{name}-%{version}
This page took 0.05234 seconds and 2 git commands to generate.