Summary: A CGI (Common Gateway Interface) library Name: cgilib Version: 0.6 Release: 1 License: GPL Group: System/Libraries URL: http://www.infodrom.org/projects/cgilib/ Source0: %{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: make %description This is quite a simple library that provides an easy CGI interface (Common Gateway Interface). It provides an easy to use interface to CGI if you need to write your program in C instead of perl. The library is available as 32-bit and 64-bit. %package devel Summary: Development library and header files for the %{libname} library Group: Development/C Requires: %{name} = %{version} %description devel Header files and develpment documentation for %{name}. 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 %patch0 %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="cc -q64" gmake CreateExportList -X64 %{name}.exp libcgi.a ${CC} -qmkshrobj libcgi.a -o shr64.o -bE:%{name}.exp #rm -f %{name}.exp libcgi.a gmake clean # now build the 32-bit version export CC="cc" gmake CreateExportList -X32 %{name}.exp libcgi.a ${CC} -qmkshrobj libcgi.a -o shr.o -bE:%{name}.exp rm -f %{name}.exp libcgi.a # create shared library ${AR} -rv libcgi.a shr.o ${AR} -q libcgi.a shr64.o %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_includedir} mkdir -p ${RPM_BUILD_ROOT}%{_libdir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man3 cp cgi.h ${RPM_BUILD_ROOT}%{_includedir} chmod 0644 ${RPM_BUILD_ROOT}%{_includedir}/cgi.h cp libcgi.a ${RPM_BUILD_ROOT}%{_libdir} chmod 0644 ${RPM_BUILD_ROOT}%{_libdir}/libcgi.a cp *.3 ${RPM_BUILD_ROOT}%{_mandir}/man3 chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man3 ( 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 CREDITS readme %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system) %{_includedir}/* %{_mandir}/man?/* /usr/include/* %changelog * Tue Jul 01 2008 Michael Perzl - 0.6-1 - first version for AIX V5.1 and higher