- Move HTML-related files to main application directory so that the CUPS
web interface still works even with --excludedocs (bug #375631).
This commit is contained in:
parent
6803e6d3de
commit
af3560d776
68
cups.spec
68
cups.spec
@ -179,7 +179,7 @@ perl -pi -e "s,^.SILENT:,," Makedefs.in
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="-DLDAP_DEPRECATED=1"
|
export CFLAGS="-DLDAP_DEPRECATED=1"
|
||||||
%configure --with-docdir=%{_docdir}/cups-%{version} \
|
%configure --with-docdir=%{_datadir}/%{name}/www \
|
||||||
--with-optim="$RPM_OPT_FLAGS $CFLAGS -fstack-protector-all" \
|
--with-optim="$RPM_OPT_FLAGS $CFLAGS -fstack-protector-all" \
|
||||||
%if %lspp
|
%if %lspp
|
||||||
--enable-lspp \
|
--enable-lspp \
|
||||||
@ -239,31 +239,6 @@ ln -s ../doc/%{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
|
|||||||
install -c -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{cups_serverbin}/filter
|
install -c -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{cups_serverbin}/filter
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Deal with users trying to access the admin tool at
|
|
||||||
# /usr/share/doc/cups-%{version}/index.html rather than the
|
|
||||||
# correct http://localhost:631/
|
|
||||||
for i in admin classes jobs printers; do
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/$i
|
|
||||||
cat >$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/$i/index.html <<EOF
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
|
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="2; URL=http://localhost:631/$i" />
|
|
||||||
<title>CUPS $i</title>
|
|
||||||
</head>
|
|
||||||
<body bgcolor="#cccc99" text="#000000" link="#0000ff" vlink="#ff00ff">
|
|
||||||
<p>You are trying to access the CUPS admin frontend through reading the files.
|
|
||||||
The correct way to access the CUPS admin frontend is pointing your browser at
|
|
||||||
<a href="http://localhost:631/">http://localhost:631/</a>.</p>
|
|
||||||
<p>You should be automatically redirected to the correct URL in 2 seconds.
|
|
||||||
If your browser does not support redirection, please use
|
|
||||||
<a href="http://localhost:631/$i">this link</a>.</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
EOF
|
|
||||||
done
|
|
||||||
|
|
||||||
cat >$RPM_BUILD_ROOT%{_sysconfdir}/cups/snmp.conf <<"EOF"
|
cat >$RPM_BUILD_ROOT%{_sysconfdir}/cups/snmp.conf <<"EOF"
|
||||||
#Address @LOCAL
|
#Address @LOCAL
|
||||||
#Community public
|
#Community public
|
||||||
@ -380,27 +355,22 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/etc/cups/pstoraster.convs
|
/etc/cups/pstoraster.convs
|
||||||
%config(noreplace) /etc/pam.d/cups
|
%config(noreplace) /etc/pam.d/cups
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/cups
|
%config(noreplace) %{_sysconfdir}/logrotate.d/cups
|
||||||
%dir %{_docdir}/cups-%{version}
|
%{_datadir}/%{name}/www/favicon.*
|
||||||
%{_docdir}/cups-%{version}/favicon.*
|
%{_datadir}/%{name}/www/images
|
||||||
%{_docdir}/cups-%{version}/images
|
%{_datadir}/%{name}/www/de
|
||||||
%{_docdir}/cups-%{version}/de
|
%{_datadir}/%{name}/www/es
|
||||||
%{_docdir}/cups-%{version}/es
|
%{_datadir}/%{name}/www/et
|
||||||
%{_docdir}/cups-%{version}/et
|
%{_datadir}/%{name}/www/fr
|
||||||
%{_docdir}/cups-%{version}/fr
|
%{_datadir}/%{name}/www/he
|
||||||
%{_docdir}/cups-%{version}/he
|
%{_datadir}/%{name}/www/it
|
||||||
%{_docdir}/cups-%{version}/it
|
%{_datadir}/%{name}/www/ja
|
||||||
%{_docdir}/cups-%{version}/ja
|
%{_datadir}/%{name}/www/pl
|
||||||
%{_docdir}/cups-%{version}/pl
|
%{_datadir}/%{name}/www/sv
|
||||||
%{_docdir}/cups-%{version}/sv
|
%{_datadir}/%{name}/www/zh_TW
|
||||||
%{_docdir}/cups-%{version}/zh_TW
|
%{_datadir}/%{name}/www/*.css
|
||||||
%{_docdir}/cups-%{version}/*.css
|
%doc %{_datadir}/%{name}/www/index.html
|
||||||
%{_docdir}/cups-%{version}/admin
|
%doc %{_datadir}/%{name}/www/help
|
||||||
%{_docdir}/cups-%{version}/classes
|
%doc %{_datadir}/%{name}/www/robots.txt
|
||||||
%{_docdir}/cups-%{version}/jobs
|
|
||||||
%{_docdir}/cups-%{version}/printers
|
|
||||||
%doc %{_docdir}/cups-%{version}/index.html
|
|
||||||
%doc %{_docdir}/cups-%{version}/help
|
|
||||||
%doc %{_docdir}/cups-%{version}/robots.txt
|
|
||||||
%config(noreplace) %{initdir}/cups
|
%config(noreplace) %{initdir}/cups
|
||||||
%{_bindir}/cupstestppd
|
%{_bindir}/cupstestppd
|
||||||
%{_bindir}/cupstestdsc
|
%{_bindir}/cupstestdsc
|
||||||
@ -457,6 +427,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{cups_serverbin}/daemon/cups-lpd
|
%{cups_serverbin}/daemon/cups-lpd
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 26 2008 Tim Waugh <twaugh@redhat.com>
|
||||||
|
- Move HTML-related files to main application directory so that the CUPS
|
||||||
|
web interface still works even with --excludedocs (bug #375631).
|
||||||
|
|
||||||
* Tue Feb 26 2008 Tim Waugh <twaugh@redhat.com> 1:1.3.6-3
|
* Tue Feb 26 2008 Tim Waugh <twaugh@redhat.com> 1:1.3.6-3
|
||||||
- Set MaxLogSize to 0 to prevent log rotation. Upstream default is 1Mb, but
|
- Set MaxLogSize to 0 to prevent log rotation. Upstream default is 1Mb, but
|
||||||
we want logrotate to be in charge.
|
we want logrotate to be in charge.
|
||||||
|
Loading…
Reference in New Issue
Block a user