Name: libcommon Summary: API implementation for general development needs Version: 0.97.3 Release: 1 License: GPL Group: Development/Libraries Source0: %{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}-aix.patch URL: http://libcommon.reseau-libre.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: automake, autoconf, m4 %description The libcommon project is an API implementation in order to respond to general development needs for softwares written in C. This library gives to the developer some utility functions like advanced getopt management, an extra strings treatments function, debugging and tracing functions, and macros for generic lists support. Its goal is to avoid constant re-implementation of the same things for each new program. The libcommon API has been implemented in order to be multi-platform (compatible with i386, ia64, PPC, MIPS, and MIPS 64), hardened (high-level compilation restrictions and implementation requirements), and as few libc dependencies as possible. The library is available as 32-bit and 64-bit. %package devel Summary: Development tools for programs which will use the %{name} library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package contains the header files necessary for developing programs which use the %{name} 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 "cc -q64" or "gcc -maix64". %prep %setup -q %patch0 autoreconf %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cp src/.libs/libcommon.so.0 . make distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q src/.libs/libcommon.a ./libcommon.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT} for dir in include lib 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 ChangeLog Install README TODO %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la %{_mandir}/man?/* /usr/include/* /usr/lib/*.la %changelog * Wed Aug 26 2009 Michael Perzl - 0.97.3-1 - first version for AIX V5.1 and higher