libreoffice-compilar/CentOS-8/SPECS/poco.spec

465 lines
16 KiB
RPMSpec

%global cmake_build_dir cmake-build
%global cmake_debug_dir cmake-debug
# build without tests on s390 (runs out of memory during linking due the 2 GB address space)
%ifnarch s390
%bcond_without tests
%endif
%bcond_without samples
# mongodb still available only on little endian arches
%ifarch aarch64 %{arm} %{ix86} x86_64 ppc64le
%bcond_without mongodb
%endif
%if 0%{?fedora} > 27
%global mysql_devel_pkg mariadb-connector-c-devel
%global mysql_lib_dir %{_libdir}/mariadb
%else
%global mysql_devel_pkg mariadb-devel
%global mysql_lib_dir %{_libdir}/mysql
%endif
Name: poco
Version: 1.11.0
Release: 2%{?dist}
Summary: C++ class libraries for network-centric applications
License: Boost
URL: https://pocoproject.org
Source0: https://github.com/pocoproject/%{name}/archive/%{name}-%{version}-release.tar.gz#/%{name}-%{version}.tar.gz
# Disable the tests that will fail under Koji (mostly network)
Patch0: disable-tests.patch
# Fix XML compilation due to new methods being guarded by XML_DTD
Patch1: define-xml-dtd.patch
BuildRequires: make
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: openssl-devel
BuildRequires: libiodbc-devel
BuildRequires: %{mysql_devel_pkg}
BuildRequires: zlib-devel
BuildRequires: pcre-devel
BuildRequires: sqlite-devel
BuildRequires: expat-devel
BuildRequires: libtool-ltdl-devel
# We build poco to unbundle as much as possible, but unfortunately, it uses
# some internal functions of pcre so there are a few files from pcre that are
# still bundled. See https://github.com/pocoproject/poco/issues/120.
Provides: bundled(pcre) = 8.35
%description
The POCO C++ Libraries (POCO stands for POrtable COmponents)
are open source C++ class libraries that simplify and accelerate the
development of network-centric, portable applications in C++. The
POCO C++ Libraries are built strictly on standard ANSI/ISO C++,
including the standard library.
%prep
%autosetup -p1 -n %{name}-%{name}-%{version}-release
/bin/sed -i.orig -e 's|$(INSTALLDIR)/lib\b|$(INSTALLDIR)/%{_lib}|g' Makefile
/bin/sed -i.orig -e 's|ODBCLIBDIR = /usr/lib\b|ODBCLIBDIR = %{_libdir}|g' Data/ODBC/Makefile Data/ODBC/testsuite/Makefile
/bin/sed -i.orig -e 's|flags=""|flags="%{optflags}"|g' configure
/bin/sed -i.orig -e 's|SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH)|SHAREDOPT_LINK =|g' build/config/Linux
/bin/sed -i.orig -e 's|"Poco/zlib.h"|<zlib.h>|g' Zip/src/ZipStream.cpp
/bin/sed -i.orig -e 's|#endif|#define POCO_UNBUNDLED 1\n\n#endif|g' Foundation/include/Poco/Config.h
rm -f Foundation/src/MSG00001.bin
rm -f Foundation/include/Poco/zconf.h
rm -f Foundation/include/Poco/zlib.h
rm -f Foundation/src/adler32.c
rm -f Foundation/src/compress.c
rm -f Foundation/src/crc32.c
rm -f Foundation/src/crc32.h
rm -f Foundation/src/deflate.c
rm -f Foundation/src/deflate.h
rm -f Foundation/src/gzguts.h
rm -f Foundation/src/gzio.c
rm -f Foundation/src/infback.c
rm -f Foundation/src/inffast.c
rm -f Foundation/src/inffast.h
rm -f Foundation/src/inffixed.h
rm -f Foundation/src/inflate.c
rm -f Foundation/src/inflate.h
rm -f Foundation/src/inftrees.c
rm -f Foundation/src/inftrees.h
rm -f Foundation/src/trees.c
rm -f Foundation/src/trees.h
rm -f Foundation/src/zconf.h
rm -f Foundation/src/zlib.h
rm -f Foundation/src/zutil.c
rm -f Foundation/src/zutil.h
# PCRE files that can't be removed due to still being bundled:
# pcre.h pcre_config.h pcre_internal.h pcre_tables.c pcre_ucd.c
rm -f Foundation/src/pcre_byte_order.c
rm -f Foundation/src/pcre_chartables.c
rm -f Foundation/src/pcre_compile.c
rm -f Foundation/src/pcre_config.c
rm -f Foundation/src/pcre_dfa_exec.c
rm -f Foundation/src/pcre_exec.c
rm -f Foundation/src/pcre_fullinfo.c
rm -f Foundation/src/pcre_get.c
rm -f Foundation/src/pcre_globals.c
rm -f Foundation/src/pcre_jit_compile.c
rm -f Foundation/src/pcre_maketables.c
rm -f Foundation/src/pcre_newline.c
rm -f Foundation/src/pcre_ord2utf8.c
rm -f Foundation/src/pcre_refcount.c
rm -f Foundation/src/pcre_string_utils.c
rm -f Foundation/src/pcre_study.c
rm -f Foundation/src/pcre_try_flipped.c
rm -f Foundation/src/pcre_valid_utf8.c
rm -f Foundation/src/pcre_version.c
rm -f Foundation/src/pcre_xclass.c
rm -f Data/SQLite/src/sqlite3.h
rm -f Data/SQLite/src/sqlite3.c
rm -f XML/include/Poco/XML/expat.h
rm -f XML/include/Poco/XML/expat_external.h
rm -f XML/src/ascii.h
rm -f XML/src/asciitab.h
rm -f XML/src/expat_config.h
rm -f XML/src/iasciitab.h
rm -f XML/src/internal.h
rm -f XML/src/latin1tab.h
rm -f XML/src/nametab.h
rm -f XML/src/utf8tab.h
rm -f XML/src/xmlparse.cpp
rm -f XML/src/xmlrole.c
rm -f XML/src/xmlrole.h
rm -f XML/src/xmltok.c
rm -f XML/src/xmltok.h
rm -f XML/src/xmltok_impl.c
rm -f XML/src/xmltok_impl.h
rm -f XML/src/xmltok_ns.c
%build
%if %{with tests}
%global poco_tests -DENABLE_TESTS=ON
%endif
%if %{without samples}
%global poco_samples --no-samples
%endif
%if %{without mongodb}
%global poco_mongodb -DENABLE_MONGODB=OFF
%endif
%cmake -DPOCO_UNBUNDLED=ON %{?poco_tests} %{?poco_mongodb} -DENABLE_REDIS=OFF -DODBC_INCLUDE_DIR=%{_includedir}/libiodbc -B %{cmake_build_dir}
%make_build -C %{cmake_build_dir}
%cmake -DPOCO_UNBUNDLED=ON %{?poco_tests} %{?poco_mongodb} -DENABLE_REDIS=OFF -DODBC_INCLUDE_DIR=%{_includedir}/libiodbc -DCMAKE_BUILD_TYPE=Debug -B %{cmake_debug_dir}
%make_build -C %{cmake_debug_dir}
%install
%make_install -C %{cmake_debug_dir}
rm -f %{buildroot}%{_prefix}/include/Poco/Config.h.orig
%make_install -C %{cmake_build_dir}
rm -f %{buildroot}%{_prefix}/include/Poco/Config.h.orig
rm -f %{buildroot}%{_bindir}/arc
%check
%if %{with tests}
export POCO_BASE="$(pwd)"
pushd %{cmake_build_dir}
ctest -V %{?_smp_mflags} -E "MongoDB|Redis|DataMySQL|DataODBC"
popd
%endif
# -----------------------------------------------------------------------------
%package foundation
Summary: The Foundation POCO component
%description foundation
This package contains the Foundation component of POCO. (POCO is a set
of C++ class libraries for network-centric applications.)
%files foundation
%{_libdir}/libPocoFoundation.so.*
# -----------------------------------------------------------------------------
%package xml
Summary: The XML POCO component
%description xml
This package contains the XML component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files xml
%{_libdir}/libPocoXML.so.*
# -----------------------------------------------------------------------------
%package util
Summary: The Util POCO component
%description util
This package contains the Util component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files util
%{_libdir}/libPocoUtil.so.*
# -----------------------------------------------------------------------------
%package net
Summary: The Net POCO component
%description net
This package contains the Net component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files net
%{_libdir}/libPocoNet.so.*
# -----------------------------------------------------------------------------
%package crypto
Summary: The Crypto POCO component
%description crypto
This package contains the Crypto component of POCO. (POCO is a set of
C++ class libraries for network-centric applications.)
%files crypto
%{_libdir}/libPocoCrypto.so.*
# -----------------------------------------------------------------------------
%package netssl
Summary: The NetSSL POCO component
%description netssl
This package contains the NetSSL component of POCO. (POCO is a set of
C++ class libraries for network-centric applications.)
%files netssl
%{_libdir}/libPocoNetSSL.so.*
# -----------------------------------------------------------------------------
%package data
Summary: The Data POCO component
%description data
This package contains the Data component of POCO. (POCO is a set of
C++ class libraries for network-centric applications.)
%files data
%{_libdir}/libPocoData.so.*
# -----------------------------------------------------------------------------
%package sqlite
Summary: The Data/SQLite POCO component
%description sqlite
This package contains the Data/SQLite component of POCO. (POCO is a set
of C++ class libraries for network-centric applications.)
%files sqlite
%{_libdir}/libPocoDataSQLite.so.*
# -----------------------------------------------------------------------------
%package odbc
Summary: The Data/ODBC POCO component
%description odbc
This package contains the Data/ODBC component of POCO. (POCO is a set
of C++ class libraries for network-centric applications.)
%files odbc
%{_libdir}/libPocoDataODBC.so.*
# -----------------------------------------------------------------------------
%package mysql
Summary: The Data/MySQL POCO component
%description mysql
This package contains the Data/MySQL component of POCO. (POCO is a set
of C++ class libraries for network-centric applications.)
%files mysql
%{_libdir}/libPocoDataMySQL.so.*
# -----------------------------------------------------------------------------
%package zip
Summary: The Zip POCO component
%description zip
This package contains the Zip component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files zip
%{_libdir}/libPocoZip.so.*
# -----------------------------------------------------------------------------
%package json
Summary: The JSON POCO component
%description json
This package contains the JSON component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files json
%{_libdir}/libPocoJSON.so.*
# -----------------------------------------------------------------------------
%if %{with mongodb}
%package mongodb
Summary: The MongoDB POCO component
%description mongodb
This package contains the MongoDB component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files mongodb
%{_libdir}/libPocoMongoDB.so.*
%endif
# -----------------------------------------------------------------------------
%package pagecompiler
Summary: The PageCompiler POCO component
%description pagecompiler
This package contains the PageCompiler component of POCO. (POCO is a
set of C++ class libraries for network-centric applications.)
%files pagecompiler
%{_bindir}/cpspc
%{_bindir}/f2cpsp
# -----------------------------------------------------------------------------
%package encodings
Summary: The Encodings POCO component
%description encodings
This package contains the Encodings component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files encodings
%{_libdir}/libPocoEncodings.so.*
# -----------------------------------------------------------------------------
%package jwt
Summary: The JWT POCO component
%description jwt
This package contains the JWT component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files jwt
%{_libdir}/libPocoJWT.so.*
# -----------------------------------------------------------------------------
%package activerecord
Summary: The ActiveRecord POCO component
%description activerecord
This package contains the ActiveRecord component of POCO. (POCO is a set of C++
class libraries for network-centric applications.)
%files activerecord
%{_libdir}/libPocoActiveRecord.so.*
# -----------------------------------------------------------------------------
%package debug
Summary: Debug builds of the POCO libraries
%description debug
This package contains the debug builds of the POCO libraries for
application testing purposes.
%files debug
%{_libdir}/libPocoFoundationd.so.*
%{_libdir}/libPocoXMLd.so.*
%{_libdir}/libPocoUtild.so.*
%{_libdir}/libPocoNetd.so.*
%{_libdir}/libPocoCryptod.so.*
%{_libdir}/libPocoNetSSLd.so.*
%{_libdir}/libPocoDatad.so.*
%{_libdir}/libPocoDataSQLited.so.*
%{_libdir}/libPocoDataODBCd.so.*
%{_libdir}/libPocoDataMySQLd.so.*
%{_libdir}/libPocoZipd.so.*
%{_libdir}/libPocoJSONd.so.*
%if %{with mongodb}
%{_libdir}/libPocoMongoDBd.so.*
%endif
%{_libdir}/libPocoEncodingsd.so.*
%{_libdir}/libPocoJWTd.so.*
%{_libdir}/libPocoActiveRecordd.so.*
# -----------------------------------------------------------------------------
%package devel
Summary: Headers for developing programs that will use POCO
Requires: poco-debug%{?_isa} = %{version}-%{release}
Requires: poco-foundation%{?_isa} = %{version}-%{release}
Requires: poco-xml%{?_isa} = %{version}-%{release}
Requires: poco-util%{?_isa} = %{version}-%{release}
Requires: poco-net%{?_isa} = %{version}-%{release}
Requires: poco-crypto%{?_isa} = %{version}-%{release}
Requires: poco-netssl%{?_isa} = %{version}-%{release}
Requires: poco-data%{?_isa} = %{version}-%{release}
Requires: poco-sqlite%{?_isa} = %{version}-%{release}
Requires: poco-odbc%{?_isa} = %{version}-%{release}
Requires: poco-mysql%{?_isa} = %{version}-%{release}
Requires: poco-zip%{?_isa} = %{version}-%{release}
Requires: poco-json%{?_isa} = %{version}-%{release}
%if %{with mongodb}
Requires: poco-mongodb%{?_isa} = %{version}-%{release}
%endif
Requires: poco-pagecompiler%{?_isa} = %{version}-%{release}
Requires: poco-encodings%{?_isa} = %{version}-%{release}
Requires: poco-jwt%{?_isa} = %{version}-%{release}
Requires: poco-activerecord%{?_isa} = %{version}-%{release}
Requires: zlib-devel
Requires: expat-devel
Requires: openssl-devel
%description devel
The POCO C++ Libraries (POCO stands for POrtable COmponents)
are open source C++ class libraries that simplify and accelerate the
development of network-centric, portable applications in C++. The
POCO C++ Libraries are built strictly on standard ANSI/ISO C++,
including the standard library.
This package contains the header files needed for developing
POCO applications.
%files devel
%{_includedir}/Poco
%{_libdir}/libPocoFoundation.so
%{_libdir}/libPocoFoundationd.so
%{_libdir}/libPocoXML.so
%{_libdir}/libPocoXMLd.so
%{_libdir}/libPocoUtil.so
%{_libdir}/libPocoUtild.so
%{_libdir}/libPocoNet.so
%{_libdir}/libPocoNetd.so
%{_libdir}/libPocoCrypto.so
%{_libdir}/libPocoCryptod.so
%{_libdir}/libPocoNetSSL.so
%{_libdir}/libPocoNetSSLd.so
%{_libdir}/libPocoData.so
%{_libdir}/libPocoDatad.so
%{_libdir}/libPocoDataSQLite.so
%{_libdir}/libPocoDataSQLited.so
%{_libdir}/libPocoDataODBC.so
%{_libdir}/libPocoDataODBCd.so
%{_libdir}/libPocoDataMySQL.so
%{_libdir}/libPocoDataMySQLd.so
%{_libdir}/libPocoZip.so
%{_libdir}/libPocoZipd.so
%{_libdir}/libPocoJSON.so
%{_libdir}/libPocoJSONd.so
%if %{with mongodb}
%{_libdir}/libPocoMongoDB.so
%{_libdir}/libPocoMongoDBd.so
%endif
%{_libdir}/libPocoEncodings.so
%{_libdir}/libPocoEncodingsd.so
%{_libdir}/libPocoJWT.so
%{_libdir}/libPocoJWTd.so
%{_libdir}/libPocoActiveRecord.so
%{_libdir}/libPocoActiveRecordd.so
%{_libdir}/cmake/Poco
# -----------------------------------------------------------------------------
%package doc
Summary: The POCO API reference documentation
%description doc
The POCO C++ Libraries (POCO stands for POrtable COmponents)
are open source C++ class libraries that simplify and accelerate the
development of network-centric, portable applications in C++. The
POCO C++ Libraries are built strictly on standard ANSI/ISO C++,
including the standard library.
This is the complete POCO class library reference documentation in
HTML format.
%files doc
%doc README NEWS LICENSE CONTRIBUTORS CHANGELOG doc/*