]> git.pld-linux.org Git - packages/coq.git/blob - coq.spec
- arm is a macro containing actual arm subarchs
[packages/coq.git] / coq.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # skip building native optimized binaries (bytecode is always built)
4 %bcond_with     tests           # run testsuite (csdp dependant micromega tests fail badly on x86_64)
5 #
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine       with_ocaml_opt
8 %endif
9
10 Summary:        The Coq Proof Assistant
11 Summary(pl.UTF-8):      Coq - narzędzie pomagające w udowadnianiu
12 Name:           coq
13 Version:        8.13.1
14 Release:        1
15 License:        LGPL v2.1
16 Group:          Applications/Math
17 Source0:        https://github.com/coq/coq/archive/V%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5:  03ebbf1034c224a0a3327db2d5688c29
19 Source1:        coqide.desktop
20 Source2:        coqide.xpm
21 URL:            http://coq.inria.fr/
22 BuildRequires:  bash
23 BuildRequires:  hevea
24 BuildRequires:  netpbm-progs
25 BuildRequires:  ocaml >= 1:4.05
26 BuildRequires:  camlp5 >= 5.01
27 BuildRequires:  ocaml-dune > 2.5.0
28 BuildRequires:  ocaml-findlib >= 1.8.1
29 BuildRequires:  ocaml-zarith-devel >= 1.10
30 BuildRequires:  ocaml-lablgtk3-devel
31 BuildRequires:  ocaml-lablgtk3-gtksourceview-devel
32 BuildRequires:  sed >= 4.0
33 BuildRequires:  texlive-fonts-cmextra
34 BuildRequires:  texlive-fonts-cmsuper
35 BuildRequires:  texlive-fonts-other
36 BuildRequires:  texlive-format-pdflatex
37 BuildRequires:  texlive-latex-ams
38 BuildRequires:  texlive-latex-comment
39 BuildRequires:  texlive-latex-moreverb
40 BuildRequires:  texlive-latex-ucs
41 BuildRequires:  texlive-makeindex
42 BuildRequires:  texlive-psutils
43 # hyperref.sty (from latex) requires ifxexex.sty (from xetex)
44 BuildRequires:  texlive-xetex
45 %requires_eq    ocaml-runtime
46 Obsoletes:      coq-emacs < 8.13.1
47 # same as ocaml-zarith
48 ExclusiveArch:  %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Coq is a proof assistant which:
53  - allows to handle calculus assertions,
54  - check mechanically proofs of these assertions,
55  - helps to find formal proofs,
56  - extracts a certified program from the constructive proof of its
57    formal specification.
58
59 %description -l pl.UTF-8
60 Coq to narzędzie pomagające w udowadnianiu, które:
61 - pozwala uporać się z twierdzeniami dotyczącymi rachunku
62   różniczkowego,
63 - mechanicznie sprawdzać dowody tych twierdzeń,
64 - pomagać w znalezieniu formalnych dowodów,
65 - wyciągać program o dowiedzionej poprawności z konstruktywnego dowodu
66   jego formalnej specyfikacji.
67
68 %package latex
69 Summary:        Coq documentation style for latex
70 Summary(pl.UTF-8):      Styl dokumentacji Coq dla latexa
71 Group:          Development/Tools
72 Requires:       %{name} = %{version}-%{release}
73
74 %description latex
75 Coq documentation style for latex.
76
77 %description latex -l pl.UTF-8
78 Styl dokumentacji Coq dla latexa.
79
80 %prep
81 %setup -q
82
83 %{__sed} -ri '/FULLCONFIGDIR/s/OLDROOT|COQINSTALLPREFIX/&2/g' Makefile.install
84 %{__sed} -i 's|-Wall.*-O2|%{rpmcflags} -Wno-unused|' configure.ml
85 %{__sed} -i "s|-oc|-ccopt '%{rpmldflags}' -g &|" Makefile.build
86 %{__sed} -i 's,-shared,& -g,g' tools/CoqMakefile.in Makefile.build
87
88 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
89       tools/make-both-single-timing-files.py \
90       tools/make-both-time-files.py \
91       tools/make-one-time-file.py
92
93 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python3}\1,' \
94       doc/tools/coqrst/notations/fontsupport.py
95
96 %build
97 ./configure \
98         -bindir %{_bindir} \
99         -libdir %{_libdir}/coq \
100         -mandir %{_mandir} \
101         -docdir %{_docdir}/%{name}-%{version} \
102         -configdir %{_sysconfdir}/%{name} \
103         -datadir %{_datadir}/%{name} \
104         -coqdocdir %{_datadir}/texmf/tex/latex/misc \
105 %if %{with ocaml_opt}
106         -native-compiler yes \
107         -coqide opt \
108 %else
109         -byte-only \
110         -native-compiler no \
111         -coqide byte \
112 %endif
113         -browser "xdg-open %s"
114
115 %{__make} world VERBOSE=1 CAML_LD_LIBRARY_PATH=kernel/byterun
116 %{?with_tests:%{__make} check VERBOSE=1 CAML_LD_LIBRARY_PATH=kernel/byterun} # Use native coq to compile theories
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
121
122 %{__make} install \
123         COQINSTALLPREFIX=$RPM_BUILD_ROOT%{_prefix} \
124         COQINSTALLPREFIX2=$RPM_BUILD_ROOT%{_sysconfdir} \
125         OLDROOT=%{_prefix} \
126         OLDROOT2=%{_sysconfdir}
127
128 # To install only locally the binaries compiled with absolute paths
129
130 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
131 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
132
133 cp -p CONTRIBUTING.md README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %files
139 %defattr(644,root,root,755)
140 %doc %{_docdir}/%{name}-%{version}
141 %dir %{_sysconfdir}/%{name}
142 %attr(755,root,root) %{_bindir}/coqc
143 %attr(755,root,root) %{_bindir}/coqchk
144 %attr(755,root,root) %{_bindir}/coqdep
145 %attr(755,root,root) %{_bindir}/coqdoc
146 %attr(755,root,root) %{_bindir}/coqide*
147 %attr(755,root,root) %{_bindir}/coq_makefile
148 %attr(755,root,root) %{_bindir}/coqpp
149 %attr(755,root,root) %{_bindir}/coqproofworker.opt
150 %attr(755,root,root) %{_bindir}/coqqueryworker.opt
151 %attr(755,root,root) %{_bindir}/coqtacticworker.opt
152 %attr(755,root,root) %{_bindir}/coq-tex
153 %attr(755,root,root) %{_bindir}/coqtop
154 %attr(755,root,root) %{_bindir}/coqtop.opt
155 %attr(755,root,root) %{_bindir}/coqwc
156 %attr(755,root,root) %{_bindir}/coqworkmgr
157 %attr(755,root,root) %{_bindir}/ocamllibdep
158 %attr(755,root,root) %{_bindir}/votour
159 %dir %{_libdir}/coq
160 %{_libdir}/coq/*
161 %{_mandir}/man1/coq_makefile.1*
162 %{_mandir}/man1/coq-tex.1*
163 %{_mandir}/man1/coqc.1*
164 %{_mandir}/man1/coqchk.1*
165 %{_mandir}/man1/coqdep.1*
166 %{_mandir}/man1/coqdoc.1*
167 %{_mandir}/man1/coqide.1*
168 %{_mandir}/man1/coqtop.1*
169 %{_mandir}/man1/coqtop.byte.1*
170 %{?with_ocaml_opt:%{_mandir}/man1/coqtop.opt.1*}
171 %{_mandir}/man1/coqwc.1*
172 %{_desktopdir}/coqide.desktop
173 %{_pixmapsdir}/coqide.xpm
174 %{_datadir}/%{name}
175
176 %files latex
177 %defattr(644,root,root,755)
178 %{_datadir}/texmf/tex/latex/misc/coqdoc.sty
This page took 0.100528 seconds and 4 git commands to generate.