File swipl.spec of Package swipl

# spec file for package swipl
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           swipl
BuildRequires:  freetype2-devel gcc-c++ gmp-devel libjpeg-devel libpng-devel
BuildRequires:  mysql-devel openssl-devel postgresql-devel readline-devel
BuildRequires:  unixODBC-devel xorg-x11 xorg-x11-Xvfb xorg-x11-devel
BuildRequires:  java-1_6_0-openjdk-devel texlive texlive-latex
BuildRequires:  fdupes
License:        GPLv2+ ; LGPLv2.1+
AutoReqProv:    on
Version:        5.10.2
Release:        1
Summary:        Prolog Compiler
Source:         pl-%{version}.tar.bz2
Source1:        refman.pdf
Patch0:         pl.patch
# This is now upstream
Patch2:         internal_fix.patch
Provides:       swi_pl = %{version}
Provides:       swi-prolog = %{version}
Obsoletes:      swi_pl < %{version}
Obsoletes:      swi-prolog < %{version}
Group:          Development/Languages/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Edinburgh-style Prolog compiler including modules, autoload, libraries,
Garbage collector, stack expandor, C interface, GNU readline and GNU
Emacs interface, a very fast compiler,and an X11 interface using XPCE

    Jan Wielemaker <>

%setup -q -n pl-%{version}
%patch0 -p 1
%patch2 -p 1

cp build.templ build

export COFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"

./build --prefix=%{_prefix} --config --enable-shared --libdir=%{_libdir}
./build --prefix=%{_prefix} --make %{?jobs:-j %{jobs}}



DESTDIR=$RPM_BUILD_ROOT ./build --prefix=%{_prefix} --install

# Add another symlink
cd $RPM_BUILD_ROOT/%{_prefix}/bin
ln -s ../%{_lib}/%{name}-%{version}/bin/*/swipl pl

# Add a link to the documentation in docdir.
mkdir -p $RPM_BUILD_ROOT/%{_docdir}
cd $RPM_BUILD_ROOT/%{_docdir}
ln -s %{_libdir}/%{name}-%{version}/doc swipl

chmod -x $RPM_BUILD_ROOT/%{_libdir}/%{name}-%{version}/doc/packages/examples/pldoc/

%fdupes $RPM_BUILD_ROOT/%{_libdir}/%{name}-%{version}



openSUSE Build Service is sponsored by