]> git.pld-linux.org Git - packages/ocaml-SDL.git/blob - ocaml-SDL.spec
0d0ca3ce78819ac7b27148025c22a493299cfd94
[packages/ocaml-SDL.git] / ocaml-SDL.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # skip building native optimized binaries (bytecode is always built)
4
5 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
6 %undefine       with_ocaml_opt
7 %endif
8
9 %define         ocaml_ver       1:3.09.2
10 Summary:        SDL binding for OCaml
11 Summary(pl.UTF-8):      Wiązania SDL dla OCamla
12 Name:           ocaml-SDL
13 Version:        0.9.1
14 Release:        7
15 License:        LGPL v2+
16 Group:          Libraries
17 Source0:        http://downloads.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz
18 # Source0-md5:  c3086423991fcdc1ba468afd52fc112b
19 Patch0:         safe-string.patch
20 URL:            http://ocamlsdl.sourceforge.net/
21 BuildRequires:  SDL-devel >= 1.2.0
22 BuildRequires:  SDL_gfx-devel
23 BuildRequires:  SDL_image-devel
24 BuildRequires:  SDL_mixer-devel
25 BuildRequires:  SDL_ttf-devel
26 BuildRequires:  autoconf
27 BuildRequires:  automake
28 BuildRequires:  ocaml >= %{ocaml_ver}
29 BuildRequires:  ocaml-findlib
30 BuildRequires:  ocaml-lablgl-devel
31 %requires_eq    ocaml-runtime
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
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 run bytecode executables using
39 this library.
40
41 %description -l pl.UTF-8
42 OCamlSDL to próba napisania interfejsu programowego między językiem
43 programowania ML a biblioteką C SDL.
44
45 Ten pakiet zawiera pliki potrzebne do uruchamiania wykonywalnego
46 bytecodu używającego tej biblioteki.
47
48 %package devel
49 Summary:        SDL binding for OCaml - development part
50 Summary(pl.UTF-8):      Wiązania SDL dla OCamla - cześć programistyczna
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53 %requires_eq    ocaml
54
55 %description devel
56 Simply speaking, OCamlSDL is an attempt to write a software interface
57 between the ML programming language and the SDL C library.
58
59 This package contains files needed to develop OCaml programs using
60 this library.
61
62 %description devel -l pl.UTF-8
63 OCamlSDL to próba napisania interfejsu programowego między językiem
64 programowania ML a biblioteką C SDL.
65
66 Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu
67 używających tej biblioteki.
68
69 %prep
70 %setup -q -n ocamlsdl-%{version}
71 %patch0 -p1
72
73 %build
74 cp -f /usr/share/automake/config.* support
75 %{__aclocal} -I support
76 %{__autoconf}
77 %configure
78 %{__make} \
79         %{!?with_ocaml_opt:OCAMLOPT=}
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
84
85 %{__make} install \
86         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
87         %{!?with_ocaml_opt:OCAMLOPT=}
88
89 # ocamlfind-specific, useless in rpm
90 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %files
96 %defattr(644,root,root,755)
97 %doc AUTHORS NEWS README
98 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlstub.so
99 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlgfxstub.so
100 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlloaderstub.so
101 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlmixerstub.so
102 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlttfstub.so
103
104 %files devel
105 %defattr(644,root,root,755)
106 %doc doc/html/*
107 %dir %{_libdir}/ocaml/sdl
108 %{_libdir}/ocaml/sdl/META
109 %{_libdir}/ocaml/sdl/libsdl*.a
110 %{_libdir}/ocaml/sdl/sdl*.cma
111 %{_libdir}/ocaml/sdl/sdl*.cmi
112 # doc?
113 %{_libdir}/ocaml/sdl/sdl*.mli
114 %if %{with ocaml_opt}
115 %{_libdir}/ocaml/sdl/sdl*.a
116 %{_libdir}/ocaml/sdl/sdl*.cmx
117 %{_libdir}/ocaml/sdl/sdl*.cmxa
118 %endif
This page took 0.025737 seconds and 2 git commands to generate.