[arch-commits] CVS update of arch/build/base/vim (5 files)
Tobias Kieslich
tobias at archlinux.org
Sun Aug 12 04:53:36 UTC 2007
Date: Sunday, August 12, 2007 @ 00:53:36
Author: tobias
Path: /home/cvs-arch/arch/build/base/vim
Removed: PKGBUILD (1.44) fetch_patches.sh (1.1) fetch_runtime.sh (1.1)
filetype.patch (1.6) vim.install (1.2)
remove vim from base
------------------+
PKGBUILD | 63 --------------------
fetch_patches.sh | 161 -----------------------------------------------------
fetch_runtime.sh | 161 -----------------------------------------------------
filetype.patch | 22 -------
vim.install | 42 -------------
5 files changed, 449 deletions(-)
Index: arch/build/base/vim/PKGBUILD
diff -u arch/build/base/vim/PKGBUILD:1.44 arch/build/base/vim/PKGBUILD:removed
--- arch/build/base/vim/PKGBUILD:1.44 Tue Jun 26 16:56:42 2007
+++ arch/build/base/vim/PKGBUILD Sun Aug 12 00:53:36 2007
@@ -1,63 +0,0 @@
-# $Id: PKGBUILD,v 1.44 2007/06/26 20:56:42 dale Exp $
-# Maintainer: judd <jvinet at zeroflux.org>
-
-pkgname=vim
-_srcver=7.1
-_patchlevel=12
-pkgver=${_srcver}.${_patchlevel}
-pkgrel=1
-pkgdesc="a highly configurable, improved version of the vi text editor"
-arch=(i686 x86_64)
-license=(CUSTOM)
-url="http://www.vim.org"
-depends=('glibc' 'ncurses' 'perl')
-makedepends=('wget' 'sed' 'grep')
-backup=(etc/vimrc)
-conflicts=('vim-devel')
-provides=('vim-devel')
-install=${pkgname}.install
-# we need the extra-stuff to get all patches applied smoothly
-source=(ftp://ftp.vim.org/pub/vim/unix/vim-${_srcver}.tar.bz2 \
- ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-extra.tar.gz \
- ftp://ftp.vim.org/pub/vim/extra/vim-${_srcver}-lang.tar.gz \
- fetch_patches.sh fetch_runtime.sh)
-md5sums=('44c6b4914f38d6f9aa959640b89da329'
- '605cc7ae31bcc9d7864bb0bb6025f55d'
- '144aa049ba70621acf4247f0459f3ee7'
- '9a97e733d8972c0315e23d92000bcb43'
- '9a97e733d8972c0315e23d92000bcb43')
-
-build()
-{
- #cd ${startdir}/src/new-runtime
- # pull in patches from vim.org (or the src cache alternatively)
- . ${startdir}/fetch_patches.sh
- . ${startdir}/fetch_runtime.sh
- _patchdir=${startdir}/src/patches
- get_patches
- cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")
- for _patch in $(/bin/ls ${_patchdir}); do
- patch -Np0 -i ${_patchdir}/${_patch} || return 1
- done
- rm -rf ${_patchdir}
- sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' src/feature.h
- # build party
- ./configure --prefix=/usr --localstatedir=/var/lib/${pkgname} \
- --disable-gpm --disable-acl --with-x=no --disable-gui --enable-multibyte \
- --enable-cscope --with-features=big --enable-perlinterp
- make || return 1
- make VIMRCLOC=/etc DESTDIR=${startdir}/pkg VIMRTDIR= install
- cd ${startdir}/pkg/usr/bin
- ln -sf vim vi
-
- _runtimedir="${startdir}/pkg/usr/share/vim/"
- update_runtime
- # kill the nobackup parts
- sed -i '/vms/,+4 d' ${startdir}/pkg/usr/share/vim/vimrc_example.vim
- install -Dm644 ${startdir}/pkg/usr/share/vim/vimrc_example.vim \
- ${startdir}/pkg/etc/vimrc
- rm -f ${startdir}/pkg/usr/share/vim/gvimrc_example.vim
- install -dm755 ${startdir}/pkg/usr/share/licenses/vim
- cd ${startdir}/pkg/usr/share/licenses/vim
- ln -s ../../vim/doc/uganda.txt LICENSE
-}
Index: arch/build/base/vim/fetch_patches.sh
diff -u arch/build/base/vim/fetch_patches.sh:1.1 arch/build/base/vim/fetch_patches.sh:removed
--- arch/build/base/vim/fetch_patches.sh:1.1 Mon Jun 25 01:57:16 2007
+++ arch/build/base/vim/fetch_patches.sh Sun Aug 12 00:53:36 2007
@@ -1,161 +0,0 @@
-# the external logic for pulling in patches
-
-get_patches() {
- if [ -d ${_patchdir} ]; then
- rm -rf ${_patchdir}
- echo -e "\tremove patches from old build"
- fi
- mkdir ${_patchdir} && cd ${_patchdir}
- _rpath=ftp://ftp.vim.org/pub/vim/patches/${_srcver}
-
- # change IFS to loop line-by-line
- _OLDIFS=$IFS
- IFS="
-"
- echo -e "\tfetching checksumfile for patches"
- wget ${_rpath}/MD5SUMS >/dev/null 2>&1
-
- for _line in $(/bin/cat MD5SUMS); do
- _md5=$(echo $_line | cut -d ' ' -f1)
- _file=$(echo $_line | cut -d ' ' -f3)
- if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then
- cp ${SRCDEST}/vim-${_srcver}/${_file} ./
- else
- echo -e "\tfetching patch file: ${_file}"
- wget ${_rpath}/${_file} >/dev/null 2>&1
- if [ -w ${SRCDEST} ]; then
- if [ ! -d ${SRCDEST}/vim-${_srcver} ]; then
- mkdir -p ${SRCDEST}/vim-${_srcver}
- fi
- echo -e "\tcopy ${_file} to ${SRCDEST}/vim-${_srcver}"
- cp ${_file} ${SRCDEST}/vim-${_srcver}/
- fi
- fi
-
- echo "${_md5} ${_file}" | md5sum -c - >/dev/null 2>&1
- if [ ${?} -ne 0 ]; then
- echo ${_file} md5sums do not match
- return 1
- fi
- done
- IFS=$_OLDIFS
- rm MD5SUMS
-}
-
-# the purpose of this magic is to pull in the latest runtime files for vim
-# we start withe theruntime provoded by the tarballs and compare MD5s against
-# the latest runtime
-# if this fails we look in the local source cache if they have been fetched
-# for an earlier build and compare those MD5 files
-# if this fails, we fetch the stuff from online and store it in the local src
-# cache.
-# The local cache has to be set (makepkg.conf) AND it has to be writable
-
-update_runtime() {
- _OLDDIR=$(pwd) #get absolute path
- _errors=0
- _ftp="ftp://ftp.vim.org/pub/vim/runtime"
-
- # we're gonna be sneaky and grok the A-A-P recipe for the files we need
- _recipe="getunix.aap"
- _srccache="${SRCDEST}/vim-${_srcver}/"
-
- echo "getting runtime recipe"
- cd ${startdir}/src
- [ -f "${_recipe}" ] && rm "${_recipe}"
- wget "${_ftp}/${_recipe}" >/dev/null 2>&1
-
- cd "${_runtimedir}"
- _runtimedir=$(pwd) #get absolute path
-
- # change IFS to loop line-by-line
- _OLDIFS=$IFS
- IFS="
-"
- echo "begin fetching updated runtime files..."
- for _file in $(grep "file = " "${startdir}/src/${_recipe}"); do
- _file=$(echo ${_file} | sed "s|.*file = \(.*\)|\1|")
- _md5=$(grep -A2 "file = ${_file} *$" "${startdir}/src/${_recipe}" | \
- grep "get_md5" | \
- sed 's|@if get_md5(file) != "\(.*\)":|\1|g')
- _dir=$(dirname "${_file}")
-
- mkdir -p "${_dir}"
-
- echo -e "\t${_file}"
- _havefile=0
- # if we have the file and the MD5sum fails, we technically don't have the file
- if [ -f ${_file} ]; then
- echo "${_md5} ${_file}" | md5sum -c - >/dev/null 2>&1
- # MD5 fails ? ... we don't have the file
- if [ ${?} -ne 0 ]; then
- rm ${_file}
- else
- _havefile=1
- fi
- fi
- # look files that were not copied from the unzipped sources
- _cachefile=${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")/runtime/${_file}
- if [ ${_havefile} -ne 1 -a -f ${_cachefile} ]; then
- echo "${_md5} ${_cachefile}" | md5sum -c - >/dev/null 2>&1
- # MD5 fails ? ... we lookup if we downloaded another version earlier
- if [ ${?} -ne 0 ]; then
- _cachefile=${_srccache}/${_file}
- if [ -f ${_cachefile} ]; then
- echo "${_md5} ${_cachefile}" | md5sum -c - >/dev/null 2>&1
- if [ ${?} -ne 0 ]; then
- rm ${_cachefile}
- else
- cp ${_cachefile} ${_dir}
- _havefile=1
- fi
- fi
- else
- cp ${_cachefile} ${_dir}
- _havefile=1
- fi
- fi
- # look up the local $SRCDEST
- _cachefile=${_srccache}/${_file}
- if [ ${_havefile} -ne 1 -a -f ${_cachefile} ]; then
- echo "${_md5} ${_cachefile}" | md5sum -c - >/dev/null 2>&1
- # MD5 fails ? ... we don't have the file
- if [ ${?} -ne 0 ]; then
- rm ${_cachefile}
- else
- cp ${_cachefile} ${_dir}
- _havefile=1
- fi
- fi
- # so we finally have to fetch it and store it to $SRCDEST (cache)
- if [ ${_havefile} -ne 1 ]; then
- echo -e "\tdownloading ${_file} ..."
- cd "${_dir}"
- wget "${_ftp}/${_file}" >/dev/null 2>&1
- cd "${_runtimedir}"
- # store freshly downloaded file in SRCDEST
- mkdir -p ${_srccache}/${_dir}
- cp ${_file} ${_srccache}/${_dir}
- fi
-
- # check the MD5 sum finally
- echo "${_md5} ${_file}" | md5sum -c - >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo "!!!! md5sum check for ${_file} failed !!!!"
- errors=$((${_errors} + 1))
- fi
- done
- IFS=${_OLDIFS}
-
- echo "vim runtime got updated"
-
- if [ ${_errors} -gt 0 ]; then
- echo "${_errors} failed MD5 checks while updating runtime files -> build can't be completed"
- return 1
- else
- echo -e "\tpacthing filetype.vim for better handling of pacman related files ..."
- #sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/ebuild /ebuild,PKGBUILD* /" filetype.vim
- sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*/" filetype.vim
- fi
- cd "${_OLDDIR}"
-}
Index: arch/build/base/vim/fetch_runtime.sh
diff -u arch/build/base/vim/fetch_runtime.sh:1.1 arch/build/base/vim/fetch_runtime.sh:removed
--- arch/build/base/vim/fetch_runtime.sh:1.1 Mon Jun 25 01:57:16 2007
+++ arch/build/base/vim/fetch_runtime.sh Sun Aug 12 00:53:36 2007
@@ -1,161 +0,0 @@
-# the external logic for pulling in patches
-
-get_patches() {
- if [ -d ${_patchdir} ]; then
- rm -rf ${_patchdir}
- echo -e "\tremove patches from old build"
- fi
- mkdir ${_patchdir} && cd ${_patchdir}
- _rpath=ftp://ftp.vim.org/pub/vim/patches/${_srcver}
-
- # change IFS to loop line-by-line
- _OLDIFS=$IFS
- IFS="
-"
- echo -e "\tfetching checksumfile for patches"
- wget ${_rpath}/MD5SUMS >/dev/null 2>&1
-
- for _line in $(/bin/cat MD5SUMS); do
- _md5=$(echo $_line | cut -d ' ' -f1)
- _file=$(echo $_line | cut -d ' ' -f3)
- if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then
- cp ${SRCDEST}/vim-${_srcver}/${_file} ./
- else
- echo -e "\tfetching patch file: ${_file}"
- wget ${_rpath}/${_file} >/dev/null 2>&1
- if [ -w ${SRCDEST} ]; then
- if [ ! -d ${SRCDEST}/vim-${_srcver} ]; then
- mkdir -p ${SRCDEST}/vim-${_srcver}
- fi
- echo -e "\tcopy ${_file} to ${SRCDEST}/vim-${_srcver}"
- cp ${_file} ${SRCDEST}/vim-${_srcver}/
- fi
- fi
-
- echo "${_md5} ${_file}" | md5sum -c - >/dev/null 2>&1
- if [ ${?} -ne 0 ]; then
- echo ${_file} md5sums do not match
- return 1
- fi
- done
- IFS=$_OLDIFS
- rm MD5SUMS
-}
-
-# the purpose of this magic is to pull in the latest runtime files for vim
-# we start withe theruntime provoded by the tarballs and compare MD5s against
-# the latest runtime
-# if this fails we look in the local source cache if they have been fetched
-# for an earlier build and compare those MD5 files
-# if this fails, we fetch the stuff from online and store it in the local src
-# cache.
-# The local cache has to be set (makepkg.conf) AND it has to be writable
-
-update_runtime() {
- _OLDDIR=$(pwd) #get absolute path
- _errors=0
- _ftp="ftp://ftp.vim.org/pub/vim/runtime"
-
- # we're gonna be sneaky and grok the A-A-P recipe for the files we need
- _recipe="getunix.aap"
- _srccache="${SRCDEST}/vim-${_srcver}/"
-
- echo "getting runtime recipe"
- cd ${startdir}/src
- [ -f "${_recipe}" ] && rm "${_recipe}"
- wget "${_ftp}/${_recipe}" >/dev/null 2>&1
-
- cd "${_runtimedir}"
- _runtimedir=$(pwd) #get absolute path
-
- # change IFS to loop line-by-line
- _OLDIFS=$IFS
- IFS="
-"
- echo "begin fetching updated runtime files..."
- for _file in $(grep "file = " "${startdir}/src/${_recipe}"); do
- _file=$(echo ${_file} | sed "s|.*file = \(.*\)|\1|")
- _md5=$(grep -A2 "file = ${_file} *$" "${startdir}/src/${_recipe}" | \
- grep "get_md5" | \
- sed 's|@if get_md5(file) != "\(.*\)":|\1|g')
- _dir=$(dirname "${_file}")
-
- mkdir -p "${_dir}"
-
- echo -e "\t${_file}"
- _havefile=0
- # if we have the file and the MD5sum fails, we technically don't have the file
- if [ -f ${_file} ]; then
- echo "${_md5} ${_file}" | md5sum -c - >/dev/null 2>&1
- # MD5 fails ? ... we don't have the file
- if [ ${?} -ne 0 ]; then
- rm ${_file}
- else
- _havefile=1
- fi
- fi
- # look files that were not copied from the unzipped sources
- _cachefile=${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//")/runtime/${_file}
- if [ ${_havefile} -ne 1 -a -f ${_cachefile} ]; then
- echo "${_md5} ${_cachefile}" | md5sum -c - >/dev/null 2>&1
- # MD5 fails ? ... we lookup if we downloaded another version earlier
- if [ ${?} -ne 0 ]; then
- _cachefile=${_srccache}/${_file}
- if [ -f ${_cachefile} ]; then
- echo "${_md5} ${_cachefile}" | md5sum -c - >/dev/null 2>&1
- if [ ${?} -ne 0 ]; then
- rm ${_cachefile}
- else
- cp ${_cachefile} ${_dir}
- _havefile=1
- fi
- fi
- else
- cp ${_cachefile} ${_dir}
- _havefile=1
- fi
- fi
- # look up the local $SRCDEST
- _cachefile=${_srccache}/${_file}
- if [ ${_havefile} -ne 1 -a -f ${_cachefile} ]; then
- echo "${_md5} ${_cachefile}" | md5sum -c - >/dev/null 2>&1
- # MD5 fails ? ... we don't have the file
- if [ ${?} -ne 0 ]; then
- rm ${_cachefile}
- else
- cp ${_cachefile} ${_dir}
- _havefile=1
- fi
- fi
- # so we finally have to fetch it and store it to $SRCDEST (cache)
- if [ ${_havefile} -ne 1 ]; then
- echo -e "\tdownloading ${_file} ..."
- cd "${_dir}"
- wget "${_ftp}/${_file}" >/dev/null 2>&1
- cd "${_runtimedir}"
- # store freshly downloaded file in SRCDEST
- mkdir -p ${_srccache}/${_dir}
- cp ${_file} ${_srccache}/${_dir}
- fi
-
- # check the MD5 sum finally
- echo "${_md5} ${_file}" | md5sum -c - >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo "!!!! md5sum check for ${_file} failed !!!!"
- errors=$((${_errors} + 1))
- fi
- done
- IFS=${_OLDIFS}
-
- echo "vim runtime got updated"
-
- if [ ${_errors} -gt 0 ]; then
- echo "${_errors} failed MD5 checks while updating runtime files -> build can't be completed"
- return 1
- else
- echo -e "\tpacthing filetype.vim for better handling of pacman related files ..."
- #sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/ebuild /ebuild,PKGBUILD* /" filetype.vim
- sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*/" filetype.vim
- fi
- cd "${_OLDDIR}"
-}
Index: arch/build/base/vim/filetype.patch
diff -u arch/build/base/vim/filetype.patch:1.6 arch/build/base/vim/filetype.patch:removed
--- arch/build/base/vim/filetype.patch:1.6 Wed Mar 21 15:18:42 2007
+++ arch/build/base/vim/filetype.patch Sun Aug 12 00:53:36 2007
@@ -1,22 +0,0 @@
-diff -ur filetype.vim new-runtime/filetype.vim
---- filetype.vim 2007-03-15 08:12:29.000000000 -0700
-+++ filetype.vim 2007-03-21 11:51:54.000000000 -0700
-@@ -16,7 +16,7 @@
- augroup filetypedetect
-
- " Ignored extensions
--au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.rpmsave,?\+.rpmnew
-+au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.pacsave,?\+.pacnew
- \ exe "doau filetypedetect BufRead " . expand("<afile>:r")
- au BufNewFile,BufRead *~
- \ let s:name = expand("<afile>") |
-@@ -1528,8 +1528,8 @@
- au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
-
- " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
--" Gentoo ebuilds are actually bash scripts
--au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild call SetFileTypeSH("bash")
-+" Arch PKGBUILD files are bash scripts
-+au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild,PKGBUILD* call SetFileTypeSH("bash")
- au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
- au BufNewFile,BufRead /etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
Index: arch/build/base/vim/vim.install
diff -u arch/build/base/vim/vim.install:1.2 arch/build/base/vim/vim.install:removed
--- arch/build/base/vim/vim.install:1.2 Thu Jun 1 22:00:09 2006
+++ arch/build/base/vim/vim.install Sun Aug 12 00:53:36 2007
@@ -1,42 +0,0 @@
-pre_remove() {
- # if vi is a binary instead of a symlink we have an intact gvim installation
- # with a different binary/symlink structure
- # we recover what pacmans database know about Vim
- if [ -f /usr/bin/vi ] && [ ! -L /usr/bin/vi ] && [ -L /usr/bin/gvim ]; then
- rm -f /usr/bin/gvim
- mv -f /usr/bin/vim /usr/bin/gvim
- mv -f /usr/bin/vi /usr/bin/vim
- ln -sf /usr/bin/vim /usr/bin/vi
- echo "restore original vim/gvim binaries layout ..."
- fi
-}
-
-post_install() {
- # if we have an existing gvim installation - relocate binaries and symlinks
- if [ ! -L /usr/bin/gvim ] && [ -e /usr/bin/gvim ]; then
- rm -f /usr/bin/vi
- mv -f /usr/bin/vim /usr/bin/vi
- mv -f /usr/bin/gvim /usr/bin/vim
- ln -sf /usr/bin/vim /usr/bin/gvim
- echo "move vim/gvim binaries and symlinks..."
- fi
- echo -n "Updating vim help tags..."
- /usr/bin/vim --noplugins -u NONE -U NONE \
- --cmd ":helptags /usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
- echo "done."
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_upgrade() {
- pre_remove $1
-}
-
-
-op=$1
-shift
-
-$op $*
-# vim: ft=sh
More information about the arch-commits
mailing list