3 # $Id: genclspec,v 1.30 2002/04/26 15:51:05 morcego Exp $
5 # Written by and Copyright (C) 2001 the SourceForge
6 # Privoxy team. http://www.privoxy.org/
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.
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.
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.
26 # $Log: genclspec.spec,v $
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
33 PACKAGER=`rpm --eval "%{packager}"`
34 if [ "${PACKAGER}" = "%{packager}" ]; then
35 PACKAGER="genclspec script <developers@privoxy.org>"
40 DATETAG=`date "+%a %b %d %Y"`
42 if [ -r privoxy-cl.spec ]; then
43 echo Old CL specfile found. Removing it.
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)" \