From: morcego Date: Sat, 27 Apr 2002 04:44:52 +0000 (+0000) Subject: GNUmakefile.in: The tarball created on redhat-dist and suse-dist now ignore X-Git-Tag: v_3_0_branchpoint~182 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=9e14c8850a0d1d14f62391dceb0765ef71a146d8 GNUmakefile.in: The tarball created on redhat-dist and suse-dist now ignore the PACKAGERS file, as well privoxy-cl.spec (in case it was created) GNUmakefile.in: New targets -> conectiva-spec, conectiva-dist and conectiva-upload genclspec.sh : New file to generate, from privoxy-rh.spec, a specfile for Conectiva Linux --- diff --git a/GNUmakefile.in b/GNUmakefile.in index 6a231314..eb192fb1 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,6 +1,6 @@ # Note: Makefile is built automatically from Makefile.in # -# $Id: GNUmakefile.in,v 1.89 2002/04/26 17:20:54 swa Exp $ +# $Id: GNUmakefile.in,v 1.90 2002/04/26 17:46:53 swa Exp $ # # Written by and Copyright (C) 2001 the SourceForge # Privoxy team. http://www.privoxy.org/ @@ -208,7 +208,7 @@ all: $(PROGRAM) ############################################################################# .PHONY: all inifiles redhat-dist redhat-upload solaris-dist suse-dist \ suse-upload win-dist tarball-dist dok redhat-dok webserver clean clobber tags \ -install +install conectiva-spec conectiva-dist conectiva-upload ############################################################################# @@ -280,15 +280,6 @@ rpm-stuff: dist-check clean clobber fi; \ done; \ -############################################################################# -# redhat distribution alpha and x86 -############################################################################# -redhat-dist: rpm-stuff - - $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" -czf $(TAR_ARCH) . - $(RPM) --clean -ta $(TAR_ARCH) - if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi - check-release: @if [ "$(RPM_PACKAGEV)" = "" ]; then \ echo ; \ @@ -296,13 +287,50 @@ check-release: echo " No value given for RPM_PACKAGEV. Please use:"; \ echo " make dist-upload RPM_PACKAGEV=release"; \ echo " where \"release\" is the release number you want to and"; \ - echo " where \"dist\" is the name of the distro \(redhat or suse\)"; \ + echo " where \"dist\" is the name of the distro (redhat or suse)"; \ echo ; \ echo " Ex: make redhat-upload RPM_PACKAGEV=1"; \ + echo ""; \ + echo "ATTENTION: If your distribution use a specific tag on the"; \ + echo " release field (like \"cl\" for Conectiva, and"; \ + echo " \"mdk\" for Mandrake), DO NOT put it on the value"; \ + echo " given to RPM_PACKAGEV. It will be added automaticaly."; \ + echo " Do it like you would do for a redhat package,"; \ + echo " (i.e. just the number)."; \ echo ; \ exit 1; \ fi + +############################################################################# +# Create Conectiva specfile from RedHat specfile +############################################################################# +conectiva-spec: + rm -f privoxy-cl.spec + chmod a+x genclspec.sh + ./genclspec.sh + +############################################################################# +# Conectiva distribution for x86 +############################################################################# +conectiva-dist: rpm-stuff conectiva-spec + + $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-rh.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) . + $(RPM) --clean -ta $(TAR_ARCH) + if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi + +conectiva-upload: check-release + make redhat-upload RPM_PACKAGEV=$(RPM_PACKAGEV)cl + +############################################################################# +# redhat distribution alpha and x86 +############################################################################# +redhat-dist: rpm-stuff + + $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) . + $(RPM) --clean -ta $(TAR_ARCH) + if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi + # anonymously ncftps the rpms to sourceforge redhat-upload: check-release ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm @@ -329,7 +357,7 @@ suse-dist: rpm-stuff exit 1;\ fi - $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-rh.spec" -czf $(TAR_ARCH) . + $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-rh.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) . $(RPM) --clean -ta $(TAR_ARCH) if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi @@ -806,6 +834,9 @@ install: all ## end: # $Log: GNUmakefile.in,v $ +# Revision 1.90 2002/04/26 17:46:53 swa +# be consistent +# # Revision 1.89 2002/04/26 17:20:54 swa # just produce single html files to proces them later with Destiller or somesuch. looks prettier. # 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 +