b9e9249
# rpmlint "no-binary" error is not really an error - see:
b9e9249
# https://www.redhat.com/archives/fedora-packaging/2008-August/msg00017.html
b9e9249
# and ocaml-ocamlgraph spec file for a discussion of this issue.
b9e9249
b9e9249
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
b9e9249
%define debug_package %{nil}
b9e9249
b9e9249
Name:		alt-ergo
0ed1c81
Version:	0.94
0ed1c81
Release:	1%{?dist}
David A. Wheeler 353a576
Summary:	Automated theorem prover including linear arithmetic
b9e9249
b9e9249
Group:		Applications/Engineering
b9e9249
License:	CeCILL-C
7c65322
URL:		http://alt-ergo.lri.fr/
6d1045a
Source0:	http://alt-ergo.lri.fr/http/alt-ergo-%{version}.tar.gz
b9e9249
Source1:	swap0_why.why
b9e9249
Source2:	README.alt-ergo
0ed1c81
Source3:	%{name}.desktop
b9e9249
0ed1c81
BuildRequires:	desktop-file-utils
fd51143
BuildRequires:	gtksourceview2-devel
fd51143
BuildRequires:	ocaml
fd51143
BuildRequires:	ocaml-lablgtk-devel
fd51143
BuildRequires:	ocaml-ocamlgraph-devel
fd51143
BuildRequires:	prelink
b9e9249
0ed1c81
Requires(post):	coreutils
b9e9249
0ed1c81
ExclusiveArch:	%{ocaml_arches}
0ed1c81
0ed1c81
# Filter out symbols that are provided by interface files (*.mli) only.
0ed1c81
# There are no corresponding symbols available at runtime.
0ed1c81
%global __requires_exclude ocaml\\\(((Sig)|(Smt_ast)|(Why_ptree))\\\)
b9e9249
fd51143
%description
b9e9249
Alt-Ergo is an automated theorem prover implemented in OCaml. It is
b9e9249
based on CC(X) - a congruence closure algorithm parameterized by an
b9e9249
equational theory X. This algorithm is reminiscent of the Shostak
b9e9249
algorithm. Currently CC(X) is instantiated by the theory of linear
b9e9249
arithmetics. Alt-Ergo also contains a home made SAT-solver and an
b9e9249
instantiation mechanism by which it fully supports quantifiers.
b9e9249
fd51143
%package gui
fd51143
Summary:	Graphical front end for alt-ergo
fd51143
Group:		Applications/Engineering
fd51143
Requires:	%{name}%{?_isa} = %{version}-%{release}
0ed1c81
Requires:	gtksourceview2
fd51143
fd51143
%description gui
fd51143
A graphical front end for the alt-ergo theorem prover.
fd51143
b9e9249
%prep
b9e9249
%setup -q
b9e9249
0ed1c81
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} .
b9e9249
David A. Wheeler c1d7b72
# Set print_flag to false or invoking with -select
David A. Wheeler c1d7b72
# from "why" will pause every invocation :-(.
David A. Wheeler c1d7b72
sed -i -e 's/let print_flag = true/let print_flag = false/;' pruning.ml
David A. Wheeler c1d7b72
b9e9249
%build
b9e9249
./configure --prefix=%{_prefix} --bindir=%{_bindir} --libdir=%{_datadir} --mandir=%{_mandir}
b9e9249
b9e9249
%if ! %{opt}
b9e9249
%define opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLLEX=ocamllex
b9e9249
%else
b9e9249
%define opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt
b9e9249
%endif
b9e9249
b9e9249
make %{opt_option}
fd51143
make %{opt_option} gui
b9e9249
fd51143
iconv -f ISO-8859-1 -t UTF-8 -o CeCILL-C.utf8 CeCILL-C
fd51143
touch -r CeCILL-C CeCILL-C.utf8
fd51143
mv -f CeCILL-C.utf8 CeCILL-C
b9e9249
b9e9249
%if %{opt}
b9e9249
strip ./alt-ergo.opt
b9e9249
execstack -c ./alt-ergo.opt
b9e9249
%endif
b9e9249
b9e9249
%install
b9e9249
mkdir -p %{buildroot}%{_bindir}
David A. Wheeler c1d7b72
make %{opt_option} BINDIR=%{buildroot}%{_bindir} LIBDIR=%{buildroot}%{_datadir}/%{name} MANDIR=%{buildroot}%{_mandir} install
b9e9249
0ed1c81
# Remove files we do not want installed
0ed1c81
rm -f %{buildroot}%{_datadir}/%{name}/*.{cmx,o}
0ed1c81
fd51143
# Have to install the GUI by hand due to hardcoded paths in the makefile
fd51143
%if %opt
fd51143
strip altgr-ergo.opt
fd51143
cp -p altgr-ergo.opt %{buildroot}%{_bindir}/altgr-ergo
fd51143
%else
fd51143
cp -p altgr-ergo.byte %{buildroot}%{_bindir}/altgr-ergo
fd51143
%endif
0ed1c81
0ed1c81
# Install the gtksourceview2 support
0ed1c81
mkdir -p %{buildroot}%{_datadir}/gtksourceview-2.0/language-specs
0ed1c81
cp -p util/gtk-lang/alt-ergo.lang \
0ed1c81
      %{buildroot}%{_datadir}/gtksourceview-2.0/language-specs
0ed1c81
0ed1c81
# Install the desktop file
0ed1c81
mkdir -p %{buildroot}%{_datadir}/applications
0ed1c81
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{name}.desktop
fd51143
fd51143
%post gui
0ed1c81
update-desktop-database &> /dev/null || :
fd51143
0ed1c81
%postun gui
0ed1c81
update-desktop-database &> /dev/null || :
0ed1c81
0ed1c81
# Test alt-ergo on fairly trivial why file - generated from why example swap0.mlw w/why v2.14
0ed1c81
%check
0ed1c81
%if %opt
0ed1c81
%define altergo ./alt-ergo.opt
0ed1c81
%else
0ed1c81
%define altergo ./alt-ergo.byte
0ed1c81
%endif
0ed1c81
%{altergo} -arrays swap0_why.why
b9e9249
b9e9249
%files
fd51143
%{_bindir}/%{name}
0ed1c81
%{_datadir}/%{name}/
fd51143
%{_mandir}/man1/alt-ergo.1.*
b9e9249
%doc README.alt-ergo COPYING CeCILL-C CHANGES
b9e9249
fd51143
%files gui
fd51143
%{_bindir}/altgr-ergo
0ed1c81
%{_datadir}/applications/%{name}.desktop
0ed1c81
%{_datadir}/gtksourceview-2.0/language-specs/%{name}.lang
fd51143
b9e9249
%changelog
0ed1c81
* Tue Dec  6 2011 Jerry James <loganjerry@gmail.com> - 0.94-1
0ed1c81
- Add a desktop file for the gui.
0ed1c81
- Update to version 0.94.  This means:
0ed1c81
- The theory of records replaces the theory of pairs
0ed1c81
- Bug fixes (intervals, term data-structure, stack-overflows, matching,
0ed1c81
  existentials, distincts, CC, GUI)
0ed1c81
- Improvements (SMT-Lib2 front-end, intervals, case-splits, triggers, lets)
0ed1c81
- Multiset ordering for AC(X)
0ed1c81
- Manual lemma instantiation in the GUI
0ed1c81
7c65322
* Mon Nov 14 2011 Jerry James <loganjerry@gmail.com> - 0.93-2
7c65322
- Build on all arches with ocaml
7c65322
fd51143
* Thu May 12 2011 Jerry James <loganjerry@gmail.com> - 0.93-1
fd51143
- Update to version 0.93.  This means:
fd51143
- New command-line options -steps, -max-split, and -proof
fd51143
- New polymorphic theory of arrays
fd51143
- Built-in support for enumeration types
fd51143
- Graphical front end
fd51143
- New predicate distinct()
fd51143
- New constructs: let x = <term> in <term>, let x = <term> in <formula>
fd51143
- Partial support for the division operator
fd51143
- Unspecified bug fixes
fd51143
638a594
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.92.1-2
638a594
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
638a594
David A. Wheeler 353a576
* Tue Oct 06 2010 David A. Wheeler <dwheeler@dwheeler.com> 0.92.1-1
David A. Wheeler 353a576
- Update to version 0.92.1. This means:
David A. Wheeler 353a576
- New built-in syntax for the theory of arrays
David A. Wheeler 353a576
- Fixes a bug in the arithmetic module
David A. Wheeler 353a576
- Allows folding and unfolding of predicate definitions
David A. Wheeler 353a576
David A. Wheeler c1d7b72
* Tue Jun 08 2010 David A. Wheeler <dwheeler@dwheeler.com> 0.91-1
David A. Wheeler c1d7b72
- Update to version 0.91. This means:
David A. Wheeler c1d7b72
- partial support for non-linear arithmetics
David A. Wheeler c1d7b72
- support case split on integer variables
David A. Wheeler c1d7b72
- new support for Euclidean division and modulo operators
David A. Wheeler c1d7b72
David A. Wheeler c1d7b72
14378b0
* Tue Aug 04 2009 Alan Dunn <amdunn@gmail.com> 0.9-2
14378b0
- Added ExcludeArch sparc64 due to no OCaml
14378b0
75ba6d4
* Fri Jul 24 2009 Alan Dunn <amdunn@gmail.com> 0.9-1
75ba6d4
- New upstream version
75ba6d4
- Removed code for check for Fedora version (8) that is EOL
75ba6d4
- Removed comments re: CeCILL-C license as it is ok to have (no
75ba6d4
  rpmlint warnings to explain either).
75ba6d4
4133a1c
* Wed Jun 17 2009 Karsten Hopp <karsten@redhat.com> 0.8-5.1
4133a1c
- ExcludeArch s390x as there's no ocaml available
4133a1c
b9ddb10
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-5
b9ddb10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
b9ddb10
6d1045a
* Wed Dec 24 2008 Alan Dunn <amdunn@gmail.com> 0.8-4
6d1045a
- Rebuild: Source upstream appears to have changed even with same version number
6d1045a
  (seems like bug fix from examination of changes)
6d1045a
- Changed hardcoded version number in source string
b9e9249
* Fri Sep 05 2008 Alan Dunn <amdunn@gmail.com> 0.8-3
b9e9249
- Fixed BuildRequires to add prelink (for execstack).
b9e9249
* Tue Aug 26 2008 Alan Dunn <amdunn@gmail.com> 0.8-2
b9e9249
- Fixed BuildRequires to add ocaml-ocamlgraph-devel instead of
b9e9249
  ocaml-ocamlgraph, made other minor changes.
b9e9249
* Mon Aug 25 2008 Alan Dunn <amdunn@gmail.com> 0.8-1
b9e9249
- Initial Fedora RPM version.