3 %bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
4 %bcond_with sse2 # SSE2 instructions
5 %bcond_with doc # documentation
6 %bcond_with tests # run testsuite (csdp dependant micromega tests fail badly on x86_64)
8 %ifarch pentium4 %{x8664} x32
12 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
13 %undefine with_ocaml_opt
16 Summary: The Coq Proof Assistant
17 Summary(pl.UTF-8): Coq - narzędzie pomagające w udowadnianiu
22 Group: Applications/Math
23 Source0: https://github.com/coq/coq/archive/V%{version}/%{name}-%{version}.tar.gz
24 # Source0-md5: 03ebbf1034c224a0a3327db2d5688c29
25 Source1: coqide.desktop
27 URL: https://coq.inria.fr/
29 BuildRequires: ocaml >= 1:4.05
30 BuildRequires: camlp5 >= 5.01
31 BuildRequires: ocaml-dune > 2.5.0
32 BuildRequires: ocaml-findlib >= 1.8.1
33 BuildRequires: ocaml-zarith-devel >= 1.10
34 BuildRequires: ocaml-lablgtk3-devel >= 3.1.0
35 BuildRequires: ocaml-lablgtk3-gtksourceview-devel >= 3.1.0
36 BuildRequires: sed >= 4.0
38 BuildRequires: python3 >= 1:3
39 # TODO (and adjust package name)
40 BuildRequires: python3-antlr4-python3-runtime >= 4.7.1
41 BuildRequires: python3-bs4 >= 4.0.6
42 BuildRequires: python3-pexpect >= 4.2.1
43 BuildRequires: python3-sphinx_rtd_theme >= 0.4.3
44 # TODO (and adjust package name)
45 BuildRequires: python3-sphinxcontrib-bibtex >= 0.4.2
46 BuildRequires: sphinx-pdg >= 2.3.1
47 # TODO: update texlive packages list (or drop pdf building leaving only html)
48 BuildRequires: texlive-fonts-cmextra
49 BuildRequires: texlive-fonts-cmsuper
50 BuildRequires: texlive-fonts-other
51 BuildRequires: texlive-format-pdflatex
52 BuildRequires: texlive-latex-ams
53 BuildRequires: texlive-latex-comment
54 BuildRequires: texlive-latex-moreverb
55 BuildRequires: texlive-latex-ucs
56 BuildRequires: texlive-makeindex
57 BuildRequires: texlive-psutils
58 # hyperref.sty (from latex) requires ifxexex.sty (from xetex)
59 BuildRequires: texlive-xetex
62 Requires: cpuinfo(sse2)
64 %requires_eq ocaml-runtime
65 Obsoletes: coq-emacs < 8.13.1
66 # same as ocaml-zarith
67 ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
68 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70 # Exclude private ocaml interfaces
71 %define _noautoreq ocamlx?\\\((Configwin_types|Interface|Richpp|Serialize|Xml_p(arser|rinter)|Xmlprotocol)\\\)
74 Coq is a proof assistant which:
75 - allows to handle calculus assertions,
76 - check mechanically proofs of these assertions,
77 - helps to find formal proofs,
78 - extracts a certified program from the constructive proof of its
81 %description -l pl.UTF-8
82 Coq to narzędzie pomagające w udowadnianiu, które:
83 - pozwala uporać się z twierdzeniami dotyczącymi rachunku
85 - mechanicznie sprawdzać dowody tych twierdzeń,
86 - pomagać w znalezieniu formalnych dowodów,
87 - wyciągać program o dowiedzionej poprawności z konstruktywnego dowodu
88 jego formalnej specyfikacji.
91 Summary: Coq documentation style for LaTeX
92 Summary(pl.UTF-8): Styl dokumentacji Coq dla LaTeXa
93 Group: Development/Tools
94 Requires: %{name} = %{version}-%{release}
97 Coq documentation style for LaTeX.
99 %description latex -l pl.UTF-8
100 Styl dokumentacji Coq dla LaTeXa.
105 %{__sed} -ri '/FULLCONFIGDIR/s/OLDROOT|COQINSTALLPREFIX/&2/g' Makefile.install
106 %{__sed} -i 's|-Wall.*-O2|%{rpmcflags} -Wno-unused|' configure.ml
108 %{__sed} -i -e '/cflags_sse2/ s/-msse2 -mfpmath=sse//' configure.ml
110 %{__sed} -i "s|-oc|-ccopt '%{rpmldflags}' -g &|" Makefile.build
111 %{__sed} -i 's,-shared,& -g,g' tools/CoqMakefile.in Makefile.build
113 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
114 tools/make-both-single-timing-files.py \
115 tools/make-both-time-files.py \
116 tools/make-one-time-file.py
118 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python3}\1,' \
119 doc/tools/coqrst/notations/fontsupport.py
124 -configdir %{_sysconfdir}/%{name} \
125 -coqdocdir %{_datadir}/texmf/tex/latex/misc \
126 -datadir %{_datadir}/%{name} \
127 -docdir %{_docdir}/%{name}-%{version} \
128 -libdir %{_libdir}/coq \
130 %if %{with ocaml_opt}
132 -native-compiler yes \
136 -native-compiler no \
138 -browser "xdg-open %s" \
139 %{?with_doc:-with-doc yes}
141 %{__make} world VERBOSE=1 CAML_LD_LIBRARY_PATH=kernel/byterun
142 %{?with_tests:%{__make} check VERBOSE=1 CAML_LD_LIBRARY_PATH=kernel/byterun} # Use native coq to compile theories
145 rm -rf $RPM_BUILD_ROOT
146 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
149 COQINSTALLPREFIX=$RPM_BUILD_ROOT%{_prefix} \
150 COQINSTALLPREFIX2=$RPM_BUILD_ROOT%{_sysconfdir} \
152 OLDROOT2=%{_sysconfdir}
154 # To install only locally the binaries compiled with absolute paths
156 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
157 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
159 cp -p CONTRIBUTING.md CREDITS README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
162 rm -rf $RPM_BUILD_ROOT
165 %defattr(644,root,root,755)
166 %doc %{_docdir}/%{name}-%{version}
167 %dir %{_sysconfdir}/%{name}
168 %attr(755,root,root) %{_bindir}/coqc
169 %attr(755,root,root) %{_bindir}/coqchk
170 %attr(755,root,root) %{_bindir}/coqdep
171 %attr(755,root,root) %{_bindir}/coqdoc
172 %attr(755,root,root) %{_bindir}/coqide*
173 %attr(755,root,root) %{_bindir}/coq_makefile
174 %attr(755,root,root) %{_bindir}/coqpp
175 %attr(755,root,root) %{_bindir}/coqproofworker.opt
176 %attr(755,root,root) %{_bindir}/coqqueryworker.opt
177 %attr(755,root,root) %{_bindir}/coqtacticworker.opt
178 %attr(755,root,root) %{_bindir}/coq-tex
179 %attr(755,root,root) %{_bindir}/coqtop
180 %attr(755,root,root) %{_bindir}/coqtop.opt
181 %attr(755,root,root) %{_bindir}/coqwc
182 %attr(755,root,root) %{_bindir}/coqworkmgr
183 %attr(755,root,root) %{_bindir}/ocamllibdep
184 %attr(755,root,root) %{_bindir}/votour
187 %{_mandir}/man1/coq_makefile.1*
188 %{_mandir}/man1/coq-tex.1*
189 %{_mandir}/man1/coqc.1*
190 %{_mandir}/man1/coqchk.1*
191 %{_mandir}/man1/coqdep.1*
192 %{_mandir}/man1/coqdoc.1*
193 %{_mandir}/man1/coqide.1*
194 %{_mandir}/man1/coqtop.1*
195 %{_mandir}/man1/coqtop.byte.1*
196 %{?with_ocaml_opt:%{_mandir}/man1/coqtop.opt.1*}
197 %{_mandir}/man1/coqwc.1*
198 %{_desktopdir}/coqide.desktop
199 %{_pixmapsdir}/coqide.xpm
203 %defattr(644,root,root,755)
204 %{_datadir}/texmf/tex/latex/misc/coqdoc.sty