Sophie

Sophie

distrib > Mageia > 3 > x86_64 > media > core-release-src > by-pkgid > b407b458add6834d376093c8c8519a4b > files > 7

fcgi-2.4.0-13.mga3.src.rpm

%define major 0
%define libname %mklibname %{name} %{major}
%define build_perl 0

Summary:	The FastCGI development kit
Name:		fcgi
Version:	2.4.0
Release:	%mkrel 13
License:	BSD-style
Group:		System/Servers
URL:		http://www.fastcgi.com/
Source0:	%{name}-%{version}.tar.bz2
Source1:        fcgi-autogen.sh
Patch0:         fcgi-2.4.0-autotools.patch
# Patch0 created with Source1 after patching Patch1 and Patch2
Patch1:         fcgi-2.4.0-configure.in.patch
Patch2:         fcgi-2.4.0-Makefile.am-CPPFLAGS.patch
Patch3:         fcgi-2.4.0-gcc44_fixes.patch
BuildRequires:	libtool
BuildRequires:  perl-devel
Requires:	%{libname} = %{version}

%description
FastCGI is an open extension to CGI that provides high performance
for all Internet applications without the penalties of Web server
APIs.

FastCGI is designed to be layered on top of existing Web server
APIs. For instance, the mod_fastcgi Apache module adds FastCGI 
support to the Apache server. FastCGI can also be used, with 
reduced functionality and reduced performance, on any Web server
that supports CGI.

This FastCGI Developer's Kit is designed to make developing 
FastCGI applications easy. The kit currently supports FastCGI 
applications written in C/C++, Perl, Tcl, and Java.

This package contains only shared libraries used by programs 
developed using FastCGI Developer's Kit and cgi-fcgi (bridge from
CGI to FastCGI).

%files
%defattr(0644,root,root,0755)
%attr(0755,root,root) %{_bindir}/cgi-fcgi
%attr(0755,root,root) /var/www/fcgi-bin/authorizer
%attr(0755,root,root) /var/www/fcgi-bin/echo
%attr(0755,root,root) /var/www/fcgi-bin/echo-cpp
%attr(0755,root,root) /var/www/fcgi-bin/echo-x
%attr(0755,root,root) /var/www/fcgi-bin/log-dump
%attr(0755,root,root) /var/www/fcgi-bin/size
%attr(0755,root,root) /var/www/fcgi-bin/threaded
%{_mandir}/man1/cgi-fcgi.1.*
%{_mandir}/man3/FCGI_Accept.3.*
%{_mandir}/man3/FCGI_Finish.3.*
%{_mandir}/man3/FCGI_SetExitStatus.3.*
%{_mandir}/man3/FCGI_StartFilterData.3.*

#--------------------------------------------------------------------
%if %build_perl
%package perl
Summary:        Perl bindings for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))


%description    perl
The %{name}-perl package contains the perl bindings for fcgi.

%files perl
%defattr(-,root,root,-)
%{perl_vendorarch}/*
%exclude %dir %{perl_vendorarch}/auto
%{_mandir}/man3/*.3pm*
%defattr(0644,root,root,0755)
%endif
#--------------------------------------------------------------------

%package -n	%{libname}
Summary:	Libraries for %{name} 
Group:          System/Libraries

%description -n	%{libname}
This package contains the %{name} library files.

%files -n %{libname}
%defattr(0644,root,root,0755)
%attr(0755,root,root) %{_libdir}/libfcgi++.so.0*
%attr(0755,root,root) %{_libdir}/libfcgi.so.0*

#--------------------------------------------------------------------

%package -n	%{libname}-devel
Summary:	Development headers and libraries for %{name}
Group:		Development/C
Requires:	%{libname} = %{version}
Provides:	libfcgi-devel = %{version}
Obsoletes:	libfcgi-devel

%description -n	%{libname}-devel
This package contains FastCGI Developer's Kit, which is designed
to make developing FastCGI applications easy. The kit currently
supports FastCGI applications written in C/C++, Perl, Tcl, and
Java.

%files -n %{libname}-devel
%defattr(0644,root,root,0755)
%attr(0755,root,root) %{_libdir}/libfcgi++.so
%attr(0755,root,root) %{_libdir}/libfcgi.so
%{_includedir}/*.h
%{_datadir}/fastcgi/*

#--------------------------------------------------------------------

%prep
%setup -q
%patch0 -p1
%patch3 -p1 -b .gcc44_fixes

# remove DOS End Of Line Encoding
sed -i 's/\r//' doc/fastcgi-prog-guide/ch2c.htm
# fix file permissions
chmod a-x include/fcgios.h libfcgi/os_unix.c


%build
#touch INSTALL NEWS AUTHORS ChangeLog COPYING

autoreconf -fi
%configure2_5x \
    --with-global \
    --with-nodebug \
    --with-noassert \
    --with-notest

# does not build with parallel make flags
make

%if %build_perl
# build the perl bindings
cd perl
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%make
%endif
	
%install
mkdir -p %{buidlroot}
%makeinstall_std
rm $RPM_BUILD_ROOT/%{_libdir}/libfcgi{++,}.{l,}a
install -p -m 0644 -D doc/cgi-fcgi.1 $RPM_BUILD_ROOT%{_mandir}/man1/cgi-fcgi.1
for manpage in doc/*.3
do
install -p -m 0644 -D $manpage $RPM_BUILD_ROOT%{_mandir}/man3/$(basename $manpage)
done
rm -f -- doc/*.1
rm -f -- doc/*.3

%if %build_perl
# install the perl bindings
pushd perl
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
popd
%endif

install -d %{buildroot}%{_datadir}/fastcgi
cp -a examples/{Makefile*,*.c} %{buildroot}%{_datadir}/fastcgi/
 
# install the built examples (should we require apache here?)
install -d %{buildroot}/var/www/fcgi-bin
 
pushd examples/.libs/
    install -m755 authorizer %{buildroot}/var/www/fcgi-bin/
    install -m755 echo %{buildroot}/var/www/fcgi-bin/
    install -m755 echo-cpp %{buildroot}/var/www/fcgi-bin/
    install -m755 echo-x %{buildroot}/var/www/fcgi-bin/
    install -m755 log-dump %{buildroot}/var/www/fcgi-bin/
    install -m755 size %{buildroot}/var/www/fcgi-bin/
    install -m755 threaded %{buildroot}/var/www/fcgi-bin/
popd

%if %build_perl
# install the perl bindings
cd perl
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
%endif

%if %build_perl
%check
# perl tests -- none presently, but that may change
cd perl && make test
%endif


%changelog

* Fri Jan 11 2013 umeabot <umeabot> 2.4.0-13.mga3
+ Revision: 350077
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Jan 08 2013 fwang <fwang> 2.4.0-12.mga3
+ Revision: 341818
- update autoconf patch

* Sun Jul 15 2012 fwang <fwang> 2.4.0-11.mga3
+ Revision: 270901
- build with autoconf and automake

* Tue Feb 22 2011 dmorgan <dmorgan> 2.4.0-11.mga1
+ Revision: 56287
- Fix build_perl macro
- Do not install perl
  DO not proceed perl checks
- Add perl-devel as buildrequire
- Fix build ( patches from fedora )
  Add perl subpackage ( not built yet )
- Fix %%patch0
- Remove mdv macros
- imported package fcgi