]> git.pld-linux.org Git - packages/ocaml-zip.git/blob - ocaml-zip.spec
614c5617f5fd55ac75e1226362f150d184f0d785
[packages/ocaml-zip.git] / ocaml-zip.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # skip building native optimized binaries (bytecode is always built)
4
5 # not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7 %undefine       with_ocaml_opt
8 %endif
9
10 Summary:        Zlib binding for OCaml
11 Summary(pl.UTF-8):      Wiązania Zlib dla OCamla
12 Name:           ocaml-zip
13 Version:        1.07
14 %define gitver  rel107
15 Release:        2
16 License:        LGPL
17 Group:          Libraries
18 URL:            http://pauillac.inria.fr/~xleroy/software.html
19 Source0:        https://github.com/xavierleroy/camlzip/archive/%{gitver}/camlzip-%{version}.tar.gz
20 # Source0-md5:  8babccb584dfd4eb7b98901122e818a9
21 BuildRequires:  ocaml >= 1:3.09.2
22 BuildRequires:  zlib-devel
23 %requires_eq    ocaml-runtime
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 This Objective Caml library provides easy access to compressed files
28 in ZIP and GZIP format, as well as to Java JAR files. It provides
29 functions for reading from and writing to compressed files in these
30 formats.
31
32 This package contains files needed to run bytecode executables using
33 this library.
34
35 %description -l pl.UTF-8
36 Biblioteka ta pozwala na dostęp do plików w formacie ZIP i GZIP jak
37 również dla plików JAR Javy z poziomy OCamla. Udostępnia ona funkcje
38 do czytania i pisania do plików w tych formatach.
39
40 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
41 używających tej biblioteki.
42
43 %package devel
44 Summary:        Zlib binding for OCaml - development part
45 Summary(pl.UTF-8):      Wiązania Zlib dla OCamla - cześć programistyczna
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48 %requires_eq    ocaml
49
50 %description devel
51 This Objective Caml library provides easy access to compressed files
52 in ZIP and GZIP format, as well as to Java JAR files. It provides
53 functions for reading from and writing to compressed files in these
54 formats.
55
56 This package contains files needed to develop OCaml programs using
57 this library.
58
59 %description devel -l pl.UTF-8
60 Biblioteka ta pozwala na dostęp do plików w formacie ZIP i GZIP jak
61 również dla plików JAR Javy z poziomy OCamla. Udostępnia ona funkcje
62 do czytania i pisania do plików w tych formatach.
63
64 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
65 tej biblioteki.
66
67 %prep
68 %setup -q -n camlzip-%{gitver}
69
70 %build
71 %{__cc} %{rpmcflags} -fPIC -c zlibstubs.c
72 %{__make} all %{?with_ocaml_opt:allopt} \
73         OCAMLC=ocamlc
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
78
79 %{__make} install %{?with_ocaml_opt:installopt} \
80         INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/zip \
81         OCAMLC="echo $RPM_BUILD_ROOT; true"
82
83 install zlib.cm[ixa]* $RPM_BUILD_ROOT%{_libdir}/ocaml/zip
84
85 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/zip/dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
86
87 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
88 cp -r test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
89
90 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/zip
91 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/zip/META <<EOF
92 requires = ""
93 version = "%{version}"
94 directory = "+zip"
95 archive(byte) = "zip.cma"
96 archive(native) = "zip.cmxa"
97 linkopts = ""
98 EOF
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %files
104 %defattr(644,root,root,755)
105 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
106 %if %{with ocaml_opt}
107 %{_libdir}/ocaml/zip/*.cmxs
108 %endif
109
110 %files devel
111 %defattr(644,root,root,755)
112 %doc README *.mli
113 %dir %{_libdir}/ocaml/zip
114 %{_libdir}/ocaml/zip/*.cma
115 %{_libdir}/ocaml/zip/*.cm[ix]
116 %{_libdir}/ocaml/zip/*.mli
117 %{_libdir}/ocaml/zip/libcamlzip.a
118 %if %{with ocaml_opt}
119 %{_libdir}/ocaml/zip/*.cmxa
120 %{_libdir}/ocaml/zip/zip.a
121 %endif
122 %{_examplesdir}/%{name}-%{version}
123 %{_libdir}/ocaml/site-lib/zip
This page took 0.060235 seconds and 2 git commands to generate.