Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > media > contrib-src > by-pkgid > 300f8557bc8f535cbbe328679fbdcf79 > files > 2

cgiwrap-3.7.1-1mdk.src.rpm

%define name 	cgiwrap
%define version 3.7.1
%define release 1mdk

Summary: 	User CGI access
Name: 		%{name}
Version: 	%{version}
Release: 	%{release}
License: 	GPL
Group: 		System/Servers
Source0: 	%{name}-%{version}.tar.bz2
Source1: 	conf.tar.bz2
Url:		http://cgiwrap.unixtools.org
BuildRoot: 	%{_tmppath}/%{name}-%{version}-buildroot

%description
This is CGIWrap - a gateway that allows more secure user access to
CGI programs on an HTTPd server than is provided by the http
server itself. The primary function of CGIwrap is to make certain
that any CGI script runs with the permissions of the user who
installed it, and not those of the server.

%prep

%setup -q -a1

%build
%serverbuild

./configure \
    --build=%_target_platform \
    --host=%_target_platform \
    --target=%_target_platform \
    --enable-static \
    --enable-shared \
    --prefix=%{_prefix} \
    --exec-prefix=%{_exec_prefix} \
    --bindir=%{_bindir} \
    --sbindir=%{_sbindir} \
    --sysconfdir=%{_sysconfdir} \
    --datadir=%{_datadir} \
    --includedir=%{_includedir} \
    --libdir=%{_libdir} \
    --libexecdir=%{_libexecdir} \
    --localstatedir=%{_localstatedir} \
    --sharedstatedir=%{_sharedstatedir} \
    --mandir=%{_mandir} \
    --infodir=%{_infodir} \
    --with-perl=%{_bindir}/perl \
    --with-local-doc-url=/cgiwrap \
    --with-install-dir=/var/www/cgi-bin \
    --with-cgi-dir=public_html/cgi-bin \
    --with-httpd-user=apache \
    --with-minimum-uid=500 \
    --with-minimum-gid=100 \
    --with-logging-file=/var/log/cgiwrap.log \
    --with-allow-file=%{_sysconfdir}/cgiwrap.allow \
    --with-deny-file=%{_sysconfdir}/cgiwrap.deny \
    --with-rewrite=%{_sysconfdir}/cgiwrap.userdir \
    --with-host-checking \
    --with-check-shell \

%make CC="gcc"

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}/var/www/cgi-bin
install -d %{buildroot}/var/www/html/cgiwrap

install cgiwrap %{buildroot}/var/www/cgi-bin/
ln -s cgiwrap %{buildroot}/var/www/cgi-bin/cgiwrapd
ln -s cgiwrap %{buildroot}/var/www/cgi-bin/nph-cgiwrap
ln -s cgiwrap %{buildroot}/var/www/cgi-bin/nph-cgiwrapd

install -m644 cgiwrap.allow %{buildroot}/%{_sysconfdir}/
install -m644 cgiwrap.deny %{buildroot}/%{_sysconfdir}/
install -m644 cgiwrap.userdir %{buildroot}/%{_sysconfdir}/
install -m644 htdocs/* %{buildroot}/var/www/html/cgiwrap/

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc README doc/*
%attr(0640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/cgiwrap.*
%attr(4755,root,root) /var/www/cgi-bin/*
%attr(0644,root,root) /var/www/html/cgiwrap/*.html

%changelog
* Tue Aug 13 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.7.1-1mdk
- initial cooker contrib
- ripped the stuff in S1 from debian