- If the socket-timeout has been reached and the client
[privoxy.git] / genclspec.sh
1 #!/bin/sh
2 #
3 # $Id: genclspec,v 1.30 2002/04/26 15:51:05 morcego Exp $
4 #
5 # Written by and Copyright (C) 2001 the SourceForge
6 # Privoxy team. http://www.privoxy.org/
7 #
8 # This program is free software; you can redistribute it 
9 # and/or modify it under the terms of the GNU General
10 # Public License as published by the Free Software
11 # Foundation; either version 2 of the License, or (at
12 # your option) any later version.
13 #
14 # This program is distributed in the hope that it will
15 # be useful, but WITHOUT ANY WARRANTY; without even the
16 # implied warranty of MERCHANTABILITY or FITNESS FOR A
17 # PARTICULAR PURPOSE.  See the GNU General Public
18 # License for more details.
19 #
20 # The GNU General Public License should be included with
21 # this file.  If not, you can view it at
22 # http://www.gnu.org/copyleft/gpl.html
23 # or write to the Free Software Foundation, Inc., 59
24 # Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25 #
26 # $Log: genclspec.spec,v $
27 #
28
29 VERSION=`cat privoxy-rh.spec | sed -n -e 's/^Version:[ ]*//p'`
30 RELEASE=`cat privoxy-rh.spec | sed -n -e 's/^Release:[ ]*//p'`
31 CLTAG=${VERSION}-${RELEASE}cl
32
33 PACKAGER=`rpm --eval "%{packager}"`
34 if [ "${PACKAGER}" = "%{packager}" ]; then
35         PACKAGER="genclspec script <developers@privoxy.org>"
36 fi
37
38 export LC_ALL=
39 export LANG=
40 DATETAG=`date "+%a %b %d %Y"`
41
42 if [ -r privoxy-cl.spec ]; then
43         echo Old CL specfile found. Removing it.
44 fi
45
46 cat privoxy-rh.spec | sed -e 's/^\(Release:[ ]*[^ ]\+\)[ ]*$/\1cl/' \
47                           -e "/^%changelog/a* ${DATETAG} ${PACKAGER}" \
48                           -e "/^%changelog/a+ privoxy-${CLTAG}" \
49                           -e "/^%changelog/a- Packaging for Conectiva Linux (automatic genarated specfile)" \
50                           -e '/^%changelog/a \
51 ' > privoxy-cl.spec
52