# # Rebuild option: # # --with static creates the -static subpckage # %define static 0 %{?_with_static:%define static 1} %define libcgi_somajor 1 %define libcgi_sominor 0 Name: libcgi Version: 1.0 Release: 10%{?dist} Summary: CGI easy as C Group: System Environment/Libraries License: LGPLv2+ URL: http://libcgi.sourceforge.net/ Source: http://prdownloads.sourceforge.net/libcgi/libcgi-%{version}.tar.gz Patch0: libcgi-1.0-Makefile.in.patch Patch1: libcgi-1.0-cgi.c-hextable.patch Patch2: libcgi-1.0-string.c-make_string.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description LibCGI is a library written from scratch to easily make CGI applications in C. %package devel Summary: Header files and libraries for LibCGI development Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The libcgi-devel package contains the header files and libraries needed to develop programs that use the LibCGI library. %if %{static} %package static Summary: LibCGI static library Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} %description static The libcgi-static package contains the static library needed to develop programs that use the LibCGI library. %endif %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 find examples/ -name "Makefile.am" -delete %build %configure make SOMAJOR=%{libcgi_somajor} \ SOMINOR=%{libcgi_sominor} \ %{?_smp_mflags} %install rm -rf ${RPM_BUILD_ROOT} make SOMAJOR=%{libcgi_somajor} \ SOMINOR=%{libcgi_sominor} \ DESTDIR=$RPM_BUILD_ROOT \ LIBDIR=%{_libdir} \ INCDIR=%{_includedir}/%{name} \ install make DESTDIR=$RPM_BUILD_ROOT install_man %if ! %{static} rm -f $RPM_BUILD_ROOT%{_libdir}/libcgi.a %endif %clean rm -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc AUTHORS BUGS ChangeLog README THANKS TODO %{_libdir}/*.so.* %files devel %defattr(-,root,root,-) %doc doc/html/ examples/ %{_libdir}/*.so %{_includedir}/%{name}/ %{_mandir}/man3/*.3* %if %{static} %files static %{_libdir}/*.a %endif %changelog * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0-8 - Autorebuild for GCC 4.3 * Tue Feb 19 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0-7 - fix license tag * Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.0-6 - Rebuild for selinux ppc32 issue. * Tue Jun 26 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.0-5 - make install: override LIBDIR in order to support /usr/lib64. * Tue Jun 26 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.0-4 - Install the header files in %%{_includedir}/%%{name}. * Tue Apr 10 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.0-3 - Don't build the static subpackage by default. * Sun Jan 21 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.0-2 - Static subpackage. * Sun Jan 7 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.0-1 - libcgi-1.0-cgi.c-hextable.patch (sourceforge #1024122). - libcgi-1.0-string.c-make_string.patch (sourceforge #1393115). - libcgi-1.0-Makefile.in.patch (CFLAGS, DESTDIR, soname). * Sat Dec 30 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.0-0 - Initial build. # vim:set ai ts=4 sw=4 sts=4 et: