diff --git a/vim-update.sh b/vim-update.sh index e9b6f1f..142446c 100755 --- a/vim-update.sh +++ b/vim-update.sh @@ -36,6 +36,7 @@ if [ $? -ne 0 ]; then fi MAJORVERSION=`grep "define baseversion" vim.spec | cut -d ' ' -f 3` +MAJORVERDIR=$(echo $MAJORVERSION | sed -e 's/\.//') ORIGPL=`grep "define patchlevel" vim.spec | cut -d ' ' -f 3 | sed -e "s/^0*//g"` ORIGPLFILLED=`printf "%03d" $ORIGPL` @@ -54,6 +55,7 @@ LASTTAG=$(git describe --tags $(git rev-list --tags --max-count=1)) # vim upstream tags have the form v7.4.123. Remove the 'v' and get major release and patchlevel: UPSTREAMMAJOR=$(echo $LASTTAG | sed -e 's/v\([0-9]*\.[0-9]*\).*/\1/') +UPSTREAMMAJORDIR=$(echo $UPSTREAMMAJOR | sed -e 's/\.//') LASTPL=`echo $LASTTAG| sed -e 's/.*\.//;s/^0*//'` LASTPLFILLED=`printf "%03d" $LASTPL` if [ $force -ne 1 -a "$ORIGPLFILLED" == "$LASTPLFILLED" ]; then @@ -77,7 +79,8 @@ if [ $CHANGES -ne 0 ]; then CHLOG="* $DATE Karsten Hopp $UPSTREAMMAJOR" $debug sed -i -e "/Release: /cRelease: 1%{?dist}" $SPEC if [ "x$MAJORVERSION" != "x$UPSTREAMMAJOR" ]; then - $debug sed -i -s "s/define baseversion: $MAJORVERSION/define baseversion: $UPSTREAMMAJOR=/" $SPEC + $debug sed -i -s "s/define baseversion $MAJORVERSION/define baseversion $UPSTREAMMAJOR/" $SPEC + $debug sed -i -s "s/define vimdir vim$MAJORVERDIR/define vimdir vim$UPSTREAMMAJORDIR/" $SPEC fi $debug sed -i -e "s/define patchlevel $ORIGPLFILLED/define patchlevel $LASTPLFILLED/" $SPEC $debug sed -i -e "/\%changelog/a$CHLOG.$LASTPLFILLED-1\n- patchlevel $LASTPLFILLED\n" $SPEC diff --git a/vim.spec b/vim.spec index 8266887..5abf509 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Vim Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 Source1: vim.sh @@ -759,6 +759,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %{_datadir}/icons/locolor/*/apps/* %changelog +* Fri May 18 2018 Zdenek Dohnal - 2:8.0.1848-2 +- vim-update.sh - update vimdir and baseversion + * Thu May 17 2018 Karsten Hopp 8.0.1848-1 - patchlevel 1848