607 lines
24 KiB
RPMSpec
607 lines
24 KiB
RPMSpec
# TESTING NOTE: The tests can be run by executing ctest in the build directory.
|
|
# However, some tests are guaranteed to fail when built by koji:
|
|
# - Those that require a network: http:http, semweb:load, ssl:ssl
|
|
# - Those that require JNI: jpl:prolog_in_java, jpl:java_in_prolog
|
|
# Also, the zlib:zlib test requires a Unicode locale (via the LC_ALL or LANG
|
|
# environment variables). For example:
|
|
# export LC_ALL=C.UTF-8
|
|
|
|
%global separate_xpce 1
|
|
|
|
# Name of the architecture-specific lib directory
|
|
%global swipl_arch %{_target_cpu}-linux
|
|
|
|
Name: pl
|
|
Version: 9.2.9
|
|
Release: %autorelease
|
|
Summary: SWI-Prolog - Edinburgh compatible Prolog compiler
|
|
#LICENSE: BSD-2-Clause
|
|
#library/ugraphs.pl BSD-2-Clause AND (GPL-2.0-or-later WITH
|
|
# SWI-Prolog extra clause or Artistic-2.0)
|
|
#library/unicode/blocks.pl BSD-2-Clause AND Unicode-DFS-2016
|
|
#man/main.doc CC-BY-SA-3.0
|
|
#man/swipl.cls LPPL-1.3a
|
|
#packages/bdb/bdb4pl.doc Sleepycat (due to linking with libdb)
|
|
#packages/clib/bsd-crypt.c BSD-3-Clause
|
|
#packages/clib/clib.doc (BSD-3-Clause OR GPL-1.0-or-later) AND
|
|
# BSD-3-Clause
|
|
#packages/clib/md5.c Zlib
|
|
#packages/clib/md5.h Zlib
|
|
#packages/clib/md5passwd.c Beerware
|
|
#packages/clib/sha1/brg_endian.h Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/brg_types.h Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/hmac.c Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/hmac.h Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/pwd2key.c Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/pwd2key.h Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/sha1.c Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/sha1.h Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/sha1b.c Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/sha2.c Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/sha2.h Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clib/sha1/sha2b.c Brian-Gladman-3-Clause OR GPL-1.0+
|
|
#packages/clpqr/clpq.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpq/bb_q.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpq/bv_q.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpq/fourmotz_q.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpq/ineq_q.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpq/itf_q.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpq/nf_q.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpq/store_q.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpqr/class.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpqr/clpq.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpqr/dump.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpqr/geler.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpqr/itf.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpqr/ordering.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpqr/project.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpqr/redund.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpr.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpr/bb_r.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpr/bv_r.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpr/fourmotz_r.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpr/ineq_r.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpr/itf_r.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpr/nf_r.pl GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/clpr/store_r.pl GPL-2.0-or-later with SWI exception
|
|
#packages/http/http_server_health.pl GPL-2.0-or-later with SWI exception
|
|
#packages/mqi/python/ MIT
|
|
#packages/nlp/double_metaphone.c GPL-1.0-or-later OR Artistic-1.0-Perl
|
|
#packages/nlp/isub.c LGPL-2.0-or-later
|
|
#packages/plunit/swi.pl BSD-2-Clause and (GPL-2.0-or-later WITH
|
|
# SWI-Prolog extra clause OR Artistic-2.0)
|
|
#packages/protobufs/interop/google/ BSD-3-Clause
|
|
#packages/semweb/md5.c Zlib
|
|
#packages/semweb/md5.h Zlib
|
|
#packages/semweb/murmur.c LicenseRef-Fedora-Public-Domain
|
|
#packages/semweb/murmur.h LicenseRef-Fedora-Public-Domain
|
|
#packages/tipc/tipcutils/tipc-config.c BSD-3-Clause
|
|
#packages/utf8proc/pgsql/utf8proc_pgsql.c MIT
|
|
#packages/utf8proc/ruby/utf8proc_native.c MIT
|
|
#packages/utf8proc/ruby/utf8proc_rb.c MIT
|
|
#packages/utf8proc/utf8proc.c MIT
|
|
#packages/utf8proc/utf8proc.doc MIT AND Unicode-DFS-2015
|
|
#packages/utf8proc/utf8proc.h MIT
|
|
#packages/utf8proc/utf8proc_data.c Unicode-DFS-2015
|
|
#packages/xpce/src/gnu/getdate-source.y LicenseRef-Fedora-Public-Domain
|
|
#packages/xpce/src/gnu/getdate.c LicenseRef-Fedora-Public-Domain AND
|
|
# GPL-2.0-or-later WITH Bison-exception-2.2
|
|
#packages/xpce/src/gnu/y.tab LicenseRef-Fedora-Public-Domain
|
|
#packages/xpce/src/img/gifwrite.c Part is FBM
|
|
#packages/xpce/src/rgx/ Spencer-99 AND TCL
|
|
#packages/xpce/src/x11/xdnd.h GPL-2.0-or-later
|
|
#scripts/swipl-bt LicenseRef-Fedora-Public-Domain
|
|
#src/minizip/ Zlib
|
|
#src/os/dtoa.c dtoa
|
|
#src/pl-hash.c LicenseRef-Fedora-Public-Domain
|
|
#src/pl-hash.h LicenseRef-Fedora-Public-Domain
|
|
#src/swipl-ld.1 LGPL-2.0-or-later
|
|
#src/tools/functions.pm LicenseRef-Fedora-Public-Domain
|
|
|
|
# Not compiled into a binary package:
|
|
#External: JavaConfig.java GPL-3.0-or-later
|
|
#External: repackage.sh GPL-2.0-or-later
|
|
#bench/chat_parser.pl MIT
|
|
#packages/RDF/configure FSFUL
|
|
#packages/clib/configure FSFUL
|
|
#packages/clpqr/.fileheader GPL-2.0-or-later with SWI exception
|
|
#packages/clpqr/configure FSFUL
|
|
#packages/cpp/configure FSFUL
|
|
#packages/http/examples/calc.pl LicenseRef-Fedora-Public-Domain
|
|
#packages/http/web/js/jquery* MIT
|
|
#packages/nlp/configure FSFUL
|
|
#packages/pcre/cmake/FindPCRE.cmake MIT
|
|
#packages/protobufs/configure FSFUL
|
|
#packages/sgml/configure FSFUL
|
|
#packages/ssl/configure FSFUL
|
|
#packages/stomp/examples/ping.pl LicenseRef-Fedora-Public-Domain
|
|
#packages/stomp/examples/pong.pl LicenseRef-Fedora-Public-Domain
|
|
#packages/stomp/examples/simple.pl LicenseRef-Fedora-Public-Domain
|
|
#packages/swipl-win/README.md LGPL-2.1-only
|
|
#packages/utf8proc/LICENSE MIT AND Unicode-DFS-2015
|
|
#packages/utf8proc/data_generator.rb MIT AND Unicode-DFS-2015
|
|
#packages/utf8proc/ruby/gem/LICENSE MIT AND Unicode-DFS-2015
|
|
#packages/xpce/TeX/name.bst LicenseRef-Bibtex
|
|
#packages/xpce/man/info/texinfo.tex GPL-2.0-or-later
|
|
#packages/xpce/src/configure FSFUL
|
|
#packages/xpce/src/msw/simx.h SGI-B-2.0
|
|
#packages/xpce/src/msw/xpm.h SGI-B-2.0
|
|
#packages/zlib/configure FSFUL
|
|
#src/libbf/cutils.c MIT
|
|
#src/libbf/cutils.h MIT
|
|
#src/libbf/libbf.c MIT
|
|
#src/libbf/libbf.h MIT
|
|
#src/libbf/mersenne-twister.c BSD-3-Clause
|
|
#src/libbf/mersenne-twister.h BSD-3-Clause
|
|
#src/Tests/ BSD-2-Clause AND GPL-2.0-or-later WITH
|
|
# SWI-Prolog extra clause
|
|
#src/tools/update-deps LicenseRef-Fedora-Public-Domain
|
|
# Removed from repackaged tar ball, see
|
|
# <https://github.com/SWI-Prolog/issues/issues/16>:
|
|
#bench/unify.pl Free for non-commercial
|
|
#bench/simple_analyzer.pl Free for non-commercial
|
|
License: BSD-2-Clause AND BSD-3-Clause AND (Brian-Gladman-3-Clause OR GPL-1.0-or-later) AND Beerware AND CC-BY-SA-3.0 AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-2.0-or-later AND GPL-2.0-or-later WITH SWI-Exception AND (GPL-2.0-or-later WITH SWI-Exception OR Artistic-2.0) AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND LPPL-1.3a AND MIT AND Sleepycat AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND Zlib AND dtoa
|
|
URL: https://www.swi-prolog.org/
|
|
VCS: git:https://github.com/SWI-Prolog/swipl.git
|
|
# Source0: %%{url}/download/stable/src/swipl-%%{version}.tar.gz
|
|
# To create the repackaged archive, use ./repackage.sh %%{version}
|
|
Source0: swipl-%{version}_repackaged.tar.gz
|
|
Source1: %{url}download/xpce/doc/userguide/userguide.html.tgz
|
|
Source2: JavaConfig.java
|
|
Source3: repackage.sh
|
|
# Use JNI for Java binding
|
|
Patch0: swipl-8.2.1-Fix-JNI.patch
|
|
# Upstream installation paths differ from distribution ones
|
|
Patch1: swipl-8.2.0-Remove-files-locations-from-swipl-1-manual.patch
|
|
# Unbundle libstemmer
|
|
Patch2: swipl-8.2.0-unbundle-libstemmer.patch
|
|
# Use zlib-ng directly rather than via the zlib compatibility interface
|
|
Patch3: swipl-9.2.9-zlib-ng.patch
|
|
|
|
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
|
ExcludeArch: %{ix86}
|
|
|
|
BuildRequires: cmake
|
|
BuildRequires: findutils
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: ninja-build
|
|
# Base
|
|
BuildRequires: gmp-devel
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: pkgconfig(libedit)
|
|
BuildRequires: pkgconfig(libpcre2-posix)
|
|
BuildRequires: pkgconfig(libtcmalloc)
|
|
BuildRequires: pkgconfig(ncurses)
|
|
%if 0%{?el8}
|
|
# on el8 readline isn't picked up by pkgconfig
|
|
BuildRequires: readline-devel
|
|
%else
|
|
BuildRequires: pkgconfig(readline)
|
|
%endif
|
|
# archive
|
|
BuildRequires: pkgconfig(libarchive)
|
|
# http
|
|
BuildRequires: js-jquery
|
|
# XPCE
|
|
BuildRequires: pkgconfig(ice)
|
|
BuildRequires: pkgconfig(libjpeg)
|
|
BuildRequires: pkgconfig(sm)
|
|
BuildRequires: pkgconfig(x11)
|
|
BuildRequires: pkgconfig(xft)
|
|
BuildRequires: pkgconfig(xinerama)
|
|
BuildRequires: pkgconfig(xpm)
|
|
BuildRequires: pkgconfig(xt)
|
|
# Freetype support in XPCE
|
|
BuildRequires: pkgconfig(fontconfig)
|
|
BuildRequires: pkgconfig(freetype2)
|
|
BuildRequires: pkgconfig(xaw7)
|
|
BuildRequires: pkgconfig(xext)
|
|
BuildRequires: pkgconfig(xmu)
|
|
BuildRequires: pkgconfig(xrandr)
|
|
# bdb
|
|
BuildRequires: libdb-devel
|
|
# mqi / swiplserver
|
|
BuildRequires: python3-devel
|
|
# ODBC
|
|
BuildRequires: pkgconfig(odbc)
|
|
# SSL
|
|
BuildRequires: openssl
|
|
BuildRequires: pkgconfig(openssl)
|
|
# jpl
|
|
%ifarch %{java_arches}
|
|
BuildRequires: java-devel
|
|
BuildRequires: mvn(junit:junit)
|
|
BuildRequires: mvn(org.hamcrest:hamcrest)
|
|
%endif
|
|
# nlp
|
|
BuildRequires: libstemmer-devel
|
|
# sweep
|
|
BuildRequires: emacs-devel
|
|
# uuid
|
|
BuildRequires: pkgconfig(ossp-uuid)
|
|
# win
|
|
BuildRequires: pkgconfig(Qt6)
|
|
# yaml
|
|
BuildRequires: pkgconfig(yaml-0.1)
|
|
# zlib
|
|
BuildRequires: pkgconfig(zlib-ng)
|
|
# Doc building
|
|
# Gated to Fedora as EL is currently missing tex(a4wide.sty)
|
|
%if 0%{?fedora}
|
|
BuildRequires: tex(latex)
|
|
BuildRequires: tex(a4wide.sty)
|
|
BuildRequires: tex(tabulary.sty)
|
|
%endif
|
|
# http
|
|
Requires: js-jquery
|
|
|
|
# Old version of minizip is bundled
|
|
Provides: bundled(minizip) = 1.2.11
|
|
|
|
# See https://fedoraproject.org/wiki/Bundled_Libraries_Virtual_Provides
|
|
Provides: bundled(md5-deutsch)
|
|
|
|
# This can be removed when F40 reaches EOL
|
|
%ifnarch %{java_arches}
|
|
Obsoletes: pl-java < 8.4.3-2
|
|
%endif
|
|
|
|
%description
|
|
ISO/Edinburgh-style Prolog compiler including modules, auto-load,
|
|
libraries, Garbage-collector, stack-expandor, C/C++-interface,
|
|
GNU-readline interface, very fast compiler. Including packages clib
|
|
(Unix process control and sockets), cpp (C++ interface), sgml (reading
|
|
XML/SGML), sgml/RDF (reading RDF into triples).
|
|
%if %{separate_xpce}
|
|
XPCE (Graphics UI toolkit, integrated editor (Emacs-clone) and source-level
|
|
debugger) is available in %{name}-xpce package.
|
|
%else
|
|
Also XPCE (Graphics UI toolkit, integrated editor (Emacs-clone) and
|
|
source-level debugger) is included.
|
|
%endif
|
|
|
|
|
|
%package devel
|
|
Summary: Development files for SWI Prolog
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
Requires: gcc
|
|
Requires: pkgconfig%{?_isa}
|
|
Requires: readline-devel%{?_isa}
|
|
|
|
%description devel
|
|
Development files for SWI Prolog.
|
|
|
|
|
|
%package compat-yap-devel
|
|
Summary: Development files for building YAP applications against SWI Prolog
|
|
License: BSD-2-Clause
|
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
|
%description compat-yap-devel
|
|
This package enables building YAP (Yet Another Prolog) applications
|
|
against the SWI Prolog implementation.
|
|
|
|
|
|
%package doc
|
|
Summary: Documentation for SWI Prolog
|
|
License: BSD-2-Clause
|
|
# This must be architecture dependent because some files live in %%{_libdir}
|
|
# because they are used by built-in documentation system.
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description doc
|
|
%{summary}.
|
|
|
|
|
|
%package odbc
|
|
Summary: SWI-Prolog ODBC interface
|
|
License: BSD-2-Clause
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description odbc
|
|
The value of RDMS for Prolog is often over-estimated, as Prolog itself can
|
|
manage substantial amounts of data. Nevertheless a Prolog/RDMS interface
|
|
provides advantages if data is already provided in an RDMS, data must be
|
|
shared with other applications, there are strong persistency requirements
|
|
or there is too much data to fit in memory.
|
|
|
|
The popularity of ODBC makes it possible to design a single
|
|
foreign-language module that provides RDMS access for a wide variety of
|
|
databases on a wide variety of platforms. The SWI-Prolog RDMS interface is
|
|
closely modeled after the ODBC API. This API is rather low-level, but
|
|
defaults and dynamic typing provided by Prolog give the user quite simple
|
|
access to RDMS, while the interface provides the best possible performance
|
|
given the RDMS independency constraint.
|
|
|
|
|
|
%if %{separate_xpce}
|
|
%package xpce
|
|
License: BSD-2-Clause AND GPL-2.0-or-later AND GPL-2.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND Spencer-99 AND TCL AND FBM
|
|
Summary: A toolkit for developing graphical applications in Prolog
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description xpce
|
|
XPCE is a toolkit for developing graphical applications in Prolog and other
|
|
interactive and dynamically typed languages. XPCE follows a rather unique
|
|
approach of for developing GUI applications, as follows:
|
|
|
|
- Add object layer to Prolog
|
|
- High level of abstraction
|
|
- Exploit rapid Prolog development cycle
|
|
- Platform independent programs
|
|
%endif
|
|
|
|
|
|
%ifarch %{java_arches}
|
|
%package jpl
|
|
License: BSD-2-Clause
|
|
Summary: A bidirectional Prolog/Java interface for SWI Prolog
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
Requires: java-headless
|
|
Requires: javapackages-tools
|
|
|
|
%description jpl
|
|
JPL is a library using the SWI-Prolog foreign interface and the Java Native
|
|
Interface providing a bidirectional interface between Java and Prolog
|
|
that can be used to embed Prolog in Java as well as for embedding Java
|
|
in Prolog. In both setups it provides a re-entrant bidirectional interface.
|
|
%endif
|
|
|
|
|
|
%prep
|
|
%global docdir doc-install
|
|
%autosetup -N -n swipl-%{version}
|
|
%patch -P0 -p1 -b .jni
|
|
%autopatch -p1 -m1
|
|
|
|
# Fix the installation path on 64-bit systems
|
|
if [ "%{_lib}" = "lib64" ]; then
|
|
sed -e 's,lib\(/\${SWIPL_INSTALL_DIR}\),lib64\1,' \
|
|
-e '/SWIPL_INSTALL_CMAKE_CONFIG_DIR/s/lib/&64/' \
|
|
-i cmake/LocationsPostPorts.cmake
|
|
fi
|
|
|
|
# Unpack the XPCE user guide
|
|
mkdir %{docdir}-xpce
|
|
pushd %{docdir}-xpce
|
|
tar -xzf %{SOURCE1}
|
|
mv UserGuide xpce-UserGuide
|
|
popd
|
|
|
|
# Get the Java config sources
|
|
cp -p %{SOURCE2} .
|
|
|
|
# Adjustments to take into account the new location of JNI stuff
|
|
sed -i 's#LIBDIR#%{_libdir}#g' packages/jpl/jpl.pl
|
|
sed -i.jni -e 's#LIBDIR#"%{_libdir}/swipl-jpl"#g' packages/jpl/src/main/java/org/jpl7/JPL.java
|
|
|
|
# Build documentation with the original jpl.pl, since the new version refers
|
|
# to install paths that don't exist yet; then switch before installing.
|
|
cp -p packages/jpl/jpl.pl packages/jpl/jpl.pl.install
|
|
cp -p packages/jpl/jpl.pl.jni packages/jpl/jpl.pl
|
|
|
|
# Do not use the bundled libstemmer
|
|
rm -fr packages/nlp/libstemmer_c
|
|
|
|
# Avoid a clash on doc names
|
|
cp -p customize/README.md README-customize.md
|
|
|
|
%generate_buildrequires
|
|
cd packages/mqi/python
|
|
%pyproject_buildrequires
|
|
|
|
%build
|
|
export LC_ALL=C.UTF-8
|
|
%ifarch %{java_arches}
|
|
javac JavaConfig.java
|
|
JAVA_HOME=$(java JavaConfig --home)
|
|
JAVA_LIBS=$(java JavaConfig --libs-only-L)
|
|
export LD_LIBRARY_PATH=$JAVA_HOME/lib/server
|
|
%else
|
|
# Processed by packages/configure
|
|
export DISABLE_PKGS="jpl"
|
|
%endif
|
|
|
|
# Configure
|
|
%cmake \
|
|
-DBUILD_PDF_DOCUMENTATION:BOOL=%{?fedora:ON}%{!?fedora:OFF} \
|
|
-DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \
|
|
-DCPACK_GENERATOR:STRING=RPM \
|
|
-DGET0SIG_CONST_T:STRING=const \
|
|
-DJQUERYDIR:PATH=%{_datadir}/javascript/jquery/latest \
|
|
-DSWIPL_INSTALL_IN_LIB:BOOL=ON \
|
|
-DSWIPL_VERSIONED_DIR:BOOL=ON \
|
|
-DUSE_TCMALLOC:BOOL=ON \
|
|
-G Ninja
|
|
|
|
# Help latex2html find the bibliographies
|
|
for d in $(find . -name gen); do
|
|
target=$(dirname $d)
|
|
mkdir -p %{_vpath_builddir}/$target
|
|
cp -p $d/*.bbl %{_vpath_builddir}/$target
|
|
done
|
|
|
|
# Build
|
|
%cmake_build
|
|
|
|
# Switch back before installing; see above
|
|
cp -p packages/jpl/jpl.pl.install packages/jpl/jpl.pl
|
|
|
|
%install
|
|
# See <http://www.swi-prolog.org/build/guidelines.html> for file layout
|
|
%cmake_install
|
|
|
|
# Script with shebang should be executable
|
|
chmod 0755 %{buildroot}%{_libdir}/swipl-%{version}/library/dialect/sicstus/swipl-lfr.pl
|
|
chmod 0755 %{buildroot}%{_libdir}/swipl-%{version}/customize/edit
|
|
|
|
# Some XPCE files do not get installed
|
|
cp -p packages/xpce/man/*.1 %{buildroot}%{_mandir}/man1
|
|
|
|
%ifarch %{java_arches}
|
|
# Move the JPL JNI stuff to where the Java packaging guidelines
|
|
# say it should be
|
|
jpl_ver=$(sed -n 's/.*JPL_VERSION \([.[:digit:]]*\).*/\1/p' packages/jpl/CMakeLists.txt)
|
|
|
|
mkdir -p %{buildroot}%{_libdir}/swipl-jpl
|
|
mv %{buildroot}%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/libjpl.so \
|
|
%{buildroot}%{_libdir}/swipl-jpl
|
|
|
|
mkdir -p %{buildroot}%{_jnidir}
|
|
mv %{buildroot}%{_libdir}/swipl-%{version}/lib/jpl.jar %{buildroot}%{_jnidir}
|
|
ln -s ../lib/jpl.jar %{buildroot}%{_libdir}/swipl-jpl
|
|
|
|
# Original locations are referenced by internal libraries and examples
|
|
cd %{buildroot}%{_libdir}
|
|
ln -s ../../../swipl-jpl/libjpl.so swipl-%{version}/lib/%{swipl_arch}/libjpl.so
|
|
ln -s ../../swipl-jpl/jpl.jar swipl-%{version}/lib/jpl.jar
|
|
cd -
|
|
%endif
|
|
|
|
# Remove stuff we do not want to package
|
|
rm %{buildroot}%{_libdir}/swipl-%{version}/{LICENSE,README.md}
|
|
rm %{buildroot}%{_libdir}/swipl-%{version}/customize/README.md
|
|
rm %{buildroot}%{_libdir}/swipl-%{version}/lib/swiplserver/LICENSE
|
|
|
|
%ifnarch ppc64le
|
|
%check
|
|
export LC_ALL=C.UTF-8
|
|
# Test with the original jpl.pl, since the new version refers to paths that
|
|
# don't exist; then switch back.
|
|
cp -p packages/jpl/jpl.pl.jni packages/jpl/jpl.pl
|
|
%ctest
|
|
cp -p packages/jpl/jpl.pl.install packages/jpl/jpl.pl
|
|
%endif
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc README.md README-customize.md
|
|
%{_mandir}/man1/swipl*
|
|
%{_bindir}/swipl
|
|
%{_bindir}/swipl-ld
|
|
%{_libdir}/libswipl.so.9*
|
|
%dir %{_libdir}/swipl-%{version}/
|
|
%dir %{_libdir}/swipl-%{version}/bin/
|
|
%{_libdir}/swipl-%{version}/bin/latex2html
|
|
%{_libdir}/swipl-%{version}/bin/swipl.home
|
|
%dir %{_libdir}/swipl-%{version}/bin/%{swipl_arch}/
|
|
%{_libdir}/swipl-%{version}/bin/%{swipl_arch}/swipl
|
|
%{_libdir}/swipl-%{version}/bin/%{swipl_arch}/swipl-ld
|
|
%{_libdir}/swipl-%{version}/app/
|
|
%{_libdir}/swipl-%{version}/boot*
|
|
%{_libdir}/swipl-%{version}/customize/
|
|
%{_libdir}/swipl-%{version}/demo/
|
|
%dir %{_libdir}/swipl-%{version}/lib/
|
|
%dir %{_libdir}/swipl-%{version}/lib/%{swipl_arch}
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/archive4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/bdb4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/cgi.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/crypto4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/crypt.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/double_metaphone.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/files.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/hashstream.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/http_stream.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/inclpr.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/isub.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/janus.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/json.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/libedit4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/mallocinfo.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/md54pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/memfile.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/ntriples.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/pcre4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/pdt_console.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/porter_stem.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/process.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/prolog_stream.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/protobufs.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/rdf_db.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/readline4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/readutil.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/redis4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/rlimit.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/sched.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/sgml2pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/sha4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/snowball.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/socket.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/ssl4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/streaminfo.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/sweep-module.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/syslog.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/table.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/tex.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/time.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/tipc.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/turtle.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/uid.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/unicode4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/unix.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/uri.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/uuid.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/websocket.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/yaml4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/zlib4pl.so
|
|
%{_libdir}/swipl-%{version}/lib/swiplserver/
|
|
%{_libdir}/swipl-%{version}/library/
|
|
%{_libdir}/swipl-%{version}/swipl.home
|
|
|
|
# Exclude the files that are in the sub-packages
|
|
%ifarch %{java_arches}
|
|
# JPL
|
|
%exclude %{_libdir}/swipl-%{version}/library/ext/jpl
|
|
%endif
|
|
# ODBC
|
|
%exclude %{_libdir}/swipl-%{version}/library/ext/odbc
|
|
|
|
%if %{separate_xpce}
|
|
%files xpce
|
|
%doc packages/xpce/CUSTOMISE.md packages/xpce/README.md
|
|
%{_bindir}/swipl-win
|
|
%{_libdir}/swipl-%{version}/bin/%{swipl_arch}/swipl-win
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/pl2xpce.so
|
|
%{_libdir}/swipl-%{version}/swipl.rc
|
|
%{_libdir}/swipl-%{version}/swipl-win.rc
|
|
%{_libdir}/swipl-%{version}/xpce/
|
|
%{_mandir}/man1/xpce*
|
|
%endif
|
|
|
|
%files devel
|
|
%{_libdir}/libswipl.so
|
|
%{_libdir}/swipl-%{version}/cmake/
|
|
%dir %{_libdir}/swipl-%{version}/include/
|
|
%{_libdir}/swipl-%{version}/include/sicstus/
|
|
%{_libdir}/swipl-%{version}/include/SWI*
|
|
%{_libdir}/cmake/swipl/
|
|
%{_datadir}/pkgconfig/swipl.pc
|
|
|
|
%files compat-yap-devel
|
|
%{_libdir}/swipl-%{version}/include/Yap/
|
|
|
|
%files doc
|
|
%{_libdir}/swipl-%{version}/doc/
|
|
%if 0%{?fedora}
|
|
%doc %{_vpath_builddir}/man/SWI-Prolog-%{version}.pdf
|
|
%endif
|
|
%doc %{docdir}-xpce/*
|
|
|
|
%files odbc
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/odbc4pl.so
|
|
%{_libdir}/swipl-%{version}/library/ext/odbc
|
|
%doc packages/odbc/{demo,ChangeLog,README}
|
|
|
|
%ifarch %{java_arches}
|
|
%files jpl
|
|
%doc packages/jpl/docs/* packages/jpl/src/examples
|
|
%{_jnidir}/jpl.jar
|
|
%{_libdir}/swipl-%{version}/lib/jpl*jar
|
|
%{_libdir}/swipl-%{version}/lib/%{swipl_arch}/libjpl.so
|
|
%{_libdir}/swipl-%{version}/library/ext/jpl/
|
|
%{_libdir}/swipl-jpl/
|
|
%endif
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|