Summary: C library for parsing command line parameters Name: popt Version: 1.13 Release: 1 License: MIT Group: System Environment/Libraries URL: http://www.rpm5.org/ Source0: http://www.rpm5.org/files/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %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 %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} \ --mandir=%{_prefix}/man \ --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=%{_prefix}/man \ --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 * Sun Mar 23 2008 Michael Perzl - 1.13-1 - first version for AIX V5.1 and higher