Summary: Library for parsing IDL (Interface Definition Language) Name: libIDL Version: 0.8.10 Release: 1 Source0: http://download.gnome.org/sources/%{name}/0.8/%{name}-%{version}.tar.bz2 Source1: http://download.gnome.org/sources/%{name}/0.8/%{name}-%{version}.md5sum Group: System Environment/Libraries License: LGPLv2+ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: pkg-config >= 0.8 BuildRequires: glib2-devel >= 2.18.2 BuildRequires: flex bison Requires: glib2 >= 2.18.2 %description libIDL is a library for parsing IDL (Interface Definition Language). It can be used for both COM-style and CORBA-style IDL. The library is available as 32-bit and 64-bit. %package devel Summary: Development libraries and header files for libIDL Group: Development/Libraries Requires: libIDL = %{version}-%{release} Requires: pkg-config >= 0.8 Requires: glib2-devel >= 2.18.2 Requires: /sbin/install-info, info %description devel libIDL is a library for parsing IDL (Interface Definition Language). It can be used for both COM-style and CORBA-style IDL. This package contains the header files and libraries needed to write or compile programs that use libIDL. 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 "xlc -q64" or "gcc -maix64". %prep %setup -q %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="xlc -q64" ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --enable-shared --enable-static make %{?_smp_mflags} cp .libs/libIDL-2.so.0 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --enable-shared --enable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q .libs/libIDL-2.a ./libIDL-2.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install gzip --best ${RPM_BUILD_ROOT}%{_infodir}/*.info rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %post devel /sbin/install-info %{_infodir}/libIDL2.info.gz %{_infodir}/dir || : %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/libIDL2.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS COPYING README NEWS %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system) %{_bindir}/* %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/* %{_infodir}/libIDL2.info.gz /usr/bin/* /usr/include/* /usr/lib/*.la %changelog * Wed Apr 15 2008 Michael Perzl - 0.8.10-1 - first version for AIX V5.1 and higher