Name: iniparser Version: 3.0 Release: 1 Summary: C library for parsing "INI-style" files Group: System Environment/Libraries License: MIT URL: http://ndevilla.free.fr/iniparser/ Source0: http://ndevilla.free.fr/iniparser/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description iniParser is an ANSI C library to parse "INI-style" files, often used to hold application configuration information. The library is available as 32-bit and 64-bit. %package devel Summary: Header files, libraries and development documentation for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package contains the header files, static libraries and development documentation for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel. 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 -n %{name} chmod -R u+w * %patch0 %build # first build the 64-bit version export OBJECT_MODE=64 make %{?_smp_mflags} lib%{name}.a CreateExportList lib%{name}.exp lib%{name}.a ${CC} -qmkshrobj lib%{name}.a -o shr64.o -bE:lib%{name}.exp rm -f lib%{name}.exp lib%{name}.a make clean # now build the 32-bit version export OBJECT_MODE=32 make %{?_smp_mflags} lib%{name}.a CreateExportList lib%{name}.exp lib%{name}.a ${CC} -qmkshrobj lib%{name}.a -o shr.o -bE:lib%{name}.exp rm -f lib%{name}.exp lib%{name}.a /usr/bin/ar -rv lib%{name}.a shr.o # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X64 -q lib%{name}.a shr64.o %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} # iniParser doesn't have a 'make install' of its own :( mkdir -p ${RPM_BUILD_ROOT}%{_libdir} mkdir -p ${RPM_BUILD_ROOT}%{_includedir} cp lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir} chmod 0644 ${RPM_BUILD_ROOT}%{_libdir}/* cp src/dictionary.h src/iniparser.h ${RPM_BUILD_ROOT}%{_includedir} chmod 0644 ${RPM_BUILD_ROOT}%{_includedir}/* ( 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 README LICENSE %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* /usr/include/* %changelog * Fri Mar 04 2011 Michael Perzl - 3.0-1 - updated to version 3.0 * Thu Apr 01 2010 Michael Perzl - 3.0b-1 - first version for AIX V5.1 and higher