]> git.pld-linux.org Git - packages/ocaml-topkg.git/blob - ocaml-topkg.spec
- typo
[packages/ocaml-topkg.git] / ocaml-topkg.spec
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
13 Summary:        Topkg - the transitory OCaml software packager
14 Summary(pl.UTF-8):      Topkg - przejściowe narzędzie do pakowania oprogramowania w OCamlu
15 Name:           ocaml-topkg
16 Version:        1.0.3
17 Release:        1
18 License:        ISC
19 Group:          Libraries
20 Source0:        https://erratique.ch/software/topkg/releases/topkg-%{version}.tbz
21 # Source0-md5:  e285f7a296d77ee7d831ba9a6bfb396f
22 URL:            https://erratique.ch/software/topkg/
23 BuildRequires:  ocaml >= 1:4.03.0
24 BuildRequires:  ocaml-findlib >= 1.6.1
25 BuildRequires:  ocaml-ocamlbuild
26 %requires_eq    ocaml-runtime
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         debug_package   %{nil}
30
31 %description
32 Topkg is a packager for distributing OCaml software. It provides an
33 API to describe the files a package installs in a given build
34 configuration and to specify information about the package's
35 distribution, creation and publication procedures.
36
37 %description -l pl.UTF-8
38 Topkg to narzędzie do pakowania, przeznaczone do dystrybucji
39 oprogramowania w OCamlu. Udostępnia API do opisu plików instalowanych
40 przez pakiet w danych konfiguracjach budowania oraz przekazania
41 informacji o procedurze dystrybucji, tworzenia i publikacji pakietu.
42
43 %package devel
44 Summary:        Topkg - the transitory OCaml software packager - development part
45 Summary(pl.UTF-8):      Topkg - przejściowe narzędzie do pakowania oprogramowania w OCamlu - część programistyczna
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48 %requires_eq    ocaml
49
50 %description devel
51 This package contains files needed to develop OCaml programs using
52 topkg library.
53
54 %description devel -l pl.UTF-8
55 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
56 używających biblioteki topkg.
57
58 %prep
59 %setup -q -n topkg-%{version}
60
61 %build
62 ocaml pkg/pkg.ml build \
63         --pkg-name topkg
64
65 # CLI tool
66 %if %{with ocaml_opt}
67 ocamlbuild topkg.native
68 %else
69 ocamlbuild topkg.byte
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/topkg}
75
76 cp -p _build/topkg.opam $RPM_BUILD_ROOT%{_libdir}/ocaml/topkg/opam
77 cp -p _build/pkg/META $RPM_BUILD_ROOT%{_libdir}/ocaml/topkg
78 cp -p _build/src/*.{cma,cmi,cmt,cmti,mli} $RPM_BUILD_ROOT%{_libdir}/ocaml/topkg
79 %if %{with ocaml_opt}
80 cp -p _build/src/*.{a,cmx,cmxa,cmxs} $RPM_BUILD_ROOT%{_libdir}/ocaml/topkg
81 %endif
82
83 %if %{with ocaml_opt}
84 install _build/src/topkg.native $RPM_BUILD_ROOT%{_bindir}/topkg
85 %else
86 install _build/src/topkg.byte $RPM_BUILD_ROOT%{_bindir}/topkg
87 %endif
88
89 %clean
90 rm -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.121791 seconds and 3 git commands to generate.