]> git.pld-linux.org Git - packages/ocaml-SDL.git/blob - ocaml-SDL.spec
- typo
[packages/ocaml-SDL.git] / ocaml-SDL.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # 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:        8
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 Patch1:         %{name}-info.patch
21 URL:            http://ocamlsdl.sourceforge.net/
22 BuildRequires:  SDL-devel >= 1.2.0
23 BuildRequires:  SDL_gfx-devel
24 BuildRequires:  SDL_image-devel
25 BuildRequires:  SDL_mixer-devel
26 BuildRequires:  SDL_ttf-devel
27 BuildRequires:  autoconf
28 BuildRequires:  automake
29 BuildRequires:  ocaml >= %{ocaml_ver}
30 BuildRequires:  ocaml-findlib
31 BuildRequires:  ocaml-lablgl-devel
32 BuildRequires:  rpm-build >= 4.6
33 BuildRequires:  texinfo
34 %requires_eq    ocaml-runtime
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Simply speaking, OCamlSDL is an attempt to write a software interface
39 between the ML programming language and the SDL C library.
40
41 This package contains files needed to run bytecode executables using
42 this library.
43
44 %description -l pl.UTF-8
45 OCamlSDL to próba napisania interfejsu programowego między językiem
46 programowania ML a biblioteką C SDL.
47
48 Ten pakiet zawiera pliki potrzebne do uruchamiania wykonywalnego
49 bytecodu używającego tej biblioteki.
50
51 %package devel
52 Summary:        SDL binding for OCaml - development part
53 Summary(pl.UTF-8):      Wiązania SDL dla OCamla - część programistyczna
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56 %requires_eq    ocaml
57
58 %description devel
59 Simply speaking, OCamlSDL is an attempt to write a software interface
60 between the ML programming language and the SDL C library.
61
62 This package contains files needed to develop OCaml programs using
63 this library.
64
65 %description devel -l pl.UTF-8
66 OCamlSDL to próba napisania interfejsu programowego między językiem
67 programowania ML a biblioteką C SDL.
68
69 Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu
70 używających tej biblioteki.
71
72 %package apidocs
73 Summary:        API documentation for OCaml SDL library
74 Summary(pl.UTF-8):      Dokumentacja API biblioteki OCamla SDL
75 Group:          Documentation
76 BuildArch:      noarch
77
78 %description apidocs
79 API documentation for OCaml SDL library.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API biblioteki OCamla SDL.
83
84 %prep
85 %setup -q -n ocamlsdl-%{version}
86 %patch0 -p1
87 %patch1 -p1
88
89 %build
90 cp -f /usr/share/automake/config.* support
91 %{__aclocal} -I support
92 %{__autoconf}
93 %configure
94 %{__make} \
95         %{!?with_ocaml_opt:OCAMLOPT=}
96
97 cd doc
98 makeinfo --no-split ocamlsdl.texi
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
103
104 %{__make} install \
105         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
106         %{!?with_ocaml_opt:OCAMLOPT=}
107
108 install -d $RPM_BUILD_ROOT%{_infodir}
109 cp -p doc/ocamlsdl.info $RPM_BUILD_ROOT%{_infodir}
110
111 # ocamlfind-specific, useless in rpm
112 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post   devel -p /sbin/postshell
118 -/usr/sbin/fix-info-dir -c %{_infodir}
119
120 %postun devel -p /sbin/postshell
121 -/usr/sbin/fix-info-dir -c %{_infodir}
122
123 %files
124 %defattr(644,root,root,755)
125 %doc AUTHORS NEWS README
126 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlstub.so
127 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlgfxstub.so
128 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlloaderstub.so
129 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlmixerstub.so
130 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllsdlttfstub.so
131 %dir %{_libdir}/ocaml/sdl
132 %{_libdir}/ocaml/sdl/META
133 %{_libdir}/ocaml/sdl/sdl*.cma
134
135 %files devel
136 %defattr(644,root,root,755)
137 %{_libdir}/ocaml/sdl/libsdl*.a
138 %{_libdir}/ocaml/sdl/sdl*.cmi
139 # doc?
140 %{_libdir}/ocaml/sdl/sdl*.mli
141 %if %{with ocaml_opt}
142 %{_libdir}/ocaml/sdl/sdl*.a
143 %{_libdir}/ocaml/sdl/sdl*.cmx
144 %{_libdir}/ocaml/sdl/sdl*.cmxa
145 %endif
146 %{_infodir}/ocamlsdl.info*
147
148 %files apidocs
149 %defattr(644,root,root,755)
150 %doc doc/html/*
This page took 0.256978 seconds and 3 git commands to generate.