diff options
author | Tommy Jerry Mairo | 2016-04-21 23:38:01 +0800 |
---|---|---|
committer | Tommy Jerry Mairo | 2016-04-21 23:38:01 +0800 |
commit | a6d5ec22fb1f7dfe5b6d6e2f3dc5ad0811e5fb1e (patch) | |
tree | 07e1aaaf12482479152b3666be627153ae62ab03 | |
download | aur-a6d5ec22fb1f7dfe5b6d6e2f3dc5ad0811e5fb1e.tar.gz |
Vim with clipboard enabled.
-rw-r--r-- | .SRCINFO | 45 | ||||
-rw-r--r-- | PKGBUILD | 197 | ||||
-rw-r--r-- | archlinux.vim | 25 | ||||
-rw-r--r-- | gvim.install | 15 | ||||
-rw-r--r-- | vimrc | 16 |
5 files changed, 298 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a287e64245b7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,45 @@ +pkgbase = vim + pkgver = 7.4.1689 + pkgrel = 2 + url = http://www.vim.org + arch = i686 + arch = x86_64 + license = custom:vim + makedepends = gpm + makedepends = python2 + makedepends = python + makedepends = ruby + makedepends = libxt + makedepends = desktop-file-utils + makedepends = gtk2 + makedepends = gtk3 + makedepends = lua + makedepends = gawk + makedepends = tcl + source = vim-7.4.1689.tar.gz::http://github.com/vim/vim/archive/v7.4.1689.tar.gz + source = vimrc + source = archlinux.vim + sha1sums = 9fdd5cadca97baabc475b154f249b4b8d03fff07 + sha1sums = 15ebf3f48693f1f219fe2d8edb7643683139eb6b + sha1sums = 94f7bb87b5d06bace86bc4b3ef1372813b4eedf2 + +pkgname = vim-clipboard + pkgdesc = Vi Improved, a highly configurable, improved version of the vi text editor + depends = vim-runtime=7.4.1689-2 + depends = gpm + depends = acl + optdepends = python2: Python 2 language support + optdepends = python: Python 3 language support + optdepends = ruby: Ruby language support + optdepends = lua: Lua language support + optdepends = perl: Perl language support + optdepends = tcl: Tcl language support + provides = xxd + provides = vim-minimal + provides = vim-python3 + conflicts = gvim + conflicts = vim-minimal + conflicts = vim-python3 + replaces = vim-python3 + replaces = vim-minimal + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e681367fb8e6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,197 @@ +# $Id: PKGBUILD 263841 2016-04-03 20:40:11Z anatolik $ +# Maintainer: TJM <tommy.mairo@gmail.com> + +pkgbase=vim +pkgname=(vim-clipboard) +pkgver=7.4.1689 +_versiondir=74 +pkgrel=2 +arch=(i686 x86_64) +license=('custom:vim') +url='http://www.vim.org' +makedepends=(gpm python2 python ruby libxt desktop-file-utils gtk2 gtk3 lua gawk tcl) +source=(vim-$pkgver.tar.gz::http://github.com/vim/vim/archive/v$pkgver.tar.gz + vimrc + archlinux.vim) +sha1sums=('9fdd5cadca97baabc475b154f249b4b8d03fff07' + '15ebf3f48693f1f219fe2d8edb7643683139eb6b' + '94f7bb87b5d06bace86bc4b3ef1372813b4eedf2') + +prepare() { + cd vim-$pkgver/src + + # define the place for the global (g)vimrc file (set to /etc/vimrc) + sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' feature.h + sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' feature.h + + autoconf + + cd "$srcdir" + cp -a vim-$pkgver gvim-$pkgver +} + +build() { + cd "${srcdir}"/vim-$pkgver + ./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=dynamic \ + --enable-pythoninterp=dynamic \ + --enable-python3interp=dynamic \ + --enable-rubyinterp=dynamic \ + --enable-luainterp=dynamic \ + --enable-tclinterp=dynamic + make + + cd "${srcdir}"/gvim-$pkgver + ./configure \ + --prefix=/usr \ + --localstatedir=/var/lib/vim \ + --with-features=huge \ + --with-compiledby='Arch Linux' \ + --enable-gpm \ + --enable-acl \ + --with-x=yes \ + --enable-gui=gtk2 \ + --enable-multibyte \ + --enable-cscope \ + --enable-netbeans \ + --enable-perlinterp=dynamic \ + --enable-pythoninterp=dynamic \ + --enable-python3interp=dynamic \ + --enable-rubyinterp=dynamic \ + --enable-luainterp=dynamic \ + --enable-tclinterp=dynamic + make +} + +check() { + # disable tests because they seem to freeze + cd "${srcdir}"/vim-$pkgver + #make test + + cd "${srcdir}"/gvim-$pkgver + #make test +} + +package_vim-runtime() { + pkgdesc='Runtime for vim and gvim' + backup=('etc/vimrc') + + cd "${srcdir}"/vim-$pkgver + + make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install + # man and bin files belong to 'vim' + rm -r "${pkgdir}"/usr/share/man/ "${pkgdir}"/usr/bin/ + + # Don't forget logtalk.dict + install -Dm644 runtime/ftplugin/logtalk.dict \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/ftplugin/logtalk.dict + + # fix FS#17216 + sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/filetype.vim + + # patch filetype.vim for better handling of pacman related files + sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/filetype.vim + sed -i "/find the end/,+3{s/changelog_date_entry_search/changelog_date_end_entry_search/}" \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/ftplugin/changelog.vim + + # rc files + install -Dm644 "${srcdir}"/vimrc "${pkgdir}"/etc/vimrc + install -Dm644 "${srcdir}"/archlinux.vim \ + "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim + + # rgb.txt file + install -Dm644 runtime/rgb.txt \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/rgb.txt + + # license + install -dm755 "${pkgdir}"/usr/share/licenses/vim-runtime + ln -s /usr/share/vim/vim${_versiondir}/doc/uganda.txt \ + "${pkgdir}"/usr/share/licenses/vim-runtime/license.txt +} + +package_vim-clipboard() { + pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor' + depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'acl') + optdepends=('python2: Python 2 language support' + 'python: Python 3 language support' + 'ruby: Ruby language support' + 'lua: Lua language support' + 'perl: Perl language support' + 'tcl: Tcl language support') + conflicts=('gvim' 'vim-minimal' 'vim-python3') + provides=('xxd' 'vim-minimal' 'vim-python3') + replaces=('vim-python3' 'vim-minimal') + + cd "${srcdir}"/vim-$pkgver + 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 +} + +package_gvim() { + pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with advanced features, such as a GUI)' + depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'libxt' 'desktop-file-utils' 'gtk2') + optdepends=('python2: Python 2 language support' + 'python: Python 3 language support' + 'ruby: Ruby language support' + 'lua: Lua language support' + 'perl: Perl language support' + 'tcl: Tcl language support') + provides=("vim=${pkgver}-${pkgrel}" "xxd") + conflicts=('vim-minimal' 'vim') + replaces=('gvim-python3') + install=gvim.install + + cd "${srcdir}"/gvim-$pkgver + 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 + done + + # need to remove since this is provided by vim-runtime + rm -r "${pkgdir}"/usr/share/vim + + # freedesktop links + install -Dm644 runtime/gvim.desktop "${pkgdir}"/usr/share/applications/gvim.desktop + install -Dm644 runtime/vim48x48.png "${pkgdir}"/usr/share/pixmaps/gvim.png + + # license + install -Dm644 runtime/doc/uganda.txt \ + "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt +} 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/gvim.install b/gvim.install new file mode 100644 index 000000000000..0f4221a778d0 --- /dev/null +++ b/gvim.install @@ -0,0 +1,15 @@ +update_desktop_database() { + update-desktop-database --quiet +} + +post_install() { + update_desktop_database +} + +post_upgrade() { + update_desktop_database +} + +post_remove() { + update_desktop_database +} 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! + |