X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=genclspec.sh;fp=genclspec.sh;h=1b266ab760aaf106cba8a393d51be4b308e07a69;hp=0000000000000000000000000000000000000000;hb=9e14c8850a0d1d14f62391dceb0765ef71a146d8;hpb=8448901276646b62f623c7c4805b9c3b6a56bf6f;ds=sidebyside diff --git a/genclspec.sh b/genclspec.sh new file mode 100755 index 00000000..1b266ab7 --- /dev/null +++ b/genclspec.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +VERSION=`cat privoxy-rh.spec | sed -n -e 's/^Version:[ ]*//p'` +RELEASE=`cat privoxy-rh.spec | sed -n -e 's/^Release:[ ]*//p'` +CLTAG=${VERSION}-${RELEASE}cl + +PACKAGER=`rpm --eval "%{packager}"` +if [ "${PACKAGER}" = "%{packager}" ]; then + PACKAGER="genclspec script " +fi + +export LC_ALL= +export LANG= +DATETAG=`date "+%a %b %d %Y"` + +if [ -r privoxy-cl.spec ]; then + echo Old CL specfile found. Removing it. +fi + +cat privoxy-rh.spec | sed -e 's/^\(Release:[ ]*[^ ]\+\)[ ]*$/\1cl/' \ + -e "/^%changelog/a* ${DATETAG} ${PACKAGER}" \ + -e "/^%changelog/a+ privoxy-${CLTAG}" \ + -e "/^%changelog/a- Packaging for Conectiva Linux (automatic genarated specfile)" \ + -e '/^%changelog/a \ +' > privoxy-cl.spec +