8cfa6de
Name:           fcgi
8cfa6de
Version:        2.4.0
Chris Weyl 0f83d3d
Release:        6%{?dist}
8cfa6de
Summary:        FastCGI development kit
8cfa6de
8cfa6de
Group:          Development/Languages
8cfa6de
License:        BSD
8cfa6de
URL:            http://www.fastcgi.com/#TheDevKit
8cfa6de
Source0:        http://fastcgi.com/dist/fcgi-%{version}.tar.gz
8cfa6de
Source1:        fcgi-autogen.sh
8cfa6de
Patch0:         fcgi-2.4.0-autotools.patch
8cfa6de
# Patch0 created with Source1 after patching Patch1 and Patch2
8cfa6de
Patch1:         fcgi-2.4.0-configure.in.patch
8cfa6de
Patch2:         fcgi-2.4.0-Makefile.am-CPPFLAGS.patch
8cfa6de
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
8cfa6de
Chris Weyl 0f83d3d
# for -perl
Chris Weyl 0f83d3d
BuildRequires:  perl(ExtUtils::MakeMaker)
8cfa6de
8cfa6de
%description
8cfa6de
FastCGI is a language independent, scalable, open extension to CGI that
8cfa6de
provides high performance without the limitations of server specific APIs.
8cfa6de
8cfa6de
8cfa6de
%package        devel
8cfa6de
Summary:        Development files for %{name}
8cfa6de
Group:          Development/Libraries
8cfa6de
Requires:       %{name} = %{version}-%{release}
8cfa6de
8cfa6de
8cfa6de
%description    devel
8cfa6de
The %{name}-devel package contains libraries and header files for
8cfa6de
developing applications that use %{name}.
8cfa6de
8cfa6de
Chris Weyl 0f83d3d
%package perl
Chris Weyl 0f83d3d
Summary:        Perl bindings for %{name}
Chris Weyl 0f83d3d
Group:          Development/Libraries
Chris Weyl 0f83d3d
Requires:       %{name} = %{version}-%{release}
Chris Weyl 0f83d3d
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
%description    perl
Chris Weyl 0f83d3d
The %{name}-perl package contains the perl bindings for fcgi.
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
8cfa6de
%prep
8cfa6de
%setup -q
8cfa6de
%patch0 -p1
8cfa6de
# remove DOS End Of Line Encoding
8cfa6de
sed -i 's/\r//' doc/fastcgi-prog-guide/ch2c.htm
8cfa6de
# fix file permissions
8cfa6de
chmod a-x include/fcgios.h libfcgi/os_unix.c
8cfa6de
8cfa6de
8cfa6de
%build
8cfa6de
%configure
218121d
# does not build with parallel make flags
218121d
make
8cfa6de
Chris Weyl 0f83d3d
# build the perl bindings
Chris Weyl 0f83d3d
cd perl
Chris Weyl 0f83d3d
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
Chris Weyl 0f83d3d
make %{?_smp_mflags}
Chris Weyl 0f83d3d
8cfa6de
8cfa6de
%install
8cfa6de
rm -rf $RPM_BUILD_ROOT
8cfa6de
mkdir $RPM_BUILD_ROOT
8cfa6de
8cfa6de
make install DESTDIR=$RPM_BUILD_ROOT
8cfa6de
rm $RPM_BUILD_ROOT/%{_libdir}/libfcgi{++,}.{l,}a
8cfa6de
install -p -m 0644 -D doc/cgi-fcgi.1 $RPM_BUILD_ROOT%{_mandir}/man1/cgi-fcgi.1
8cfa6de
for manpage in doc/*.3
8cfa6de
do
8cfa6de
install -p -m 0644 -D $manpage $RPM_BUILD_ROOT%{_mandir}/man3/$(basename $manpage)
8cfa6de
done
8cfa6de
rm -f -- doc/*.1
8cfa6de
rm -f -- doc/*.3
8cfa6de
Chris Weyl 0f83d3d
# install the perl bindings
Chris Weyl 0f83d3d
cd perl
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
Chris Weyl 0f83d3d
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
Chris Weyl 0f83d3d
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
chmod -x *.fpl
Chris Weyl 0f83d3d
%{_fixperms} $RPM_BUILD_ROOT/%{perl_vendorarch}
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
8cfa6de
%post -p /sbin/ldconfig
8cfa6de
%postun -p /sbin/ldconfig
8cfa6de
8cfa6de
Chris Weyl 0f83d3d
%check
Chris Weyl 0f83d3d
# perl tests -- none presently, but that may change
Chris Weyl 0f83d3d
cd perl && make test
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
8cfa6de
%clean
8cfa6de
rm -rf $RPM_BUILD_ROOT
8cfa6de
8cfa6de
8cfa6de
%files
8cfa6de
%defattr(-,root,root,-)
8cfa6de
%{_bindir}/cgi-fcgi
8cfa6de
%{_libdir}/libfcgi.so.*
8cfa6de
%{_libdir}/libfcgi++.so.*
8cfa6de
%{_mandir}/man1/*
8cfa6de
%defattr(0644,root,root,0755)
8cfa6de
%doc LICENSE.TERMS README
8cfa6de
8cfa6de
8cfa6de
%files devel
8cfa6de
%defattr(-,root,root,-)
8cfa6de
%{_includedir}/*
8cfa6de
%{_libdir}/libfcgi.so
8cfa6de
%{_libdir}/libfcgi++.so
8cfa6de
%{_mandir}/man3/*
Chris Weyl 0f83d3d
%exclude %{_mandir}/man3/*.3pm*
8cfa6de
%defattr(0644,root,root,0755)
8cfa6de
%doc doc/
8cfa6de
8cfa6de
Chris Weyl 0f83d3d
%files perl
Chris Weyl 0f83d3d
%defattr(-,root,root,-)
Chris Weyl 0f83d3d
%{perl_vendorarch}/*
Chris Weyl 0f83d3d
%exclude %dir %{perl_vendorarch}/auto
Chris Weyl 0f83d3d
%{_mandir}/man3/*.3pm*
Chris Weyl 0f83d3d
%defattr(0644,root,root,0755)
Chris Weyl 0f83d3d
%doc perl/ChangeLog perl/README perl/*.fpl 
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
8cfa6de
%changelog
Chris Weyl 0f83d3d
* Tue Oct 14 2008 Chris Weyl <cweyl@alumni.drew.edu> - 2.4.0-6
Chris Weyl 0f83d3d
- package up the perl bindings in their own subpackage
Chris Weyl 0f83d3d
Chris Weyl 0f83d3d
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.4.0-5
Chris Weyl 0f83d3d
- Autorebuild for GCC 4.3
Chris Weyl 0f83d3d
2d69787
* Thu Aug 23 2007 Till Maas <opensource till name> - 2.4.0-4
2d69787
- bump release for rebuild
2d69787
c394626
* Tue Jul 11 2007 Till Maas <opensource till name> - 2.4.0-3
218121d
- remove parallel make flags
218121d
8cfa6de
* Tue Apr 17 2007 Till Maas <opensource till name> - 2.4.0-2
8cfa6de
- add some documentation
8cfa6de
- add mkdir ${RPM_BUILD_ROOT} to %%install
8cfa6de
- install man-pages
8cfa6de
8cfa6de
* Mon Mar 5 2007 Till Maas <opensource till name> - 2.4.0-1
8cfa6de
- Initial spec for fedora