openh323.spec
author laca
Sun, 05 Sep 2004 07:08:21 +0000
changeset 3846 9ab79af72b15
parent 3679 a83eeeda363e
child 3858 a0a00bd9bb27
permissions -rw-r--r--
2004-09-05 Laszlo Peter <[email protected]> * *.spec: fix $CPUS on Solaris

Name:		openh323
License: 	MPL
Group: 		System Environment/Libraries
Version: 	1.13.2
Release: 	17
Distribution: 	Cinnabar
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
Patch1:     openh323-02-forte-Makefile.diff
Patch2:     openh323-03-fix-frame-classify.diff
Patch3:     openh323-04-fix-vid_coder.diff
Patch4:     openh323-05-fix-encoder-h261.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 
%patch1 -p1 
%patch2 -p1 
%patch3 -p1 
%patch4 -p1 

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


%build
%ifos linux
if [ -x /usr/bin/getconf ]; then
  CPUS=`getconf _NPROCESSORS_ONLN`
fi
%else
  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
%endif
if test "x$CPUS" = "x" -o $CPUS = 0; then
  CPUS=1
fi

# First build static Speex libs
cd speex
./configure  --enable-shared=no --enable-static=yes --with-pic=yes
make -j $CPUS
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=`pwd`/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
* Wed Jul 07 2004 - [email protected]
- added "-j $CPUS" to make to speed up builds

* Fri Apr 09 2004 - [email protected]
- Added needed Solaris patch 05.

* Thu Apr 06 2004 - [email protected]
- Added needed Solaris patches 02, 03, 04.

* Fri Feb 27 2004 - [email protected]
  - Built tarball 1.13.2 for g-m 1.0

* Fri Feb 27 2004 - [email protected]
- Update Distro

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

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