Name: libconfig Summary: C/C++ configuration file library Version: 1.4.6 Release: 1 License: LGPLv2+ Group: System Environment/Libraries Source0: http://www.hyperrealm.com/libconfig/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch URL: http://www.hyperrealm.com/libconfig/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Libconfig is a simple library for manipulating structured configuration files. This file format is more compact and more readable than XML. And unlike XML, it is type-aware, so it is not necessary to do string parsing in application code. %package devel Summary: Development files for libconfig Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config Requires: /sbin/install-info, info %description devel Development libraries and headers for developing software against libconfig. %prep %setup -q %patch0 %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" # first build the 64-bit version export OBJECT_MODE=64 export CC="xlc" ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --enable-shared --disable-static make %{?_smp_mflags} cp lib/.libs/libconfig.so.9 . cp lib/.libs/libconfig++.so.9 . make distclean # now build the 32-bit version export OBJECT_MODE=32 export CC="xlc" ./configure \ --prefix=%{_prefix} \ --infodir=%{_infodir} \ --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 lib/.libs/libconfig.a ./libconfig.so.9 ${AR} -q lib/.libs/libconfig++.a ./libconfig++.so.9 %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 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} %post devel /sbin/install-info %{_infodir}/%{name}.info .gz%{_infodir}/dir || : %preun devel if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %files %defattr(-,root,system,-) %doc AUTHORS ChangeLog COPYING.LIB README %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/* %{_infodir}/%{name}.info* /usr/include/* /usr/lib/*.la %changelog * Mon Oct 25 2010 Michael Perzl - 1.4.6-1 - updated to version 1.4.6 * Wed May 05 2010 Michael Perzl - 1.4.5-1 - updated to version 1.4.5 * Thu Jan 07 2010 Michael Perzl - 1.4.1-1 - updated to version 1.4.1 * Tue Sep 01 2009 Michael Perzl - 1.3.2-1 - first version for AIX5L V5.1 and higher.