File h323plus.spec of Package h323plus

#
# spec file for package h323plus
#
# Copyright (c) 2015 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:           h323plus
Version:        1.26.5
%define _version	1_26_5
%define lname	libh323-%_version
Release:        0
Summary:        An Open Source ITU H.323 Library and Sample Application
License:        MPL-1.0 and MPL-1.1
Group:          Development/Libraries/C and C++
Url:            http://sourceforge.net/projects/h323plus/

Source:         http://downloads.sf.net/h323plus/%{name}-v%{_version}.tar.gz
Patch2:         01_libname.patch
Patch3:         03_Makefile.in.patch
Patch4:         10_openh323u.mak.patch
Patch6:         ixjuser.h.patch
Patch11:        h323plus-fix-ptlib-config-check.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  binutils
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  glibc-devel
BuildRequires:  libgsm-devel
BuildRequires:  libtool
BuildRequires:  openldap2-devel
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(expat)
BuildRequires:  pkgconfig(libdv)
BuildRequires:  pkgconfig(libsasl2)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(ptlib)
BuildRequires:  pkgconfig(sdl)
BuildRequires:  speex-devel
BuildRequires:  unixODBC-devel
Provides:       openh323 = %{version}
Obsoletes:      openh323 < %{version}

%description
The OpenH323 project aims to create a full featured, interoperable, and
open source implementation of the ITU H.323 teleconferencing protocol
that can be used by personal developers and commercial users without
charge.

Follows on from now depreciated OpenH323 and designed as a drop in replacement
for OpenH323. Development of advanced open source H.323 including application
sharing, video conferencing and incorporates new research and development work.

%package -n %lname
Summary:        An Open Source ITU H.323 Library and Sample Application - System Library
Group:          System/Libraries

%description -n %lname
The OpenH323 project aims to create a full featured, interoperable, and
open source implementation of the ITU H.323 teleconferencing protocol
that can be used by personal developers and commercial users without
charge.

Follows on from now depreciated OpenH323 and designed as a drop in replacement
for OpenH323. Development of advanced open source H.323 including application
sharing, video conferencing and incorporates new research and development work.

%package devel
Summary:        OpenH323 Library for developers
Group:          Development/Libraries/C and C++
Requires:       %lname = %version
Provides:       openh323-devel = %{version}
Obsoletes:      openh323-devel < %{version}
# Suggest debugsource file, as it provides OH323_SRCDIR from openh323u.mak, which may be needed to compile some applications:
Suggests:       h323plus-debugsource

%description devel
This package contains header and script files of the openh323 library
for developers.

To compile some third party projects that use files in OH323_SRCDIR, you
may need to install also openh323-debugsource package.

%prep
%setup -q -n %{name}
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch6 -p1
%patch11 -p1
chmod a-x videonotes.rtf

%build
libtoolize --force
autoconf --force
aclocal
cd plugins
autoconf --force
aclocal
cd .. 
%configure \
	--disable-versioncheck
make %{?_smp_mflags}

%install
%makeinstall
# Now edit openh323u.mak to not refer to build directories:
sed -i '
# Set prefix
/^H323_AVCODEC/i \
PREFIX\t\t     = %{_prefix}
# Do not point to build directory
s:^\(OPENH323DIR[[:space:]]*=[[:space:]]*\).*:\1%{_prefix}:
# Fix libdir
s:/lib$:/%{_lib}:g
s:/lib/:/%{_lib}/:g
# Set source reference to location, where h323plus-debugsource install its data
s:\$(OPENH323DIR)/src:/usr/src/debug/%{name}_v%{_version}:
' %{buildroot}%{_datadir}/openh323/openh323u.mak

# The SONAME of the library is libh323.so.1.26.5, so there is no point
# in shipping libh323.so.1 (nothing requests a file by that name).
# In addition, the presence of the pointless so.1 would cause a conflict
# if it were in both libh323-1-26-{5,6}.
rm -fv "%buildroot/%_libdir"/libh323.so.[0-9]{,.[0-9][0-9]}

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%doc changes.txt mpl-1.0.htm MPL-1.1.html
%{_libdir}/libh323.so.%version

%files devel
%defattr(-,root,root)
%doc videonotes.rtf
%{_includedir}/openh323/
%{_datadir}/openh323/
%{_libdir}/libh323.so
%{_libdir}/libopenh323.so

%changelog
openSUSE Build Service is sponsored by