Name: cpptest Version: 1.1.2 Release: 1 Summary: A portable and powerful and simple unit testing framework for C++ Group: System Environment/Libraries License: LGPLv2+ URL: http://%{name}.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: pkg-config BuildRequires: gcc-c++ >= 4.5.4-1, libstdc++-devel >= 4.5.4-1 Requires: libstdc++ >= 4.5.4-1 %define _libdir64 %{_prefix}/lib64 %description CppTest is a portable and powerful, yet simple, unit testing framework for handling automated tests in C++. The focus lies on usability and extendability. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release}, pkg-config %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. 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 "g++ -maix64". %prep %setup -q mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %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 OBJECT_MODE=64 export CC="gcc -maix64" export CXX="g++ -maix64" export LDFLAGS="-L%{_libdir64} -L%{_libdir}" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-shared --disable-static make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export CC="gcc -maix32" export CXX="g++ -maix32" export LDFLAGS="-L%{_libdir}" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make install DESTDIR=${RPM_BUILD_ROOT} cd ../32bit export OBJECT_MODE=32 make install DESTDIR=${RPM_BUILD_ROOT} ( 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* ( 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/NEWS 32bit/COPYING 32bit/AUTHORS 32bit/ChangeLog %{_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 /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Wed Aug 26 2015 Michael Perzl - 1.1.2-1 - updated to version 1.1.2 * Mon Nov 22 2010 Michael Perzl - 1.1.1-1 - first version for AIX V5.1 and higher