Name: gprolog
Version: 1.3.0
Release: 6%{?dist}
Summary: GNU Prolog is a free Prolog compiler
Group: Development/Languages
License: GPL
URL: http://www.gprolog.org
Source: http://www.gprolog.org/gprolog-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: %{ix86} x86_64 ppc
%description
GNU Prolog is a native Prolog compiler with constraint solving over
finite domains (FD) developed by Daniel Diaz
(http://loco.inria.fr/~diaz).
GNU Prolog is a very efficient native compiler producing (small)
stand-alone executables. GNU-Prolog also offers a classical
top-level+debugger.
GNU Prolog conforms to the ISO standard for Prolog but also includes a
lot of extensions (global variables, DCG, sockets, OS interface,...).
GNU Prolog also includes a powerful constraint solver over finite
domains with many predefined constraints+heuristics.
%package examples
Summary: Examples for GNU Prolog
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
%description examples
Examples for GNU Prolog.
%package docs
Summary: Documentation for GNU Prolog
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description docs
Documentation for GNU Prolog.
%prep
%setup -q
%build
cd src
# gprolog only acccept -O0 and don't like -fomit-frame-pointer
# CFLG="$(echo $RPM_OPT_FLAGS | sed -e "s/\-O2/-O0/" | \
# sed -e "s/\-fomit-frame-pointer//")"
CFLG=$RPM_OPT_FLAGS
# sed -i -e "s:TXT_FILES = @TXT_FILES@:TXT_FILES=:" Makefile.in
./configure \
--with-install-dir=$RPM_BUILD_ROOT%{_libdir}/gprolog-%{version} \
--without-links-dir --without-examples-dir \
--disable-fast-call --with-doc-dir=dist-doc \
--with-c-flags="$CFLG"
# _smp_flags seems to make trouble
make
%install
rm -rf $RPM_BUILD_ROOT
cd src
(
make install
mkdir $RPM_BUILD_ROOT%{_bindir}
cd $RPM_BUILD_ROOT%{_libdir}/gprolog-%{version}/bin
for i in *; do
ln -s ../%{_lib}/gprolog-%{version}/bin/$i $RPM_BUILD_ROOT%{_bindir}/$i
done
)
rm -f dist-doc/*.{chm,dvi,ps}
rm -f dist-doc/compil-scheme.pdf
rm -f dist-doc/debug-box.pdf
for file in ChangeLog COPYING NEWS VERSION
do
rm -f $RPM_BUILD_ROOT%{_libdir}/gprolog-%{version}/$file
done
cd ../ExamplesPl
rm -rf BINPROLOG CIAO SICSTUS
rm -rf SWI WAMCC XSB YAP
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README COPYING ChangeLog NEWS PROBLEMS VERSION
%{_bindir}/*
%{_libdir}/gprolog-%{version}
%files examples
%defattr(-,root,root,-)
%doc ExamplesC ExamplesFD ExamplesPl
%files docs
%defattr(-,root,root,-)
%doc src/dist-doc/*
%changelog
* Thu May 24 2007 Jochen Schmitt <Jochen herr-schmitt de> 1.3.0-6
- Include the PPC arch to build
- Remove _smp_mflags becouse is make trouble
* Sun Mar 25 2007 Jochen Schmitt <Jochen herr-schmitt de> 1.3.0-1
- New upstream version
* Thu Sep 7 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.2.19-8
- Fix broken symlib (#205118)
* Mon Sep 4 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.2.19-7
- Exclude PPC arch, becouse it produced a strange error on FC-6
* Sun Sep 3 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.2.19-6
- Rebuild for FC-6
* Mon May 15 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.2.19-5
- Remove compil-scheme.pdf and debug-box.pdf from the docs package
* Wed Apr 19 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.2.19-3
- Delete unnecessaries files from ExamplesPI
* Thu Mar 30 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.2.19-2
- Remove sed-command
- Correct typo about usable compiler options
- Add comment about the source of the patches
* Wed Mar 29 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.2.19-1
- Initial RPM package for Fedora Extras