pwlib.spec
author dermotm
Mon, 24 Jul 2006 12:30:39 +0000
branchgnome-2-10
changeset 19949 94f49bf19351
parent 19719 d184ca39d269
permissions -rw-r--r--
access control test #4

#
# spec file for package pwlib
#
# Copyright (c) 2005 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
Name:		pwlib
License:	MPL
Group: 		System Environment/Libraries
Version: 	1.8.4
Release: 	1
Distribution:	Java Desktop System
Vendor:       	Sun Microsystems, Inc.
Summary: 	Portable Windows Libary
Source: 	pwlib-%{version}.tar.bz2
Patch1:  	pwlib-01-makefiles.diff
URL: 		http://www.openh323.org/
BuildRoot: 	%{_tmppath}/%{name}-root
Docdir:       	%{_defaultdocdir}/doc
AutoReqProv:  	on
Prereq:         /sbin/ldconfig

%description
PWLib is a moderately large class library that has its genesis many
years ago as a method to produce applications to run on both Microsoft
Windows and Unix X-Window systems. 

It is supplied mainly to support the open H323 project, but that shouldn't stop
you from using it in whatever project you have in mind if you so desire. 

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

%description devel
The pwlib-devel package includes the libraries and header files for pwlib.

%prep
%setup -q
%patch1 -p1 
cd ../
rm -rf %{name}
ln -s %{name}-%{version} %{name}
cd %{name}-%{version}


%build
export PWLIBDIR=`pwd`
export PWLIB_BUILD="yes"
aclocal $ACLOCAL_FLAGS
autoconf
%ifos solaris
%define regexp_options "--enable-internalregex"
%else
%define regexp_options ""
%endif

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

make optshared OPTCCFLAGS="$RPM_OPT_FLAGS" 

#cd tools/asnparser
#make optshared OPTCCFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}/ptclib
mkdir -p $RPM_BUILD_ROOT%{_includedir}/ptlib/unix/ptlib
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/make
cp -d lib/*.so* $RPM_BUILD_ROOT%{_libdir}
install include/ptlib.h $RPM_BUILD_ROOT%{_includedir}
install include/ptbuildopts.h $RPM_BUILD_ROOT%{_includedir}
install include/ptlib/*.h $RPM_BUILD_ROOT%{_includedir}/ptlib/
install include/ptlib/*.inl $RPM_BUILD_ROOT%{_includedir}/ptlib/
install include/ptlib/unix/ptlib/*.h $RPM_BUILD_ROOT%{_includedir}/ptlib/unix/ptlib
install include/ptlib/unix/ptlib/*.inl $RPM_BUILD_ROOT%{_includedir}/ptlib/unix/ptlib
install include/ptclib/*.h $RPM_BUILD_ROOT%{_includedir}/ptclib/
#%ifos solaris
#install tools/asnparser/obj_solaris_*/asnparser $RPM_BUILD_ROOT%{_bindir}
#%else
#install tools/asnparser/obj_linux_*/asnparser $RPM_BUILD_ROOT%{_bindir}
#%endif
install -m 755 make/ptlib-config $RPM_BUILD_ROOT%{_bindir}

cd make
for l in *.mak ; do
	sed -e 's#@prefix@#%{_prefix}#' \
	    -e 's#@makdir@#%{_datadir}/pwlib#' \
		< $l > $RPM_BUILD_ROOT%{_datadir}/%{name}/make/$l
done

%clean
rm -rf $RPM_BUILD_ROOT

%post   
/sbin/ldconfig

%postun 
/sbin/ldconfig

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

%files devel
%defattr(-,root,root)
%{_libdir}/libpt*.so
%{_includedir}/*
%{_datadir}/pwlib
%attr(755,root,root) %{_bindir}/*

%changelog
* Thu Jun 23 2005 - [email protected]
- Added symlinks to build openh323 cleanly

* Wed Jun 22 2005 - [email protected]
- Bumped to 1.8.4 required by gnomemeeting

* Wed Sep 15 2004 - [email protected]
- Upreved to 1.6.5 and removed all the solaris specific patches as it
  is causing the linux build to loop.

* Thu Jul 01 2004 - [email protected]
- Added pwlib-05-ptlib-unix-makefile.diff patch to change the include
  order so regex.h in the local directory is used.

* Fri Apr 09 2004 - Fixed cp lib/*so* so it is lib/*.so* because this
  was picking up a directory that gets added on Solaris only.  Also
  added %ifos so that tools/asnparser/obj_solaris_* gets installed
  instead of the linux directory when building on Solaris.

* Wed Apr 07 2004 - [email protected]
- Removed %ifos solaris from around patches 02-04 as the patch 
  pwlib-02-forte-makefiles.diff now works correctly for linux and solaris 
  for openh323.

* Mon Apr 05 2004 - [email protected]
- Use internal-regex when building on Solaris since the pwlib 1.6.3 code
  doesn't work properly with Solaris.  Now call aclocal since configure.in
  changed to support Solaris readdir_r (fix ported from pwlib CVS head).
 
* Mon Apr 05 2004 - [email protected]
- Added %ifos solaris around the patches 02-04 which is solaris specific.

* Thu Apr 01 2004 - [email protected]
- Added patch 02, 03, and 04 to improve compile on Solari.

* Mon Mar 01 2004 - [email protected]
- Fixed built problem due to old version of alsa on Cinnabar.
  Put in --disable-alsa.

* Fri Feb 27 2004 - [email protected]
- updated tarball to 1.6.3 which is required for g-m 1.00 release.

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

* Thu Feb 26 2004 - [email protected]
- Updated tarball to 1.5.2

* Mon Aug 18 2003 - [email protected]
- Include ptbuildopt.h into the the include dir which is needed by
  gnomemeeting.
* Tue Jul 15 2003 - [email protected]
- Initial Sun Release