]> git.pld-linux.org Git - packages/coq.git/blob - coq.spec
ea6a53daba398fe20be740225edfb4fbe06e9eb7
[packages/coq.git] / coq.spec
1 #
2 # TODO:
3 #       - package and R: Csdp (https://projects.coin-or.org/Csdp)
4 #
5 # Conditional build:
6 %bcond_without  ocaml_opt       # skip building native optimized binaries (bytecode is always built)
7 %bcond_with     tests           # run testsuite (csdp dependant micromega tests fail badly on x86_64)
8 #
9 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
10 %undefine       with_ocaml_opt
11 %endif
12
13 Summary:        The Coq Proof Assistant
14 Summary(pl.UTF-8):      Coq - narzędzie pomagające w udowadnianiu
15 Name:           coq
16 Version:        8.4pl5
17 Release:        1
18 License:        GPL
19 Group:          Applications/Math
20 Vendor:         INRIA Rocquencourt
21 Source0:        http://coq.inria.fr/distrib/V%{version}/files/%{name}-%{version}.tar.gz
22 # Source0-md5:  7839005b48527a85149da950bd2ac006
23 Source1:        coqide.desktop
24 Source2:        coqide.xpm
25 Patch0:         %{name}-lablgtk2.patch
26 URL:            http://coq.inria.fr/
27 BuildRequires:  bash
28 BuildRequires:  emacs
29 BuildRequires:  hevea
30 BuildRequires:  netpbm-progs
31 BuildRequires:  ocaml >= 3.09.0
32 BuildRequires:  camlp5 >= 5.01
33 BuildRequires:  ocaml-lablgtk2-devel >= 2.12.0
34 BuildRequires:  sed >= 4.0
35 BuildRequires:  texlive-latex-ams
36 BuildRequires:  texlive-latex-comment
37 BuildRequires:  texlive-latex-moreverb
38 BuildRequires:  texlive-psutils
39 BuildRequires:  texlive-format-pdflatex
40 %requires_eq    ocaml-runtime
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Coq is a proof assistant which:
45  - allows to handle calculus assertions,
46  - check mechanically proofs of these assertions,
47  - helps to find formal proofs,
48  - extracts a certified program from the constructive proof of its
49    formal specification.
50
51 %description -l pl.UTF-8
52 Coq to narzędzie pomagające w udowadnianiu, które:
53 - pozwala uporać się z twierdzeniami dotyczącymi rachunku
54   różniczkowego,
55 - mechanicznie sprawdzać dowody tych twierdzeń,
56 - pomagać w znalezieniu formalnych dowodów,
57 - wyciągać program o dowiedzionej poprawności z konstruktywnego
58   dowodu jego formalnej specyfikacji.
59
60 %package emacs
61 Summary:        Emacs mode and syntax for Coq
62 Summary(pl.UTF-8):      Tryb i składnia Coq dla Emacsa
63 Group:          Development/Tools
64 Requires:       %{name} = %{version}-%{release}
65
66 %description emacs
67 Emacs mode and suyntax files for Coq.
68
69 %description emacs -l pl.UTF-8
70 Pliki trybu i składni Coq dla Emacsa.
71
72 %package latex
73 Summary:        Coq documentation style for latex
74 Summary(pl.UTF-8):      Styl dokumentacji Coq dla latexa
75 Group:          Development/Tools
76 Requires:       %{name} = %{version}-%{release}
77
78 %description latex
79 Coq documentation style for latex.
80
81 %description latex -l pl.UTF-8
82 Styl dokumentacji Coq dla latexa.
83
84 %prep
85 %setup -q
86 %patch0 -p1
87
88 %{__sed} -i -e 's|#!/bin/sh|#!/bin/bash|' test-suite/check
89 %{__sed} -i -e 's|\(MAKE_TSOPTS=.*\) -s \(.*\)|\1 \2|' Makefile.build
90
91 %build
92 ./configure \
93         -bindir %{_bindir} \
94         -libdir %{_libdir}/coq \
95         -mandir %{_mandir} \
96         -docdir %{_docdir}/%{name}-%{version} \
97         -configdir %{_sysconfdir}/%{name} \
98         -datadir %{_datadir}/%{name} \
99         -emacs emacs \
100         -browser "xdg-open %s" \
101         -emacslib %{_datadir}/emacs/site-lisp \
102         %{?with_ocaml_opt:-opt} \
103         --coqdocdir %{_datadir}/texmf/tex/latex/misc \
104         --coqide %{?with_ocaml_opt:opt}%{!?with_ocaml_opt:byte}
105
106 %{__make} -j1 world VERBOSE=1 CAML_LD_LIBRARY_PATH=kernel/byterun
107 %{?with_tests:%{__make} -j1 check VERBOSE=1 CAML_LD_LIBRARY_PATH=kernel/byterun} # Use native coq to compile theories
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
112
113 %{__make} -e install \
114         COQINSTALLPREFIX=$RPM_BUILD_ROOT/
115 # To install only locally the binaries compiled with absolute paths
116
117 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
118 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
119
120 # pdf is enough
121 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ps
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %files
127 %defattr(644,root,root,755)
128 %doc %{_docdir}/%{name}-%{version}
129 %dir %{_sysconfdir}/%{name}
130 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/coqide-gtk2rc
131 %attr(755,root,root) %{_bindir}/coq_makefile
132 %attr(755,root,root) %{_bindir}/coq-tex
133 %attr(755,root,root) %{_bindir}/coqc
134 %attr(755,root,root) %{_bindir}/coqchk
135 %attr(755,root,root) %{_bindir}/coqchk.opt
136 %attr(755,root,root) %{_bindir}/coqdep
137 %attr(755,root,root) %{_bindir}/coqdoc
138 %attr(755,root,root) %{_bindir}/coqide*
139 %attr(755,root,root) %{_bindir}/coqmktop
140 %attr(755,root,root) %{_bindir}/coqtop
141 %attr(755,root,root) %{_bindir}/coqtop.byte
142 %attr(755,root,root) %{_bindir}/coqtop.opt
143 %attr(755,root,root) %{_bindir}/coqwc
144 %attr(755,root,root) %{_bindir}/gallina
145 %dir %{_libdir}/coq
146 %{_libdir}/coq/*
147 %{_mandir}/man1/coq_makefile.1*
148 %{_mandir}/man1/coq-tex.1*
149 %{_mandir}/man1/coqc.1*
150 %{_mandir}/man1/coqchk.1*
151 %{_mandir}/man1/coqdep.1*
152 %{_mandir}/man1/coqdoc.1*
153 %{_mandir}/man1/coqide.1*
154 %{_mandir}/man1/coqmktop.1*
155 %{_mandir}/man1/coqtop.1*
156 %{_mandir}/man1/coqtop.byte.1*
157 %{_mandir}/man1/coqtop.opt.1*
158 %{_mandir}/man1/coqwc.1*
159 %{_mandir}/man1/gallina.1*
160 %{_desktopdir}/coqide.desktop
161 %{_pixmapsdir}/coqide.xpm
162 %{_datadir}/%{name}
163
164 %files emacs
165 %defattr(644,root,root,755)
166 %{_datadir}/emacs/site-lisp/coq.el
167 %{_datadir}/emacs/site-lisp/coq-db.el
168 %{_datadir}/emacs/site-lisp/coq-font-lock.el
169 %{_datadir}/emacs/site-lisp/coq-inferior.el
170 %{_datadir}/emacs/site-lisp/coq-syntax.el
171
172 %files latex
173 %defattr(644,root,root,755)
174 %{_datadir}/texmf/tex/latex/misc/coqdoc.sty
This page took 0.052511 seconds and 2 git commands to generate.