Summary: C library for parsing command line parameters Name: popt Version: 1.16 Release: 1 License: MIT Group: System Environment/Libraries URL: http://www.rpm5.org/ Source0: http://www.rpm5.org/files/%{name}/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gettext Requires: gettext %description Popt is a C library for parsing command line parameters. Popt was heavily influenced by the getopt() and getopt_long() functions, but it improves on them by allowing more powerful argument expansion. Popt can parse arbitrary argv[] style arrays and automatically set variables based on command line arguments. Popt allows command line arguments to be aliased via configuration files and includes utility functions for parsing arbitrary strings into argv[] arrays using shell-like rules. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for the popt library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The popt-devel package includes header files and libraries necessary for developing programs which use the popt C library. It contains the API documentation of the popt library, too. 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 %patch0 %build export LDFLAGS="-L./.libs -L/opt/freeware/lib -bmaxdata:0x80000000 -blibpath:/opt/freeware/lib:/usr/vac/lib:/usr/lib:/lib" # 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} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cp .libs/libpopt.so.0 . make distclean # now build the 32-bit version export CC="xlc" ./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 .libs/libpopt.a ./libpopt.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install cp .libs/libpopt.so.0 ${RPM_BUILD_ROOT}%{_libdir} cd ${RPM_BUILD_ROOT}%{_libdir} ln -s libpopt.so.0 libpopt.so ( 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 CHANGES COPYING %{_libdir}/*.a %{_libdir}/*.so* %{_datadir}/locale/* /usr/lib/*.a /usr/lib/*.so* %files devel %defattr(-,root,system) %doc README %{_includedir}/* %{_libdir}/*.la %{_mandir}/man3/* /usr/include/* /usr/lib/*.la %changelog * Wed Oct 20 2010 Michael Perzl - 1.16-1 - updated to version 1.16 * Thu Apr 08 2010 Michael Perzl - 1.15-1 - updated to version 1.15 * Mon Apr 07 2008 Michael Perzl - 1.14-1 - updated to version 1.14 * Sun Mar 23 2008 Michael Perzl - 1.13-1 - first version for AIX V5.1 and higher