File pwlib.spec of Package pwlib

# spec file for package pwlib
# Copyright (c) 2017 SUSE LINUX 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

%define package_version v1_11_0
%define debug_package_requires libpt1_11 = %{version}-%{release}
Name:           pwlib
Version:        1.11.0
Release:        0
Summary:        Portable Windows Library from Equivalence Pty. Ltd
License:        MPL-1.0
Group:          System/Libraries
Source:         %{name}-%{package_version}-src-tar.bz2
Source2:        baselibs.conf
Patch0:         %{name}-v1_11_0-PVXMLSession.patch
Patch1:         %{name}-v1_11_0-make.patch
Patch2:         %{name}-v1_11_0-pstring-fix.patch
Patch3:         %{name}-v1_11_0-ldap.patch
Patch4:         %{name}-v1_11_0-openssl.patch
Patch5:         %{name}-v4l-2.6.38.patch
Patch6:         pwlib-gcc47.patch
Patch7:         aarch64-support.patch
Patch8:         ppc64le-support.patch
Patch9:         pwlib-bison-3.0.patch
Patch10:        pwlib-gcc7.patch
BuildRequires:  SDL-devel
BuildRequires:  alsa-devel
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  cyrus-sasl-devel
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  libdv-devel
BuildRequires:  libexpat-devel
BuildRequires:  openldap2-devel
BuildRequires:  openssl-devel
Provides:       %{name}-plugins-alsa = %{version}-%{release}
Provides:       %{name}-plugins-oss = %{version}-%{release}
Provides:       %{name}-plugins-v4l = %{version}-%{release}
Obsoletes:      %{name}-plugins-alsa < %{version}-%{release}
Obsoletes:      %{name}-plugins-oss < %{version}-%{release}
Obsoletes:      %{name}-plugins-v4l < %{version}-%{release}
%if 0%{?suse_version} >= 1210
BuildRequires:  libv4l-devel >= 0.8.4

PWLib is a moderately large class library that was created many years
ago as a method to produce applications that run on both Microsoft
Windows and the X Window System. It was supposed to have a Macintosh
port as well but this never happened.

It is used for the OpenH323 project, see for details.

%package -n libpt1_11
Summary:        The pwlib shared libs
Group:          System/Libraries
Requires:       %{name} = %{version}

%description -n libpt1_11
This package includes the PWLIB library.

%package devel
Summary:        The pwlib package for developers (includes headers and scripts)
Group:          Development/Libraries/C and C++
Requires:       SDL-devel
Requires:       cyrus-sasl-devel
Requires:       libexpat-devel
Requires:       libpt1_11 = %{version}
Requires:       openldap2-devel
Requires:       openssl-devel

%description devel
This package includes header files and scripts needed for developers
using the PWLIB library.

%package plugins-v4l2
Summary:        V4L2 support for pwlib
Group:          System/Libraries
Provides:       pwlib-video-plugin
#obsolete, replaced by this package but not the same thing.
Obsoletes:      %{name}-plugins-avc
Obsoletes:      %{name}-plugins-dc

%description plugins-v4l2
This plugin enables 'video for linux' (version 2) support (e.g. for USB
cameras) for pwlib.

%setup -q -n %{name}_%{package_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%if 0%{?suse_version} > 1120
%patch4 -p1
%if 0%{?suse_version} >= 1210
%patch5 -p1
%patch6 -p1
%patch8 -p1
%patch9 -p0
%patch10 -p1

#autoreconf --force --install
autoconf --force
cd plugins
autoconf --force
cd ..
#automake --force-missing
export PWINSTDIR="%{_datadir}/%{name}"
%configure \
#	--enable-sockagg\
#	--enable-exceptions

make RPM_OPT_FLAGS="%{optflags} -fno-strict-aliasing -fstack-protector" \

make install DESTDIR=%{buildroot}

%post -n libpt1_11 -p /sbin/ldconfig

%postun -n libpt1_11 -p /sbin/ldconfig

%doc mpl-1.0.htm History.txt
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/devices
%dir %{_libdir}/%{name}/devices/sound
%dir %{_libdir}/%{name}/devices/videoinput

%files -n libpt1_11

%files devel
%doc ReadMe.txt ReadMe_QOS.txt
%dir %{_datadir}/%{name}
%attr (0644, root, root) %{_includedir}/ptbuildopts.h
%attr (0644, root, root) %{_includedir}/ptlib.h
%dir %{_includedir}/ptlib
%dir %{_includedir}/ptlib/unix
%dir %{_includedir}/ptlib/unix/ptlib
%attr (0644, root, root) %{_includedir}/ptlib/*.h
%attr (0644, root, root) %{_includedir}/ptlib/*.inl
%attr (0644, root, root) %{_includedir}/ptlib/unix/ptlib/*.h
%attr (0644, root, root) %{_includedir}/ptlib/unix/ptlib/*.inl
%dir %{_includedir}/ptclib
%attr (0644, root, root) %{_includedir}/ptclib/*.h

%files plugins-v4l2
%dir %{_libdir}/%{name}/devices/videoinput

openSUSE Build Service is sponsored by