Merge branch 'master' of ssh://pkgs.fedoraproject.org/vim

This commit is contained in:
Karsten Hopp 2015-11-04 12:04:59 +01:00
commit cf9333ba82
2 changed files with 54 additions and 43 deletions

12
vim-7.4-checkhl.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up vim74/runtime/syntax/spec.vim.kh1 vim74/runtime/syntax/spec.vim
--- vim74/runtime/syntax/spec.vim.kh1 2015-11-04 11:37:16.483417787 +0100
+++ vim74/runtime/syntax/spec.vim 2015-11-04 11:37:38.033528045 +0100
@@ -114,7 +114,7 @@ syn region specDescriptionArea matchgrou
syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment
"%% Scripts Section %%
-syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
+syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|check\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
"%% Changelog Section %%
syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense

View File

@ -1,58 +1,57 @@
#!/bin/bash #!/bin/bash
debug="" debug=""
#debug="echo" #debug="echo "
cd `dirname $0` cd `dirname $0`
LANG=C LANG=C
SPEC=vim.spec SPEC=vim.spec
CHANGES=1
DATE=`date +"%a %b %d %Y"` DATE=`date +"%a %b %d %Y"`
MAJORVERSION=`grep "define baseversion" vim.spec | cut -d ' ' -f 3` MAJORVERSION=`grep "define baseversion" vim.spec | cut -d ' ' -f 3`
CHLOG="* $DATE Karsten Hopp <karsten@redhat.com> $MAJORVERSION"
ORIGPL=`grep "define patchlevel" vim.spec | cut -d ' ' -f 3 | sed -e "s/^0*//g"` ORIGPL=`grep "define patchlevel" vim.spec | cut -d ' ' -f 3 | sed -e "s/^0*//g"`
ORIGPLFILLED=`printf "%03d" $ORIGPL` ORIGPLFILLED=`printf "%03d" $ORIGPL`
PL=$ORIGPL PL=$ORIGPL
git pull if [ ! -d vim-upstream ]; then
git clone https://github.com/vim/vim.git vim-upstream
else
pushd vim-upstream
git pull
popd
fi
while true; do pushd vim-upstream
LASTPL=$PL LASTTAG=$(git describe --tags $(git rev-list --tags --max-count=1))
LASTPLFILLED=`printf "%03d" $LASTPL` UPSTREAMMAJOR=$(echo $LASTTAG | sed -e 's/v\([0-9]*\.[0-9]*\).*/\1/')
PL=$((PL+1)) LASTPL=`echo $LASTTAG| sed -e 's/.*\.//'`
PLFILLED=`printf "%03d" $PL` LASTPLFILLED=`printf "%03d" $LASTPL`
PNAME="$MAJORVERSION.$PLFILLED" if [ "$ORIGPLFILLED" == "$LASTPLFILLED" ]; then
URL="ftp://ftp.vim.org/pub/vim/patches/$MAJORVERSION/$PNAME"
wget -nc $URL 2>/dev/null
if [ "$?" -ne "0" ]; then
# Patchlevel not yet available, back down
PL=$LASTPL
PLFILLED=$LASTPLFILLED
LASTPL=$((LASTPL-1))
LASTPLFILLED=`printf "%03d" $LASTPL`
if [ "$PL" == "$ORIGPL" ]; then
echo "No new patchlevel available" echo "No new patchlevel available"
exit CHANGES=0
fi fi
break rm -rf dist/* 2>/dev/null
else make unixall
# echo "Got patchlevel $MAJORVERSION.$PL, current CVS is at $MAJORVERSION.$ORIGPL" mv dist/vim-${UPSTREAMMAJOR}.tar.bz2 dist/vim-${UPSTREAMMAJOR}-${LASTPLFILLED}.tar.bz2
$debug git add $PNAME git log > dist/README.patches
$debug git commit -m "- patchlevel $PLFILLED" $PNAME popd
sed -i -e "/Patch$LASTPLFILLED: ftp:\/\/ftp.vim.org\/pub\/vim\/patches\/$MAJORVERSION\/$MAJORVERSION.$LASTPLFILLED/aPatch$PLFILLED: ftp:\/\/ftp.vim.org\/pub\/vim\/patches\/$MAJORVERSION\/$MAJORVERSION.$PLFILLED" $SPEC
sed -i -e "/patch$LASTPLFILLED -p0/a%patch$PLFILLED -p0" $SPEC cp -f vim-upstream/dist/README.patches README.patches
fi cp -f vim-upstream/dist/vim-${UPSTREAMMAJOR}-${LASTPLFILLED}.tar.bz2 .
done if [ $CHANGES ]; then
sed -i -e "/Release: /cRelease: 1%{?dist}" $SPEC CHLOG="* $DATE Karsten Hopp <karsten@redhat.com> $UPSTREAMMAJOR"
sed -i -e "s/define patchlevel $ORIGPLFILLED/define patchlevel $PLFILLED/" $SPEC sed -i -e "/Release: /cRelease: 1%{?dist}" $SPEC
sed -i -e "/\%changelog/a$CHLOG.$PLFILLED-1\n- patchlevel $PLFILLED\n" $SPEC sed -i -e "s/define patchlevel $ORIGPLFILLED/define patchlevel $LASTPLFILLED/" $SPEC
wget ftp://ftp.vim.org/pub/vim/patches/$MAJORVERSION/README -O README.patches sed -i -e "/\%changelog/a$CHLOG.$LASTPLFILLED-1\n- patchlevel $LASTPLFILLED\n" $SPEC
$debug git add vim.spec README.patches $debug fedpkg new-sources vim-${UPSTREAMMAJOR}-${LASTPLFILLED}.tar.bz2
$debug git commit -m "- patchlevel $PL" $debug git add vim.spec README.patches
$debug git push $debug git commit -m "- patchlevel $LASTPL"
if [ $? -eq 0 ]; then $debug git push
if [ $? -eq 0 ]; then
$debug rm -f $HOME/.koji/config $debug rm -f $HOME/.koji/config
$debug fedpkg build $debug fedpkg build
$debug ln -sf ppc-config $HOME/.koji/config $debug ln -sf ppc-config $HOME/.koji/config
else else
echo "GIT push failed" echo "GIT push failed"
fi
fi fi