]>
Commit | Line | Data |
---|---|---|
4188255a JR |
1 | # |
2 | # Conditional build: | |
23307fdb | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
4188255a | 4 | |
23307fdb JB |
5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it |
6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 | |
4188255a JR |
7 | %undefine with_ocaml_opt |
8 | %endif | |
9 | ||
84be62dc | 10 | Summary: Zlib binding for OCaml |
5107d90d | 11 | Summary(pl.UTF-8): Wiązania Zlib dla OCamla |
84be62dc | 12 | Name: ocaml-zip |
23307fdb JB |
13 | Version: 1.11 |
14 | %define gitver rel111 | |
15 | Release: 1 | |
16 | License: LGPL v2.1 with OCaml linking exception | |
84be62dc | 17 | Group: Libraries |
23307fdb JB |
18 | #Source0Download: https://github.com/xavierleroy/camlzip/tags |
19 | Source0: https://github.com/xavierleroy/camlzip/archive/%{gitver}.tar.gz?/camlzip-%{gitver}.tar.gz | |
20 | # Source0-md5: ee7a2ecf4801226003ba2cd1b1f11d4d | |
21 | URL: https://xavierleroy.org/software.html | |
22 | BuildRequires: ocaml >= 1:4.07 | |
23 | BuildRequires: ocaml-findlib | |
24 | BuildRequires: zlib-devel >= 1.1.3 | |
84be62dc MM |
25 | %requires_eq ocaml-runtime |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | This Objective Caml library provides easy access to compressed files | |
30 | in ZIP and GZIP format, as well as to Java JAR files. It provides | |
31 | functions for reading from and writing to compressed files in these | |
32 | formats. | |
33 | ||
34 | This package contains files needed to run bytecode executables using | |
35 | this library. | |
36 | ||
ab389ca3 JR |
37 | %description -l pl.UTF-8 |
38 | Biblioteka ta pozwala na dostęp do plików w formacie ZIP i GZIP jak | |
39 | również dla plików JAR Javy z poziomy OCamla. Udostępnia ona funkcje | |
40 | do czytania i pisania do plików w tych formatach. | |
84be62dc | 41 | |
ab389ca3 JR |
42 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów |
43 | używających tej biblioteki. | |
84be62dc MM |
44 | |
45 | %package devel | |
46 | Summary: Zlib binding for OCaml - development part | |
058ec363 | 47 | Summary(pl.UTF-8): Wiązania Zlib dla OCamla - część programistyczna |
84be62dc MM |
48 | Group: Development/Libraries |
49 | Requires: %{name} = %{version}-%{release} | |
50 | %requires_eq ocaml | |
51 | ||
52 | %description devel | |
53 | This Objective Caml library provides easy access to compressed files | |
54 | in ZIP and GZIP format, as well as to Java JAR files. It provides | |
55 | functions for reading from and writing to compressed files in these | |
56 | formats. | |
57 | ||
58 | This package contains files needed to develop OCaml programs using | |
59 | this library. | |
60 | ||
ab389ca3 JR |
61 | %description devel -l pl.UTF-8 |
62 | Biblioteka ta pozwala na dostęp do plików w formacie ZIP i GZIP jak | |
63 | również dla plików JAR Javy z poziomy OCamla. Udostępnia ona funkcje | |
64 | do czytania i pisania do plików w tych formatach. | |
84be62dc | 65 | |
ab389ca3 | 66 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających |
84be62dc MM |
67 | tej biblioteki. |
68 | ||
69 | %prep | |
4c61271a | 70 | %setup -q -n camlzip-%{gitver} |
84be62dc MM |
71 | |
72 | %build | |
23307fdb JB |
73 | %{__cc} %{rpmcflags} %{rpmcppflags} -fPIC -c zlibstubs.c |
74 | ||
75 | %{__make} allbyt %{?with_ocaml_opt:allopt} | |
84be62dc MM |
76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
86ffef8e | 79 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs |
84be62dc | 80 | |
23307fdb JB |
81 | %{__make} install \ |
82 | OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml | |
58067d61 | 83 | |
23307fdb JB |
84 | # useless in rpm |
85 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so.owner | |
84be62dc MM |
86 | |
87 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
23307fdb | 88 | cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
84be62dc | 89 | |
84be62dc MM |
90 | %clean |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | ||
93 | %files | |
94 | %defattr(644,root,root,755) | |
23307fdb JB |
95 | %doc Changes LICENSE README.md |
96 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcamlzip.so | |
7491c191 JR |
97 | %if %{with ocaml_opt} |
98 | %{_libdir}/ocaml/zip/*.cmxs | |
99 | %endif | |
84be62dc MM |
100 | |
101 | %files devel | |
102 | %defattr(644,root,root,755) | |
23307fdb JB |
103 | %dir %{_libdir}/ocaml/camlzip |
104 | %{_libdir}/ocaml/camlzip/META | |
86ffef8e | 105 | %dir %{_libdir}/ocaml/zip |
06ca6a6b | 106 | %{_libdir}/ocaml/zip/META |
4188255a | 107 | %{_libdir}/ocaml/zip/*.cma |
23307fdb JB |
108 | %{_libdir}/ocaml/zip/*.cmi |
109 | %{_libdir}/ocaml/zip/*.cmt | |
110 | %{_libdir}/ocaml/zip/*.cmti | |
4188255a JR |
111 | %{_libdir}/ocaml/zip/*.mli |
112 | %{_libdir}/ocaml/zip/libcamlzip.a | |
113 | %if %{with ocaml_opt} | |
23307fdb | 114 | %{_libdir}/ocaml/zip/*.cmx |
4188255a JR |
115 | %{_libdir}/ocaml/zip/*.cmxa |
116 | %{_libdir}/ocaml/zip/zip.a | |
117 | %endif | |
84be62dc | 118 | %{_examplesdir}/%{name}-%{version} |