Name: ucommon Summary: Portable C++ framework for threads and sockets Version: 5.0.7 Release: 1 License: LGPLv3+ Group: System Environment/Libraries URL: http://www.gnu.org/software/commoncpp Source0: http://www.gnutelephony.org/dist/tarballs/%{name}-%{version}.tar.gz Source1: http://www.gnutelephony.org/dist/tarballs/%{name}-%{version}.tar.gz.sig Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc >= 4.2.3-2, gcc-c++ >= 4.2.3-2, libstdc++-devel >= 4.2.3-2 BuildRequires: openssl-devel >= 0.9.8, gnutls-devel >= 2.6.6-2, gettext Requires: libgcc >= 4.2.3-2, libstdc++ >= 4.2.3-2 Requires: openssl >= 0.9.8, gnutls >= 2.6.6-2, gettext %define _libdir64 %{_prefix}/lib64 %description GNU uCommon C++ is a lightweight library to facilitate using C++ design patterns even for very deeply embedded applications, such as for systems using uClibc along with POSIX threading support. For this reason, uCommon disables language features that consume memory or introduce runtime overhead. UCommon introduces some design patterns from Objective-C, such as reference counted objects, memory pools, and smart pointers. UCommon introduces some new concepts for handling of thread locking and synchronization. %package bin Summary: ucommon system and support applications Group: Applications/System Requires: %{name} = %{version}-%{release} Requires: libstdc++ >= 4.2.3-2 %description bin This is a collection of command line tools that use various aspects of the ucommon library. Some may be needed to prepare files or for development of applications. %package devel Summary: Headers for building uCommon applications Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: %{name}-bin = %{version}-%{release} Requires: libstdc++-devel >= 4.2.3-2 Requires: openssl-devel >= 0.9.8 Requires: gnutls-devel >= 2.6.6-2 Requires: gettext Requires: pkg-config %description devel This package provides header and support files needed for building applications that use the uCommon library. 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 "gcc -maix64". %prep %setup -q %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" export CXXFLAGS=$CFLAGS cd 64bit # first build the 64-bit version export CC="gcc -maix64" export CXX="g++ -maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export CC="gcc -maix32" export CXX="g++ -maix32" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export OBJECT_MODE=32 ./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 ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( 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}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.so* /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libusecure.a ${RPM_BUILD_ROOT}%{_libdir64}/libusecure.so* ( cd ${RPM_BUILD_ROOT} for dir in bin 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/README 32bit/COPYING 32bit/COPYING.LESSER %doc 32bit/NEWS 32bit/SUPPORT 32bit/ChangeLog %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files bin %defattr(-,root,system,-) %{_bindir}/args* %{_bindir}/mdsum* %{_bindir}/scrub* %{_bindir}/zerofill* %{_mandir}/man1/args.* %{_mandir}/man1/mdsum.* %{_mandir}/man1/scrub* %{_mandir}/man1/zerofill.* /usr/bin/args* /usr/bin/mdsum* /usr/bin/scrub* /usr/bin/zerofill* %files devel %defattr(-,root,system,-) %{_bindir}/ucommon-config* %{_mandir}/man1/ucommon-config.* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc /usr/bin/ucommon-config* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Tue Nov 22 2011 Michael Perzl - 5.0.7-1 - updated to version 5.0.7 * Tue Nov 22 2011 Michael Perzl - 5.0.6-2 - fixed wrong dependency on openssl-devel * Sun Oct 09 2011 Michael Perzl - 5.0.6-1 - updated to version 5.0.6 * Tue Jul 26 2011 Michael Perzl - 5.0.5-1 - updated to version 5.0.5 * Mon Jul 11 2011 Michael Perzl - 5.0.4-1 - updated to version 5.0.4 * Wed Jun 15 2011 Michael Perzl - 5.0.3-1 - updated to version 5.0.3 * Mon Jun 13 2011 Michael Perzl - 5.0.2-1 - updated to version 5.0.2 * Sun May 29 2011 Michael Perzl - 5.0.1-1 - updated to version 5.0.1 * Mon May 09 2011 Michael Perzl - 4.3.3-1 - updated to version 4.3.3 * Sun Apr 24 2011 Michael Perzl - 4.3.2-1 - updated to version 4.3.2 * Wed Apr 06 2011 Michael Perzl - 4.3.1-1 - updated to version 4.3.1 * Mon Apr 04 2011 Michael Perzl - 4.3.0-1 - updated to version 4.3.0 * Mon Mar 28 2011 Michael Perzl - 4.2.2-1 - updated to version 4.2.2 * Sun Mar 27 2011 Michael Perzl - 4.2.1-1 - updated to version 4.2.1 * Mon Mar 21 2011 Michael Perzl - 4.2.0-1 - updated to version 4.2.0 * Mon Mar 21 2011 Michael Perzl - 4.1.7-1 - updated to version 4.1.7 * Mon Feb 21 2011 Michael Perzl - 4.1.5-1 - updated to version 4.1.5 * Mon Feb 21 2011 Michael Perzl - 4.0.5-1 - first version for AIX V5.1 and higher