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