Summary: GNU Prolog is a free Prolog compiler with constraint solving over Finite Domains
Summary(ja): GNU Prolog: 有限領域の制約解決に適したフリーな Prolog コンパイラ
Name: gprolog
Version: 1.3.1
Release: 1%{?_dist_release}
License: GPL
Group: Development/Languages
Source: ftp://ftp.inria.fr/Projects/loco/%{name}/%{name}-%{version}.tar.gz
URL: http://gprolog.inria.fr/
Vendor: Project Vine
Distribution: Vine Linux
Buildroot: %{_tmppath}/%{name}-%{version}-root

%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.

   More information can be found at http://www.gnu.org/software/prolog
   or better at http://gprolog.inria.fr.

%description -l ja
GNU Prolog は有限領域 (FD) の制約解決に適したネイティブ Prolog コンパイラで、
Daniel Diaz (http://loco.inria.fr/~diaz) によって開発されました。
GNU Prolog は (小さな) スタンドアロンの実行可能形式を生成する、非常に効率の
良いネイティブコンパイラです。
GNU Prolog は Prolog の ISO 規格に準拠しているだけでなく、多くの拡張
(グローバル変数、DCG、ソケット、OS インタフェース、……) も含んでいます。
GNU Prolog は多くの定義済の制約条件と発見的手法を用いて、有限領域の問題に
対して強力な制約解決機能も提供します。
詳しい情報は http://www.gnu.org/software/prolog や http://gprolog.inria.fr
(こちらの方が良い)で見つけることができます。

%prep
%setup -q 

%build
cd src
./configure \
    --with-install-dir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version} \
    --without-links-dir \
    --with-examples-dir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/examples
#    --with-doc-dir=$RPM_BUILD_ROOT/usr/doc/gprolog-%{version}
make

%install
rm -rf $RPM_BUILD_ROOT
pushd src
make install-strip
popd
mkdir $RPM_BUILD_ROOT%{_bindir}
pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/bin
for i in *; do
	ln -s ../lib/%{name}-%{version}/bin/$i $RPM_BUILD_ROOT%{_bindir}/$i
done
popd
rm -rf docs_to_install
mkdir -p docs_to_install
mv $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/doc/* docs_to_install
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/{COPYING,ChangeLog,NEWS,VERSION}
#cd $RPM_BUILD_DIR/gprolog-1.2.17
#cp README COPYING ChangeLog NEWS $RPM_BUILD_ROOT//usr/doc/gprolog-1.2.17

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README COPYING ChangeLog NEWS VERSION
%doc docs_to_install/*
#%doc doc/compil-scheme.pdf doc/debug-box.pdf
#%doc doc/manual.*
%{_bindir}/*
%{_libdir}/%{name}-%{version}/bin
%{_libdir}/%{name}-%{version}/examples
%{_libdir}/%{name}-%{version}/include
%{_libdir}/%{name}-%{version}/lib

%changelog
* Wed Mar 11 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.3.1-1
- updated to 1.3.1
- applied new versioning policy
- spec in UTF-8

* Tue Aug 17 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.17-0vl3
- rebuild for VinePlus/3.0 and VineSeedPlus
- updated Japanese Summary and description
- merged VinePlus/2.5 spec file
  * Fri Jul 23 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 1.2.16-1vl2
  - Added Summary(ja) and %%description -l ja.

* Sat Feb 14 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.17-0vl2
- merged VinePlus spec file
  * Thu Feb 12 2004 by IKEDA Katsumi <ikedak@rg8.so-net.ne.jp>
  - 1.2.161vl1
  - Modified %Vendor, %Buildroot and %build.
  - Add %Distribution.
  - Remove %Packager and %Prefix.
- added --with-examples-dir to ./configure
- fixed %files section to exclude %{_libdir}/%{name}-%{version}/doc

* Fri Feb 13 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.17-0vl1
- rebuild for Vine Linux
- s/Copyright/License/
- use more rpm macros

* Tue Jul 25 2000 Daniel Diaz <Daniel.Diaz@inria.fr>
- initial specfile