info:squid.spec-devel

Marcin Korzonek mkorz w lo13.univ.szczecin.pl
Sob, 5 Wrz 1998, 23:41:14 CEST


Hej,
propozycja speca dla squida (lekko tylko zmieniony z RH5.1):
BTW, jak zgrabniej przetłumaczyć oryginalne Summary?

############################################################3
Summary: SQUID Internet Object Cache
Summary(pl): Uniwersalny proxy-cache
Name: squid
%define squid_version 21
Version: 1.1.%{squid_version}
Release: 5d
Copyright: GPL
Group: Networking/Daemons
Source0: ftp://squid.nlanr.net/pub/squid-1.1/%{name}-%{version}-src.tar.gz
Source1: ftp://squid.nlanr.net/pub/squid-1.NOVM/%{name}-1.NOVM.%{squid_version}-src.tar.gz
Source2: squid-1.1.19-faq.tar.gz
Source3: squid-1.1-all.init
Patch0: squid-1.1.19-make.patch
Patch1: squid-1.1.19-rh.patch
Patch2: squid-1.1.19-mempool.patch
Patch3: squid-1.1.21-pauth.patch
Patch4: squid-1.NOVM.21-store.patch
BuildRoot: /var/tmp/%{name}-%{version}-buildroot
Prereq: /sbin/chkconfig

%description
Squid is a high-performance proxy caching server for web clients, supporting
FTP, gopher, and HTTP data objects. Unlike traditional caching software,
Squid handles all requests in a single, non-blocking, I/O-driven process.

Squid keeps meta data and especially hot objects cached in RAM, caches DNS
lookups, supports non-blocking DNS lookups, and implements negative caching
of failed requests. If you are tight on memory, check out the NOVM version
of this package.

Squid supports SSL, extensive access controls, and full request logging. By
using the lightweight Internet Cache Protocol, Squid caches can be arranged
in a hierarchy or mesh for additional bandwidth savings.

Squid consists of a main server program squid, a Domain Name System lookup
program dnsserver, a program for retrieving FTP data ftpget, and some
management and client tools. When squid starts up, it spawns a configurable
number of dnsserver processes, each of which can perform a single, blocking
Domain Name System (DNS) lookup. This reduces the amount of time the cache
waits for DNS lookups.

Squid is derived from the ARPA-funded Harvest project.

%description -l pl

Squid jest wysoce wydajnym serwerem proxy-cache dla przeglądarek WWW.
Potrafi przechowywać pliki FTP, gopher-a oraz objekty HTTP. Squid
przechowuje najczęściej pobierane dane w pamięci RAM i zapamiętuje
odwołania do DNS. Dla komputerów z niewielką ilością wolnej pamięci
przeznaczona jest wersja squid-NOVM.
Squid oferuje wsparcie dla SSL, rozbudowaną kontrolę dostępu oraz pełne
rejestrowanie pobieranych danych. Dzięki użyciu protokołu ICP (Internet
Cache Protocol), serwer squid można łączyć w hierarchię, zwiększając ich
efektywność.
Pakiet squid obejmuje: główny program serwera squid, program
dostarczający informacji z DNS dnsserver, program odbierający dane FTP
ftpget, oraz pomocnicze programy do zarządzania.

Squid wywodzi się ze sponsorowanego przez ARPA projektu Harvest.

%package novm
Group: Networking/Daemons
Summary: SQUID Internet Object Cache (Low VM usage version)
Summary(pl): Proxy cache dla komputerów z niewielką ilością pamięci.
%description novm
The NOVM version of the squid will use less memory to do the proxy job, at
the expense of file descriptors. (NOVM stands for NO Virtual Memory). If you
are tight on memory on your proxy/cache server, this might be for you.

Squid is a high-performance proxy caching server for web clients, supporting
FTP, gopher, and HTTP data objects. Unlike traditional caching software,
Squid handles all requests in a single, non-blocking, I/O-driven process.

Squid keeps meta data and especially hot objects cached in RAM, caches DNS
lookups, supports non-blocking DNS lookups, and implements negative caching
of failed requests.

