- arm is a macro containing actual arm subarchs
[packages/coq.git] / coq.spec
CommitLineData
8f33d8d4
JR
1#
2# Conditional build:
48226845
JR
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)
8f33d8d4 5#
39bb0263 6%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
48226845
JR
7%undefine with_ocaml_opt
8%endif
9
521adcea 10Summary: The Coq Proof Assistant
374d5475 11Summary(pl.UTF-8): Coq - narzędzie pomagające w udowadnianiu
680764bb 12Name: coq
b2cb8983 13Version: 8.13.1
6b871b2b 14Release: 1
83437006 15License: LGPL v2.1
680764bb 16Group: Applications/Math
b2cb8983
JR
17Source0: https://github.com/coq/coq/archive/V%{version}/%{name}-%{version}.tar.gz
18# Source0-md5: 03ebbf1034c224a0a3327db2d5688c29
8bee228d
JR
19Source1: coqide.desktop
20Source2: coqide.xpm
3432574d 21URL: http://coq.inria.fr/
5f0acdc3 22BuildRequires: bash
8bee228d
JR
23BuildRequires: hevea
24BuildRequires: netpbm-progs
b2cb8983 25BuildRequires: ocaml >= 1:4.05
5f0acdc3 26BuildRequires: camlp5 >= 5.01
b2cb8983
JR
27BuildRequires: ocaml-dune > 2.5.0
28BuildRequires: ocaml-findlib >= 1.8.1
29BuildRequires: ocaml-zarith-devel >= 1.10
30BuildRequires: ocaml-lablgtk3-devel
31BuildRequires: ocaml-lablgtk3-gtksourceview-devel
5f0acdc3 32BuildRequires: sed >= 4.0
9e2234f9 33BuildRequires: texlive-fonts-cmextra
83437006 34BuildRequires: texlive-fonts-cmsuper
9e2234f9 35BuildRequires: texlive-fonts-other
83437006 36BuildRequires: texlive-format-pdflatex
308e7511 37BuildRequires: texlive-latex-ams
8bee228d 38BuildRequires: texlive-latex-comment
b46eabb1 39BuildRequires: texlive-latex-moreverb
83437006
JB
40BuildRequires: texlive-latex-ucs
41BuildRequires: texlive-makeindex
8edb6738 42BuildRequires: texlive-psutils
83437006
JB
43# hyperref.sty (from latex) requires ifxexex.sty (from xetex)
44BuildRequires: texlive-xetex
f4499714 45%requires_eq ocaml-runtime
b2cb8983 46Obsoletes: coq-emacs < 8.13.1
3e0583a4 47# same as ocaml-zarith
39bb0263 48ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
680764bb
JR
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%description
52Coq is a proof assistant which:
bcd66107 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.
3432574d 58
3f4e388b
JR
59%description -l pl.UTF-8
60Coq 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,
b2cb8983
JR
65- wyciągać program o dowiedzionej poprawności z konstruktywnego dowodu
66 jego formalnej specyfikacji.
9019ffc7
JR
67
68%package latex
69Summary: Coq documentation style for latex
70Summary(pl.UTF-8): Styl dokumentacji Coq dla latexa
71Group: Development/Tools
72Requires: %{name} = %{version}-%{release}
73
74%description latex
75Coq documentation style for latex.
76
77%description latex -l pl.UTF-8
78Styl dokumentacji Coq dla latexa.
79
680764bb
JR
80%prep
81%setup -q
5f0acdc3 82
b2cb8983
JR
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
680764bb
JR
95
96%build
97./configure \
98 -bindir %{_bindir} \
99 -libdir %{_libdir}/coq \
100 -mandir %{_mandir} \
2dc46485 101 -docdir %{_docdir}/%{name}-%{version} \
650aa0b6
JR
102 -configdir %{_sysconfdir}/%{name} \
103 -datadir %{_datadir}/%{name} \
6b871b2b 104 -coqdocdir %{_datadir}/texmf/tex/latex/misc \
b2cb8983
JR
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"
680764bb 114
b2cb8983
JR
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
680764bb
JR
117
118%install
119rm -rf $RPM_BUILD_ROOT
8bee228d 120install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
3432574d 121
b2cb8983
JR
122%{__make} install \
123 COQINSTALLPREFIX=$RPM_BUILD_ROOT%{_prefix} \
124 COQINSTALLPREFIX2=$RPM_BUILD_ROOT%{_sysconfdir} \
125 OLDROOT=%{_prefix} \
126 OLDROOT2=%{_sysconfdir}
127
680764bb
JR
128# To install only locally the binaries compiled with absolute paths
129
b2cb8983
JR
130cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
131cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
8bee228d 132
b2cb8983 133cp -p CONTRIBUTING.md README.md $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
c10c241b 134
680764bb
JR
135%clean
136rm -rf $RPM_BUILD_ROOT
137
138%files
139%defattr(644,root,root,755)
c10c241b 140%doc %{_docdir}/%{name}-%{version}
650aa0b6 141%dir %{_sysconfdir}/%{name}
680764bb 142%attr(755,root,root) %{_bindir}/coqc
2dc46485 143%attr(755,root,root) %{_bindir}/coqchk
680764bb 144%attr(755,root,root) %{_bindir}/coqdep
1c74cbbc 145%attr(755,root,root) %{_bindir}/coqdoc
5f0acdc3 146%attr(755,root,root) %{_bindir}/coqide*
b2cb8983
JR
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
861daf7b 153%attr(755,root,root) %{_bindir}/coqtop
b2cb8983 154%attr(755,root,root) %{_bindir}/coqtop.opt
1c74cbbc 155%attr(755,root,root) %{_bindir}/coqwc
6b871b2b 156%attr(755,root,root) %{_bindir}/coqworkmgr
b2cb8983
JR
157%attr(755,root,root) %{_bindir}/ocamllibdep
158%attr(755,root,root) %{_bindir}/votour
3432574d 159%dir %{_libdir}/coq
1c74cbbc 160%{_libdir}/coq/*
9019ffc7
JR
161%{_mandir}/man1/coq_makefile.1*
162%{_mandir}/man1/coq-tex.1*
680764bb 163%{_mandir}/man1/coqc.1*
2dc46485
JR
164%{_mandir}/man1/coqchk.1*
165%{_mandir}/man1/coqdep.1*
166%{_mandir}/man1/coqdoc.1*
2dc46485 167%{_mandir}/man1/coqide.1*
680764bb
JR
168%{_mandir}/man1/coqtop.1*
169%{_mandir}/man1/coqtop.byte.1*
9e2234f9 170%{?with_ocaml_opt:%{_mandir}/man1/coqtop.opt.1*}
1c74cbbc 171%{_mandir}/man1/coqwc.1*
8bee228d
JR
172%{_desktopdir}/coqide.desktop
173%{_pixmapsdir}/coqide.xpm
650aa0b6 174%{_datadir}/%{name}
9019ffc7 175
9019ffc7
JR
176%files latex
177%defattr(644,root,root,755)
178%{_datadir}/texmf/tex/latex/misc/coqdoc.sty
This page took 0.347584 seconds and 4 git commands to generate.