Name: libosip2 Version: 4.0.0 Release: 1 Summary: oSIP is an implementation of SIP Group: System Environment/Libraries License: LGPLv2+ URL: http://www.gnu.org/software/osip/ Source0: http://ftp.gnu.org/gnu/osip/%{name}-%{version}.tar.gz Source1: http://ftp.gnu.org/gnu/osip/%{name}-%{version}.tar.gz.sig Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %define _libdir64 %{_prefix}/lib64 %description oSIP is an implementation of SIP. SIP stands for the Session Initiation Protocol and is described by the rfc3261 (wich deprecates rfc2543). This library aims to provide multimedia and telecom software developers an easy and powerful interface to initiate and control SIP based sessions in their applications. SIP is a open standard replacement from IETF for H.323. The library is available as 32-bit and 64-bit. %package devel Summary: Development libraries for oSIP Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The GNU oSIP library is written in C and get no dependencies except the standard C library. oSIP is thread safe and will generally be used in a multi-threaded application. Nevertheless, this is optional. oSIP is little in size and code and thus could be use to implement IP soft-phone as well as embedded SIP software. oSIP is not limited to endpoint agents, and can also be used to implement "SIP proxy". oSIP does not intend to provide a high layer API for controlling "SIP Session" at this step. Instead, it currently provides an API for the SIP message parser, SDP message parser, and library to handle "SIP transactions" as defined by the SIP document. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc_r -q64" or "gcc -maix64". %prep %setup -q # don't bump the sorev number %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="cc_r -qcpluscmt" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/%{name}.so* /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libosipparser2.a ${RPM_BUILD_ROOT}%{_libdir64}/libosipparser2.so* mv ${RPM_BUILD_ROOT}%{_mandir}/man1/osip.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/osip2.1 ( cd ${RPM_BUILD_ROOT} for dir in include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/AUTHORS 32bit/BUGS 32bit/COPYING 32bit/ChangeLog 32bit/FEATURES %doc 32bit/HISTORY 32bit/NEWS 32bit/README 32bit/TODO %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc %{_mandir}/man1/* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Tue Jan 08 2013 Michael Perzl - 4.0.0-1 - updated to version 4.0.0 * Wed Oct 05 2011 Michael Perzl - 3.6.0-1 - updated to version 3.6.0 * Wed Oct 05 2011 Michael Perzl - 3.5.0-1 - first version for AIX V5.1 and higher