Squid supports SSL, extensive access controls, and full request logging. By
using the lightweight Internet Cache Protocol, Squid caches can be arranged
in a hierarchy or mesh for additional bandwidth savings.

Squid consists of a main server program squid, a Domain Name System lookup
program dnsserver, a program for retrieving FTP data ftpget, and some
management and client tools. When squid starts up, it spawns a configurable
number of dnsserver processes, each of which can perform a single, blocking
Domain Name System (DNS) lookup. This reduces the amount of time the cache
waits for DNS lookups.

Squid is derived from the ARPA-funded Harvest project.

%description -l pl novm
Squid jest wysoce wydajnym serwerem proxy-cache dla przeglądarek WWW.
Potrafi przechowywać pliki FTP, gopher-a oraz objekty HTTP. Squid
przechowuje najczęściej pobierane dane w pamięci RAM i zapamiętuje
odwołania do DNS. 
Squid oferuje wsparcie dla SSL, rozbudowaną kontrolę dostępu oraz pełne
rejestrowanie pobieranych danych. Dzięki użyciu protokołu ICP (Internet
Cache Protocol), serwer squid można łączyć w hierarchię, zwiększając ich
efektywność.
Pakiet squid obejmuje: główny program serwera squid, program
dostarczający informacji z DNS dnsserver, program odbierający dane FTP
ftpget, oraz pomocnicze programy do zarządzania.

Squid wywodzi się ze sponsorowanego przez ARPA projektu Harvest.

Wersja NOVM używa mniejszej ilości pamięci do pracy, kosztem pewnego
pogorszenia wydajności.

%prep
%setup -q -a 1 -a 2 
%patch0 -p1 -b .make
%patch1 -p1 -b .rh
%patch2 -p1 -b .mempool
%patch3 -p1 -b .pauth
# same paches for NOVM...
(cd squid-1.NOVM.%{squid_version};
%patch0 -p1 -b .make
%patch1 -p1 -b .rh
%patch3 -p1 -b .pauth
%patch4 -p1 -b .store
)

%build
autoconf
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
make sysconfdir=/etc/squid localstatedir=/var
cd squid-1.NOVM.%{squid_version}
autoconf
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
make sysconfdir=/etc/squid localstatedir=/var

%install
rm -rf $RPM_BUILD_ROOT
cd squid-1.NOVM.%{squid_version}
make install \
	prefix=$RPM_BUILD_ROOT/usr \
	sysconfdir=$RPM_BUILD_ROOT/etc/squid \
	localstatedir=$RPM_BUILD_ROOT/var
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mv $RPM_BUILD_ROOT/usr/bin/squid $RPM_BUILD_ROOT/usr/sbin/squid.novm

cd ..
make install \
	prefix=$RPM_BUILD_ROOT/usr \
	sysconfdir=$RPM_BUILD_ROOT/etc/squid \
	localstatedir=$RPM_BUILD_ROOT/var
mv $RPM_BUILD_ROOT/usr/bin/squid $RPM_BUILD_ROOT/usr/sbin/

