]> git.pld-linux.org Git - packages/coq.git/blame_incremental - coq.spec
- updated dependencies, added doc and sse2 bconds
[packages/coq.git] / coq.spec
... / ...
CommitLineData
1#
2# Conditional build:
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)
7#
8%ifarch pentium4 %{x8664} x32
9%define with_sse2 1
10%endif
11
12%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
13%undefine with_ocaml_opt
14%endif
15
16Summary: The Coq Proof Assistant
17Summary(pl.UTF-8): Coq - narzędzie pomagające w udowadnianiu
18Name: coq
19Version: 8.13.1
20Release: 5
21License: LGPL v2.1
22Group: Applications/Math
23Source0: https://github.com/coq/coq/archive/V%{version}/%{name}-%{version}.tar.gz
24# Source0-md5: 03ebbf1034c224a0a3327db2d5688c29
25Source1: coqide.desktop
26Source2: coqide.xpm
27URL: https://coq.inria.fr/
28BuildRequires: bash
29BuildRequires: ocaml >= 1:4.05
30BuildRequires: camlp5 >= 5.01
31BuildRequires: ocaml-dune > 2.5.0
32BuildRequires: ocaml-findlib >= 1.8.1
33BuildRequires: ocaml-zarith-devel >= 1.10
34BuildRequires: ocaml-lablgtk3-devel >= 3.1.0
35BuildRequires: ocaml-lablgtk3-gtksourceview-devel >= 3.1.0
36BuildRequires: sed >= 4.0
37%if %{with doc}
38BuildRequires: python3 >= 1:3
39# TODO (and adjust package name)
40BuildRequires: python3-antlr4-python3-runtime >= 4.7.1
41BuildRequires: python3-bs4 >= 4.0.6
42BuildRequires: python3-pexpect >= 4.2.1
43BuildRequires: python3-sphinx_rtd_theme >= 0.4.3
44# TODO (and adjust package name)
45BuildRequires: python3-sphinxcontrib-bibtex >= 0.4.2
46BuildRequires: sphinx-pdg >= 2.3.1
47# TODO: update texlive packages list (or drop pdf building leaving only html)
48BuildRequires: texlive-fonts-cmextra
49BuildRequires: texlive-fonts-cmsuper
50BuildRequires: texlive-fonts-other
51BuildRequires: texlive-format-pdflatex
52BuildRequires: texlive-latex-ams
53BuildRequires: texlive-latex-comment
54BuildRequires: texlive-latex-moreverb
55BuildRequires: texlive-latex-ucs
56BuildRequires: texlive-makeindex
57BuildRequires: texlive-psutils
58# hyperref.sty (from latex) requires ifxexex.sty (from xetex)
59BuildRequires: texlive-xetex
60%endif
61%if %{with sse2}
62Requires: cpuinfo(sse2)
63%endif
64%requires_eq ocaml-runtime
65Obsoletes: coq-emacs < 8.13.1
66# same as ocaml-zarith
67ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
68BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70# Exclude private ocaml interfaces
71%define _noautoreq ocamlx?\\\((Configwin_types|Interface|Richpp|Serialize|Xml_p(arser|rinter)|Xmlprotocol)\\\)
72
73%description
74Coq 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
79 formal specification.
80
81%description -l pl.UTF-8
82Coq to narzędzie pomagające w udowadnianiu, które:
83- pozwala uporać się z twierdzeniami dotyczącymi rachunku
84 różniczkowego,
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.
89
90%package latex
91Summary: Coq documentation style for LaTeX
92Summary(pl.UTF-8): Styl dokumentacji Coq dla LaTeXa
93Group: Development/Tools
94Requires: %{name} = %{version}-%{release}
95
96%description latex
97Coq documentation style for LaTeX.
98
99%description latex -l pl.UTF-8
100Styl dokumentacji Coq dla LaTeXa.
101
102%prep
103%setup -q
104
105%{__sed} -ri '/FULLCONFIGDIR/s/OLDROOT|COQINSTALLPREFIX/&2/g' Makefile.install
106%{__sed} -i 's|-Wall.*-O2|%{rpmcflags} -Wno-unused|' configure.ml
107%if %{with sse2}
108%{__sed} -i -e '/cflags_sse2/ s/-msse2 -mfpmath=sse//' configure.ml
109%endif
110%{__sed} -i "s|-oc|-ccopt '%{rpmldflags}' -g &|" Makefile.build
111%{__sed} -i 's,-shared,& -g,g' tools/CoqMakefile.in Makefile.build
112
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
117
118%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python3}\1,' \
119 doc/tools/coqrst/notations/fontsupport.py
120
121%build
122./configure \
123 -bindir %{_bindir} \
124 -configdir %{_sysconfdir}/%{name} \
125 -coqdocdir %{_datadir}/texmf/tex/latex/misc \
126 -datadir %{_datadir}/%{name} \
127 -docdir %{_docdir}/%{name}-%{version} \
128 -libdir %{_libdir}/coq \
129 -mandir %{_mandir} \
130%if %{with ocaml_opt}
131 -coqide opt \
132 -native-compiler yes \
133%else
134 -byte-only \
135 -coqide byte \
136 -native-compiler no \
137%endif
138 -browser "xdg-open %s" \
139 %{?with_doc:-with-doc yes}
140
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
143
144%install
145rm -rf $RPM_BUILD_ROOT
146install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
147
148%{__make} install \
149 COQINSTALLPREFIX=$RPM_BUILD_ROOT%{_prefix} \
150 COQINSTALLPREFIX2=$RPM_BUILD_ROOT%{_sysconfdir} \
151 OLDROOT=%{_prefix} \
152 OLDROOT2=%{_sysconfdir}
153
154# To install only locally the binaries compiled with absolute paths
155
156cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
157cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
158
159cp -p CONTRIBUTING.md CREDITS README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
160
161%clean
162rm -rf $RPM_BUILD_ROOT
163
164%files
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
185%dir %{_libdir}/coq
186%{_libdir}/coq/*
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
200%{_datadir}/%{name}
201
202%files latex
203%defattr(644,root,root,755)
204%{_datadir}/texmf/tex/latex/misc/coqdoc.sty
This page took 0.078406 seconds and 4 git commands to generate.