]>
Commit | Line | Data |
---|---|---|
e94c6065 JB |
1 | # |
2 | # Conditional build: | |
4d35b12f | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
e94c6065 | 4 | |
4d35b12f | 5 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
e94c6065 JB |
6 | %undefine with_ocaml_opt |
7 | %endif | |
8 | ||
0eaf468a | 9 | %define ocaml_ver 1:3.09.2 |
b741b828 | 10 | Summary: SDL binding for OCaml |
3ebd64ba | 11 | Summary(pl.UTF-8): Wiązania SDL dla OCamla |
b741b828 | 12 | Name: ocaml-SDL |
e94c6065 | 13 | Version: 0.9.1 |
4d35b12f | 14 | Release: 8 |
e94c6065 | 15 | License: LGPL v2+ |
b741b828 | 16 | Group: Libraries |
e94c6065 JB |
17 | Source0: http://downloads.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz |
18 | # Source0-md5: c3086423991fcdc1ba468afd52fc112b | |
9808146f | 19 | Patch0: safe-string.patch |
4d35b12f | 20 | Patch1: %{name}-info.patch |
b741b828 | 21 | URL: http://ocamlsdl.sourceforge.net/ |
e94c6065 | 22 | BuildRequires: SDL-devel >= 1.2.0 |
b148f2c7 | 23 | BuildRequires: SDL_gfx-devel |
93ef2896 | 24 | BuildRequires: SDL_image-devel |
b741b828 JR |
25 | BuildRequires: SDL_mixer-devel |
26 | BuildRequires: SDL_ttf-devel | |
6ec8c8da JB |
27 | BuildRequires: autoconf |
28 | BuildRequires: automake | |
480d0786 | 29 | BuildRequires: ocaml >= %{ocaml_ver} |
e94c6065 | 30 | BuildRequires: ocaml-findlib |
4607d6ce | 31 | BuildRequires: ocaml-lablgl-devel |
4d35b12f JB |
32 | BuildRequires: rpm-build >= 4.6 |
33 | BuildRequires: texinfo | |
b741b828 JR |
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 | ||
9328c039 JR |
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. | |
93ef2896 JB |
47 | |
48 | Ten pakiet zawiera pliki potrzebne do uruchamiania wykonywalnego | |
9328c039 | 49 | bytecodu używającego tej biblioteki. |
93ef2896 | 50 | |
b741b828 JR |
51 | %package devel |
52 | Summary: SDL binding for OCaml - development part | |
98b29fc0 | 53 | Summary(pl.UTF-8): Wiązania SDL dla OCamla - część programistyczna |
b741b828 JR |
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 | ||
9328c039 JR |
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. | |
93ef2896 | 68 | |
9328c039 JR |
69 | Ten pakiet zawiera pliki potrzebne do tworzenia programów w OCamlu |
70 | używających tej biblioteki. | |
93ef2896 | 71 | |
4d35b12f JB |
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 | ||
b741b828 | 84 | %prep |
4607d6ce | 85 | %setup -q -n ocamlsdl-%{version} |
9808146f | 86 | %patch0 -p1 |
4d35b12f | 87 | %patch1 -p1 |
b741b828 JR |
88 | |
89 | %build | |
6ec8c8da | 90 | cp -f /usr/share/automake/config.* support |
476da9c0 JR |
91 | %{__aclocal} -I support |
92 | %{__autoconf} | |
4607d6ce | 93 | %configure |
6382d7bb JB |
94 | %{__make} \ |
95 | %{!?with_ocaml_opt:OCAMLOPT=} | |
b741b828 | 96 | |
4d35b12f JB |
97 | cd doc |
98 | makeinfo --no-split ocamlsdl.texi | |
99 | ||
b741b828 JR |
100 | %install |
101 | rm -rf $RPM_BUILD_ROOT | |
07b43a1e | 102 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs |
b741b828 | 103 | |
6684267e | 104 | %{__make} install \ |
6382d7bb JB |
105 | OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \ |
106 | %{!?with_ocaml_opt:OCAMLOPT=} | |
b741b828 | 107 | |
4d35b12f JB |
108 | install -d $RPM_BUILD_ROOT%{_infodir} |
109 | cp -p doc/ocamlsdl.info $RPM_BUILD_ROOT%{_infodir} | |
110 | ||
e94c6065 JB |
111 | # ocamlfind-specific, useless in rpm |
112 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner | |
113 | ||
b741b828 JR |
114 | %clean |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
4d35b12f JB |
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 | ||
b741b828 JR |
123 | %files |
124 | %defattr(644,root,root,755) | |
e94c6065 JB |
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 | |
4d35b12f JB |
131 | %dir %{_libdir}/ocaml/sdl |
132 | %{_libdir}/ocaml/sdl/META | |
133 | %{_libdir}/ocaml/sdl/sdl*.cma | |
b741b828 JR |
134 | |
135 | %files devel | |
136 | %defattr(644,root,root,755) | |
e94c6065 | 137 | %{_libdir}/ocaml/sdl/libsdl*.a |
e94c6065 JB |
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 | |
4d35b12f JB |
146 | %{_infodir}/ocamlsdl.info* |
147 | ||
148 | %files apidocs | |
149 | %defattr(644,root,root,755) | |
150 | %doc doc/html/* |