mkdir -p $RPM_BUILD_ROOT/home/httpd/cgi-bin
mv $RPM_BUILD_ROOT/usr/bin/cachemgr.cgi $RPM_BUILD_ROOT/home/httpd/cgi-bin
rm -f $RPM_BUILD_ROOT/usr/bin/Run*
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m 0755 $RPM_SOURCE_DIR/squid-1.1-all.init \
	$RPM_BUILD_ROOT/etc/rc.d/init.d/squid

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%attr(600, root, root) %dir /etc/squid
%attr(600, root, root) %config(noreplace) %verify(not md5 mtime size) /etc/squid/squid.conf
%attr(600, root, root) /etc/squid/squid.conf.default
%attr(711, root, root) /usr/bin/*
%attr(700, root, root) /usr/sbin/squid
%attr(660, nobody, nobody) /home/httpd/cgi-bin/*
%attr(700, root, root) %config /etc/rc.d/init.d/squid
%doc faq/* README ChangeLog QUICKSTART doc/*
%doc contrib/url-normalizer.pl contrib/rredir.pl contrib/user-agents.pl
%attr(660,nobody,nobody) %dir /var/log/squid
%attr(660,nobody,nobody) %dir /var/spool/squid

%files novm
%defattr(-, root, root)
%attr(600, root, root) %dir /etc/squid
%attr(600, root, root) %config(noreplace) %verify(not md5 mtime size) /etc/squid/squid.conf
%attr(600, root, root) /etc/squid/squid.conf.default
%attr(711, root, root) /usr/bin/*
%attr(700, root, root) /usr/sbin/squid.novm
%attr(660, nobody, nobody) /home/httpd/cgi-bin/*
%attr(700, root, root) %config /etc/rc.d/init.d/squid
%doc faq/* README ChangeLog QUICKSTART doc/*
%doc contrib/url-normalizer.pl contrib/rredir.pl contrib/user-agents.pl
%attr(660,nobody,nobody) %dir /var/log/squid
%attr(660,nobody,nobody) %dir /var/spool/squid

%post
/sbin/chkconfig --add squid

%postun
if [ $1 = 0 ] ; then
	/sbin/chkconfig --del squid
fi

%preun
if [ $1 = 0 ] ; then
	rm -f /var/log/squid/*
	rm -rf /var/spool/squid/*
fi

%post novm
/sbin/chkconfig --add squid

%postun novm
if [ $1 = 0 ] ; then
	/sbin/chkconfig --del squid
fi

%preun novm
if [ $1 = 0 ] ; then
	rm -f /var/log/squid/*
	rm -rf /var/spool/squid/*
fi

%changelog
* Sat Sep 05 1998 Marcin Korzonek <mkorz w shadow.eu.org>
- moved config dir to /etc/squid
- translations modified for pl
- built against glibc 2.1
- changed files permission

* Sun May 10 1998 Cristian Gafton <gafton w redhat.com>
- don't make packages conflict with each other...

* Sat May 02 1998 Cristian Gafton <gafton w redhat.com>
- added a proxy auth patch from Alex deVries <adevries w engsoc.carleton.ca>
- fixed initscripts

* Thu Apr 09 1998 Cristian Gafton <gafton w redhat.com>
- rebuilt for Manhattan

* Fri Mar 20 1998 Cristian Gafton <gafton w redhat.com>
- upgraded to 1.1.21/1.NOVM.21

* Mon Mar 02 1998 Cristian Gafton <gafton w redhat.com>
- updated the init script to use reconfigure option to restart squid instead
  of shutdown/restart (both safer and quicker)

* Sat Feb 07 1998 Cristian Gafton <gafton w redhat.com>
- upgraded to 1.1.20
- added the NOVM package and tryied to reduce the mess in the spec file

* Wed Jan 7 1998 Cristian Gafton <gafton w redhat.com>
- first build against glibc
- patched out the use of setresuid(), which is available only on kernels
  2.1.44 and later
%changelog
* Sun May 10 1998 Cristian Gafton <gafton w redhat.com>
- don't make packages conflict with each other...

* Sat May 02 1998 Cristian Gafton <gafton w redhat.com>
- added a proxy auth patch from Alex deVries <adevries w engsoc.carleton.ca>
- fixed initscripts

* Thu Apr 09 1998 Cristian Gafton <gafton w redhat.com>
- rebuilt for Manhattan

* Fri Mar 20 1998 Cristian Gafton <gafton w redhat.com>
- upgraded to 1.1.21/1.NOVM.21

* Mon Mar 02 1998 Cristian Gafton <gafton w redhat.com>
- updated the init script to use reconfigure option to restart squid instead
  of shutdown/restart (both safer and quicker)

* Sat Feb 07 1998 Cristian Gafton <gafton w redhat.com>
- upgraded to 1.1.20
- added the NOVM package and tryied to reduce the mess in the spec file

* Wed Jan 7 1998 Cristian Gafton <gafton w redhat.com>
- first build against glibc
- patched out the use of setresuid(), which is available only on kernels
  2.1.44 and later
-- 
   Marcin Korzonek
   mkorz w shadow.eu.org



Więcej informacji o liście dyskusyjnej pld-devel-pl