diff options
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 107 | ||||
-rw-r--r-- | archlinux.vim | 25 | ||||
-rw-r--r-- | vimrc | 16 |
5 files changed, 188 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..38fea4c365b0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +pkgbase = vim-x11 + pkgdesc = Vi Improved, a highly configurable, improved version of the vi text editor (X11 support, no GUI) + pkgver = 7.4.712 + pkgrel = 1 + url = http://www.vim.org + arch = i686 + arch = x86_64 + license = custom:vim + makedepends = gpm + makedepends = python2 + makedepends = ruby + makedepends = libxt + makedepends = desktop-file-utils + makedepends = lua + makedepends = mercurial + depends = vim-runtime=7.4.712-1 + depends = gpm + depends = ruby + depends = lua + depends = python2 + depends = acl + provides = vim + conflicts = vim-minimal + conflicts = vim + conflicts = vim-python3 + conflicts = gvim + conflicts = gvim-python3 + source = vim-repo::hg+https://vim.googlecode.com/hg#tag=v7-4-712 + source = vimrc + source = archlinux.vim + sha1sums = SKIP + sha1sums = 15ebf3f48693f1f219fe2d8edb7643683139eb6b + sha1sums = 94f7bb87b5d06bace86bc4b3ef1372813b4eedf2 + +pkgname = vim-x11 + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..4ad52422dd6e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/pkg +/src +*.tar.xz +*.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5e757fa16b27 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,107 @@ +# Maintainer: Allen Li <darkfeline@felesatra.moe> +# Contributor: Thomas Dziedzic <gostrc@gmail.com> +# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> +# Contributor: tobias [ tobias at archlinux org ] +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> + +_pkgbase=vim +pkgname=vim-x11 +# list of tags can be found at https://code.google.com/p/vim/source/list +_topver=7.4 +_patchlevel=712 +_tag=v${_topver/./-}-${_patchlevel} +_versiondir="vim${_topver//./}" +pkgver=${_topver}.${_patchlevel} +pkgrel=1 +_upstream_pkgrel=1 +arch=('i686' 'x86_64') +license=('custom:vim') +url="http://www.vim.org" +makedepends=('gpm' 'python2' 'ruby' 'libxt' 'desktop-file-utils' 'lua' 'mercurial') +# It would be great to use downloadable archives https://vim.googlecode.com/archive/$tag.tar.gz +# unfortunately its content changes each time you download one (files modification date is different) +source=("${_pkgbase}-repo::hg+https://vim.googlecode.com/hg#tag=${_tag}" + 'vimrc' + 'archlinux.vim') +sha1sums=('SKIP' + '15ebf3f48693f1f219fe2d8edb7643683139eb6b' + '94f7bb87b5d06bace86bc4b3ef1372813b4eedf2') + +pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (X11 support, no GUI)' +depends=("vim-runtime=${pkgver}-${_upstream_pkgrel}" 'gpm' 'ruby' 'lua' 'python2' 'acl') +conflicts=('vim-minimal' 'vim' 'vim-python3' 'gvim' 'gvim-python3') +provides=('vim') + +prepare() { + cd ${_pkgbase}-repo + + _latesttag=$(hg parents --template '{latesttag}' -r default) + if (( $_tag != $_latesttag )); then + printf 'You are not building the latest revision!\n' + printf "Consider updating to tag $_latesttag.\n" + fi + + # define the place for the global (g)vimrc file (set to /etc/vimrc) + sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \ + src/feature.h + sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \ + src/feature.h + + (cd src && autoconf) + + cd .. + for pkg in ${pkgname[@]} + do + cp -a ${_pkgbase}-repo ${pkg}-build + done +} + +build() { + + cd "${srcdir}"/vim-x11-build + + ./configure \ + --prefix=/usr \ + --localstatedir=/var/lib/vim \ + --with-features=huge \ + --with-compiledby='Arch Linux' \ + --enable-gpm \ + --enable-acl \ + --with-x=yes \ + --disable-gui \ + --enable-multibyte \ + --enable-cscope \ + --enable-netbeans \ + --enable-perlinterp \ + --enable-pythoninterp \ + --disable-python3interp \ + --enable-rubyinterp \ + --enable-luainterp + + make +} + +package() { + cd "${srcdir}"/vim-x11-build + make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install + + # provided by (n)vi in core + rm "${pkgdir}"/usr/bin/{ex,view} + + # delete some manpages + find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \ + while read _mandir; do + cd ${_mandir} + rm -f ex.1 view.1 # provided by (n)vi + rm -f evim.1 # this does not make sense if we have no GUI + done + + # Runtime provided by runtime package + rm -r "${pkgdir}"/usr/share/vim + + # license + install -Dm644 runtime/doc/uganda.txt \ + "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt +} + +# vim:set sw=2 sts=2 et: diff --git a/archlinux.vim b/archlinux.vim new file mode 100644 index 000000000000..80890685196b --- /dev/null +++ b/archlinux.vim @@ -0,0 +1,25 @@ +" The ArchLinux global vimrc - setting only a few sane defaults +" +" Maintainer: Thomas Dziedzic [gostrc@gmail.com] +" +" NEVER EDIT THIS FILE, IT'S OVERWRITTEN UPON UPGRADES, GLOBAL CONFIGURATION +" SHALL BE DONE IN /etc/vimrc, USER SPECIFIC CONFIGURATION IN ~/.vimrc + +" Normally we use vim-extensions. If you want true vi-compatibility +" remove change the following statements +set nocompatible " Use Vim defaults instead of 100% vi compatibility +set backspace=indent,eol,start " more powerful backspacing + +" Now we set some defaults for the editor +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time + +" Suffixes that get lower priority when doing tab completion for filenames. +" These are files we are not likely to want to edit or read. +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg + +if has('gui_running') + " Make shift-insert work like in Xterm + map <S-Insert> <MiddleMouse> + map! <S-Insert> <MiddleMouse> +endif diff --git a/vimrc b/vimrc new file mode 100644 index 000000000000..3642e25c9d1e --- /dev/null +++ b/vimrc @@ -0,0 +1,16 @@ +" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just +" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime +" you can find below. If you wish to change any of those settings, you should +" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten +" everytime an upgrade of the vim packages is performed. It is recommended to +" make changes after sourcing archlinux.vim since it alters the value of the +" 'compatible' option. + +" This line should not be removed as it ensures that various options are +" properly set to work with the Vim-related packages. +runtime! archlinux.vim + +" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim' +" Or better yet, read /usr/share/vim/vim74/vimrc_example.vim or the vim manual +" and configure vim to your own liking! + |