File libpt2.spec of Package libpt2
#
# spec file for package libpt2 (Version 2.6.5)
#
# Copyright (c) 2009 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 http://bugs.opensuse.org/
#
Name: libpt2
%define _name ptlib
Version: 2.6.5
Release: 1
License: MPL ..
Summary: Portable Windows Library from Equivalence Pty. Ltd. version 2
Url: http://www.openh323.org/
Group: System/Libraries
# https://sourceforge.net/projects/openh323
Source: %{_name}-%{version}.tar.bz2
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch: %{_name}-2.6.2.patch
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch1: %{_name}-soname.diff
BuildRequires: SDL-devel
BuildRequires: bison
BuildRequires: esound-devel
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: libavc1394-devel
BuildRequires: libdc1394_control12-devel
BuildRequires: libdv-devel
BuildRequires: libexpat-devel
BuildRequires: libstdc++-devel
BuildRequires: libv4l-devel
BuildRequires: openldap2-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This 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 is used for the opal project, see
www.openh323.org for details.
%package devel
License: MPL ..
Summary: Development files for libpt2 (includes headers and scripts)
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: SDL-devel
Requires: libexpat-devel
Requires: openldap2-devel
Requires: openssl-devel
Conflicts: pwlib-devel
%description devel
This package includes header files and scripts needed for developers
using the libpt2 library.
%package plugins-avc
License: MPL ..
Summary: AVC plugin for libpt2
Group: System/Libraries
Requires: %{name} = %{version}
Provides: libpt2-video-plugin
%description plugins-avc
This plugin enables AVC (firewire control for digital video cameras)
support in libpt2.
%package plugins-dc
License: MPL ..
Summary: DC plugin for libpt
Group: System/Libraries
Requires: %{name} = %{version}
Provides: libpt2-video-plugin
%description plugins-dc
This plugin enables DC control (via firewire for digital video cameras)
for libpt2.
%package plugins-v4l2
License: MPL ..
Summary: V4L2 support for libpt2
Group: System/Libraries
Requires: %{name} = %{version}
Provides: libpt2-video-plugin
%description plugins-v4l2
This plugin enables 'video for linux' (version 2) support (e.g. for USB
cameras) for libpt2.
%prep
%setup -q -n %{_name}-%{version}
%patch -p1
%patch1 -p1
%build
cp include/ptbuildopts.h.in include/ptbuildopts.h.in.save
autoreconf --force --install
aclocal
cd plugins
autoreconf --force --install
aclocal
cd ..
%{?suse_update_config:%{suse_update_config -f}}
mv include/ptbuildopts.h.in.save include/ptbuildopts.h.in
export RPM_OPT_FLAGS="%{optflags} -fstack-protector"
export OBJ_SUFFIX=2
PWINSTDIR=/usr/share/pwlib X11LIBDIR=/usr/X11R6/%{_lib} ./configure \
--prefix=/usr \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--enable-plugins\
--enable-v4l\
--enable-v4l2\
--enable-avc\
--enable-dc\
--enable-vidfile\
--enable-oss\
--enable-alsa
# --enable-sockagg\
# --enable-exceptions
make %{?jobs:-j %jobs}
%install
export OBJ_SUFFIX=2
%makeinstall
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc mpl-1.0.htm History.txt ChangeLog*
%dir %{_libdir}/%{_name}-%{version}
%dir %{_libdir}/%{_name}-%{version}/devices
%dir %{_libdir}/%{_name}-%{version}/devices/sound
%dir %{_libdir}/%{_name}-%{version}/devices/videoinput
%{_libdir}/libpt2*.2*
%{_libdir}/%{_name}-%{version}/devices/sound/alsa_pwplugin.so
%{_libdir}/%{_name}-%{version}/devices/sound/oss_pwplugin.so
%{_libdir}/%{_name}-%{version}/devices/videoinput/v4l_pwplugin.so
%files devel
%defattr(-,root,root)
%doc ReadMe.txt ReadMe_QOS.txt
%{_datadir}/ptlib/
%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
#%{_bindir}/asnparser
%{_bindir}/ptlib-config
%{_libdir}/libpt2.so
%{_libdir}/libpt2_s.a
%attr (0644, root, root) %{_libdir}/pkgconfig/ptlib.pc
%files plugins-avc
%defattr(-,root,root)
%{_libdir}/%{_name}-%{version}/devices/videoinput/avc_pwplugin.so
%files plugins-dc
%defattr(-,root,root)
%{_libdir}/%{_name}-%{version}/devices/videoinput/dc_pwplugin.so
%files plugins-v4l2
%defattr(-,root,root)
%dir %{_libdir}/%{_name}-%{version}/devices/videoinput
%{_libdir}/%{_name}-%{version}/devices/videoinput/v4l2_pwplugin.so
%changelog