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