-# TODO:
-# IPv6 support disabled ('NULL' undeclared)
#
# Conditional build:
%bcond_without http # Disable http support
URL: http://www.opalvoip.org/
Source0: http://downloads.sourceforge.net/opalvoip/%{name}-%{version}.tar.bz2
# Source0-md5: 39d53e09a698bd6099088b4465cfc841
+Patch0: %{name}-std_allocator.patch
License: MPLv1.0
Group: Libraries
%{?with_video:BuildRequires: SDL-devel}
%prep
%setup -q
+%patch0 -p1
%build
# note: --enable-opal influences most of the remaining enable/disable defaults
dir=$(pwd)
%{__make} %{?debug:debugshared}%{!?debug:optshared} \
+ V=1 \
PTLIBMAKEDIR="$dir/make" \
PTLIBDIR="$dir" \
- OPTCCFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG}"\
+ CFLAGS="%{rpmcflags} %{!?debug:-DNDEBUG} -DUSE_GCC" \
+ LDFLAGS="%{rpmcflags} %{rpmldflags} %{!?debug:-DNDEBUG}" \
CXX="%{__cxx}"
dir=$(pwd)
%{__make} install \
+ V=1 \
DESTDIR=$RPM_BUILD_ROOT
-cp -d %{_libdir}/lib*.a $RPM_BUILD_ROOT%{_libdir}
cp version.h $RPM_BUILD_ROOT%{_includedir}/%{name}
sed -i -e 's#PTLIBDIR=.*#PTLIBDIR=%{_datadir}/ptlib#g' $RPM_BUILD_ROOT%{_datadir}/ptlib/make/plugins.mak
+chmod a+x $RPM_BUILD_ROOT%{_libdir}/lib*.so.*
+find $RPM_BUILD_ROOT%{_libdir}/ptlib-* -name '*.so' | xargs chmod a+x
+
%clean
rm -rf $RPM_BUILD_ROOT