openh323.spec
author gheet
Fri, 27 Feb 2004 13:06:57 +0000
changeset 2066 a4d6bc60986b
parent 1876 0b4928f1eef0
child 2069 771bfcb68b6b
permissions -rw-r--r--
2004-02-27 Ghee Teo <[email protected]> * Updated pwlib.spec, openh323.spec to build the latest tarballs.

Name:		openh323
License: 	MPL
Group: 		System Environment/Libraries
Version: 	1.12.2
Release: 	16
Distribution: 	Mercury
Vendor:       	Sun Microsystems, Inc.
Summary: 	Library for H323 spec.
URL: 		http://www.openh323.org/
Source0: 	%{name}-%{version}.tar.bz2
Source1: 	Speex-0.8.1.tar.bz2
Patch0:  	openh323-01-libname.diff
BuildRoot: 	%{_tmppath}/%{name}-root
Docdir:		%{_defaultdocdir}/doc
Prereq:         /sbin/ldconfig

%define pwlib_version 1.5.0
%define xfee86_version 4.3.0

Requires: pwlib >= %{pwlib_version}
BuildRequires: pwlib-devel >= %{pwlib_version}
BuildRequires: XFree86-devel >= %{xfree86_vresion}

%description
Implementation of the ITU H.323 teleconferencing protocol.

%package devel
Summary: Development package for openh323
Group: Development/Libraries
Requires: openh323 = %{version}

%description devel
Static libraries and header files for development with openh323.

%prep
%setup -q -n %{name}
%patch0 -p1 

bzcat %SOURCE1 | tar xf -
ln -s Speex-0.8.1 speex


%build
# First build static Speex libs
cd speex
./configure  --enable-shared=no --enable-static=yes --with-pic=yes
make
cd ..

(mkdir pwlibdir; cd pwlibdir;
ln -s %{_datadir}/pwlib/make make
ln -s %{_datadir} share
ln -s %{_includedir} include
ln -s %{_libdir} lib
mkdir -p tools
ln -s %{_bindir}/asnparser tools/asnparser
ln -s %{_bindir} bin
)

export PWLIBDIR=%{_builddir}/openh323/pwlibdir
export PWLIB_BUILD="yes"
export PTLIB_CONFIG=`which ptlib-config`

./configure --prefix=%{_prefix} 	\
	--sysconfdir=%{_sysconfdir}
	

make optshared

%install
mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/openh323,%{_bindir},%{_datadir}/misc}
cp -d lib/lib*.so* $RPM_BUILD_ROOT%{_libdir}
install include/*.h $RPM_BUILD_ROOT%{_includedir}/openh323
install speex/libspeex/speex.h speex/libspeex/speex_bits.h speex/libspeex/speex_header.h $RPM_BUILD_ROOT%{_includedir}/openh323

sed -e's@\$(OPENH323DIR)/include@&/openh323@' < openh323u.mak \
	> $RPM_BUILD_ROOT%{_datadir}/misc/openh323u.mak

%clean
rm -rf $RPM_BUILD_ROOT

%post 
/sbin/ldconfig

%postun 
/sbin/ldconfig

%files
%defattr(-,root,root)
%doc ReadMe.txt mpl-1.0.htm
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_includedir}/*
%{_datadir}/misc/*

%changelog
* Thu Feb 26 2004 - [email protected]
  - Updated tarballs to 1.12.2

* Wed Jul 16 2003 - [email protected]
- Initial Sun Release