]> git.pld-linux.org Git - packages/ocaml-topkg.git/blame - ocaml-topkg.spec
- typo
[packages/ocaml-topkg.git] / ocaml-topkg.spec
CommitLineData
616e0079
JB
1# TODO:
2# - topkg-care (BR: fmt, logs, bos >= 0.1.5, cmdliner >= 1.0.0, webbrowser, opam-format >= 2.0.0)
3# - docs (BR ocaml-odoc)
4#
5# Conditional build:
6%bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
7
8# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
9%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
10%undefine with_ocaml_opt
11%endif
12
13Summary: Topkg - the transitory OCaml software packager
14Summary(pl.UTF-8): Topkg - przejściowe narzędzie do pakowania oprogramowania w OCamlu
15Name: ocaml-topkg
16Version: 1.0.3
17Release: 1
18License: ISC
19Group: Libraries
20Source0: https://erratique.ch/software/topkg/releases/topkg-%{version}.tbz
21# Source0-md5: e285f7a296d77ee7d831ba9a6bfb396f
22URL: https://erratique.ch/software/topkg/
23BuildRequires: ocaml >= 1:4.03.0
24BuildRequires: ocaml-findlib >= 1.6.1
25BuildRequires: ocaml-ocamlbuild
26%requires_eq ocaml-runtime
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%define debug_package %{nil}
30
31%description
32Topkg is a packager for distributing OCaml software. It provides an
33API to describe the files a package installs in a given build
34configuration and to specify information about the package's
35distribution, creation and publication procedures.
36
37%description -l pl.UTF-8
38Topkg to narzędzie do pakowania, przeznaczone do dystrybucji
39oprogramowania w OCamlu. Udostępnia API do opisu plików instalowanych
40przez pakiet w danych konfiguracjach budowania oraz przekazania
41informacji o procedurze dystrybucji, tworzenia i publikacji pakietu.
42
43%package devel
44Summary: Topkg - the transitory OCaml software packager - development part
997d383d 45Summary(pl.UTF-8): Topkg - przejściowe narzędzie do pakowania oprogramowania w OCamlu - część programistyczna
616e0079
JB
46Group: Development/Libraries
47Requires: %{name} = %{version}-%{release}
48%requires_eq ocaml
49
50%description devel
51This package contains files needed to develop OCaml programs using
52topkg library.
53
54%description devel -l pl.UTF-8
55Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
56używających biblioteki topkg.
57
58%prep
59%setup -q -n topkg-%{version}
60
61%build
62ocaml pkg/pkg.ml build \
63 --pkg-name topkg
64
65# CLI tool
66%if %{with ocaml_opt}
67ocamlbuild topkg.native
68%else
69ocamlbuild topkg.byte
70%endif
71
72%install
73rm -rf $RPM_BUILD_ROOT
74install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/topkg}
75
76cp -p _build/topkg.opam $RPM_BUILD_ROOT%{_libdir}/ocaml/topkg/opam
77cp -p _build/pkg/META $RPM_BUILD_ROOT%{_libdir}/ocaml/topkg
78cp -p _build/src/*.{cma,cmi,cmt,cmti,mli} $RPM_BUILD_ROOT%{_libdir}/ocaml/topkg
79%if %{with ocaml_opt}
80cp -p _build/src/*.{a,cmx,cmxa,cmxs} $RPM_BUILD_ROOT%{_libdir}/ocaml/topkg
81%endif
82
83%if %{with ocaml_opt}
84install _build/src/topkg.native $RPM_BUILD_ROOT%{_bindir}/topkg
85%else
86install _build/src/topkg.byte $RPM_BUILD_ROOT%{_bindir}/topkg
87%endif
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%files
93%defattr(644,root,root,755)
94%doc CHANGES.md LICENSE.md README.md
95%attr(755,root,root) %{_bindir}/topkg
96%dir %{_libdir}/ocaml/topkg
97%{_libdir}/ocaml/topkg/META
98%{_libdir}/ocaml/topkg/*.cma
99%if %{with ocaml_opt}
100%attr(755,root,root) %{_libdir}/ocaml/topkg/*.cmxs
101%endif
102
103%files devel
104%defattr(644,root,root,755)
105%{_libdir}/ocaml/topkg/*.cmi
106%{_libdir}/ocaml/topkg/*.cmt
107%{_libdir}/ocaml/topkg/*.cmti
108%{_libdir}/ocaml/topkg/*.mli
109%if %{with ocaml_opt}
110%{_libdir}/ocaml/topkg/*.a
111%{_libdir}/ocaml/topkg/*.cmx
112%{_libdir}/ocaml/topkg/*.cmxa
113%endif
114%{_libdir}/ocaml/topkg/opam
This page took 0.064751 seconds and 4 git commands to generate.