summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/Makefile70
-rwxr-xr-xvim/vim-common.p5m.gen25
-rwxr-xr-xvim/vim-nox.p5m17
-rwxr-xr-xvim/vim-runtime.p5m.gen25
-rw-r--r--vim/vim.license200
-rwxr-xr-xvim/vim.p5m17
-rw-r--r--vim/vimrc55
7 files changed, 401 insertions, 8 deletions
diff --git a/vim/Makefile b/vim/Makefile
index 1d0193a..836d038 100644
--- a/vim/Makefile
+++ b/vim/Makefile
@@ -3,11 +3,11 @@ include /usr/share/cibs/rules/$(package).mk
include /usr/share/cibs/rules/hg.mk
bits = 64
-summary := the Editor
-license :=
-license-file := symlinks.license
+license := ViM
+license-file := vim.license
hg-url := https://vim.googlecode.com/hg/
+download := $(hg-url)
home := http://www.vim.org
name := vim
version := 7.3.905
@@ -16,7 +16,9 @@ hg-update := v$(subst .,-,$(version))
build-depends += \
developer/build/autoconf \
- developer/python
+ developer/python \
+ library/tinfo
+
pre-configure-stamp: autoconf-stamp
autoconf-stamp: patch-stamp
@@ -25,9 +27,13 @@ autoconf-stamp: patch-stamp
$(MAKE) -C $(sourcedir) distclean
touch $@
+$(eval $(call add-variant,basic))
$(eval $(call add-variant,nox))
$(eval $(call add-variant,tiny))
-$(eval $(call add-variant,basic))
+
+# Clean protodir, because they do not exist, e do not use them,
+# and pkg requires them to exist
+pkg-protos := -d .
configure-options := \
--prefix=/usr \
@@ -58,18 +64,66 @@ configure-options.basic := $(configure-options.nox) \
--disable-rubyinterp \
--disable-tclinterp \
+d_tmp := work/proto/tmp
+d_common := work/proto/vim-common
+d_runtime := work/proto/vim-runtime
+movefiles := /usr/share/cibs/scripts/movefiles
# We are building in source dir, but within subdirs:
+configure-%-stamp: SHADOWDIR=vim-$*
configure-%-stamp:
- $(MAKE) -C $(sourcedir)/src shadow SHADOWDIR=$(*)
+ $(MAKE) -C $(sourcedir)/src shadow SHADOWDIR=$(SHADOWDIR)
cd $(sourcedir) && if test -f src/auto/config.cache; then make distclean; fi
- cd $(sourcedir)/src/$(*) && \
+ cd $(sourcedir)/src/$(SHADOWDIR) && \
LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CC="$(CC)"\
./configure $(configure-options.$*)
touch $@
+build-%-stamp: SHADOWDIR=vim-$*
build-%-stamp:
- $(MAKE) -C $(sourcedir)/src/$(*)
+ $(MAKE) -C $(sourcedir)/src/$(SHADOWDIR)
+ touch $@
+
+install-basic-stamp:
+ $(MAKE) -C $(sourcedir)/src/vim-basic DESTDIR=$(topdir)/$(d_tmp) \
+ installvimbin \
+ installtutorbin \
+ installgtutorbin \
+ installruntime \
+ installtools \
+ install-icons \
+ install-languages
+ rm -f $(protodir)/usr/bin/vim
+ touch $@
+
+install-nox-stamp install-tiny-stamp:
+ touch $@
+
+post-install-stamp: vim-common-stamp vim-runtime-stamp
+vim-common-stamp: install-stamp
+ mkdir -p $(d_common)
+ $(movefiles) -s $(d_tmp) -d $(d_common) \
+ usr/bin/xxd \
+ usr/share/man/man1/xxd.1 \
+ usr/share/man/man1/vimdiff.1 \
+ usr/share/man/man1/vim.1
+ mkdir -p $(d_common)/etc/vim
+ mkdir -p $(d_common)/usr/share/vim
+ mkdir -p $(d_common)/var/lib/vim/addons
+ cp vimrc $(d_common)/etc/vim/vimrc
+ ln -sf ../../../etc/vim $(d_common)/usr/share/vim/vimfiles
+ ln -sf ../../../etc/vim/vimrc $(d_common)/usr/share/vim/vimrc
+ ln -sf vim73 $(d_common)/usr/share/vim/vimcurrent
+ ln -sf vim.1 $(d_common)/usr/share/man/man1/rvim.1
+ ln -sf vim.1 $(d_common)/usr/share/man/man1/rview.1
+ touch $@
+
+vim-runtime-stamp: install-stamp
+ mkdir -p $(d_runtime)
+ $(movefiles) -s $(d_tmp) -d $(d_runtime) \
+ usr/bin/vimtutor \
+ usr/share/man/man1/vimtutor.1 \
+ usr/share/vim
touch $@
diff --git a/vim/vim-common.p5m.gen b/vim/vim-common.p5m.gen
new file mode 100755
index 0000000..8fa78f3
--- /dev/null
+++ b/vim/vim-common.p5m.gen
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+set -u
+
+pkg=vim-common
+
+tmp=/tmp/cibs-$pkg.$$
+
+proto=${proto:-work/proto/$pkg}
+
+cat <<'META' > $tmp
+set name=pkg.fmri value=pkg:/editor/vim-common@$(ips-version)
+set name=pkg.summary value="Vi IMproved - Common files"
+set name=info.upstream-url value="$(home)"
+set name=info.source-url value="$(download)"
+
+license $(license-file) license="$(license)"
+
+META
+
+/usr/share/cibs/scripts/make-payload $proto >> $tmp
+cat $tmp
+rm $tmp
+
diff --git a/vim/vim-nox.p5m b/vim/vim-nox.p5m
new file mode 100755
index 0000000..dec8dcb
--- /dev/null
+++ b/vim/vim-nox.p5m
@@ -0,0 +1,17 @@
+set name=pkg.fmri value=pkg:/editor/vim-nox@$(ips-version)
+set name=pkg.summary value="Vi IMproved - enhanced vi editor - with scripting languages support"
+set name=info.upstream-url value="$(home)"
+set name=info.source-url value="$(download)"
+
+license $(license-file) license="$(license)"
+
+depend fmri=editor/vim-runtime@$(ips-version) type=require
+depend fmri=editor/vim-runtime@$(ips-version) type=incorporate
+
+depend fmri=editor/vim-common@$(ips-version) type=require
+depend fmri=editor/vim-common@$(ips-version) type=incorporate
+
+file work/source/src/vim-nox/vim path=usr/bin/vim.nox
+
+link path=usr/bin/vim target=vim.nox \
+ mediator=vim mediator-implementation=vim-nox
diff --git a/vim/vim-runtime.p5m.gen b/vim/vim-runtime.p5m.gen
new file mode 100755
index 0000000..7d51066
--- /dev/null
+++ b/vim/vim-runtime.p5m.gen
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+set -u
+
+pkg=vim-runtime
+
+tmp=/tmp/cibs-$pkg.$$
+
+proto=${proto:-work/proto/$pkg}
+
+cat <<'META' > $tmp
+set name=pkg.fmri value=pkg:/editor/vim-runtime@$(ips-version)
+set name=pkg.summary value="Vi IMproved - Runtime files"
+set name=info.upstream-url value="$(home)"
+set name=info.source-url value="$(download)"
+
+license $(license-file) license="$(license)"
+
+META
+
+/usr/share/cibs/scripts/make-payload $proto >> $tmp
+cat $tmp
+rm $tmp
+
diff --git a/vim/vim.license b/vim/vim.license
new file mode 100644
index 0000000..9c4d006
--- /dev/null
+++ b/vim/vim.license
@@ -0,0 +1,200 @@
+I) There are no restrictions on distributing unmodified copies of Vim except
+ that they must include this license text. You can also distribute
+ unmodified parts of Vim, likewise unrestricted except that they must
+ include this license text. You are also allowed to include executables
+ that you made from the unmodified Vim sources, plus your own usage
+ examples and Vim scripts.
+
+II) It is allowed to distribute a modified (or extended) version of Vim,
+ including executables and/or source code, when the following four
+ conditions are met:
+ 1) This license text must be included unmodified.
+ 2) The modified Vim must be distributed in one of the following five ways:
+ a) If you make changes to Vim yourself, you must clearly describe in
+ the distribution how to contact you. When the maintainer asks you
+ (in any way) for a copy of the modified Vim you distributed, you
+ must make your changes, including source code, available to the
+ maintainer without fee. The maintainer reserves the right to
+ include your changes in the official version of Vim. What the
+ maintainer will do with your changes and under what license they
+ will be distributed is negotiable. If there has been no negotiation
+ then this license, or a later version, also applies to your changes.
+ The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
+ changes it will be announced in appropriate places (most likely
+ vim.sf.net, www.vim.org and/or comp.editors). When it is completely
+ impossible to contact the maintainer, the obligation to send him
+ your changes ceases. Once the maintainer has confirmed that he has
+ received your changes they will not have to be sent again.
+ b) If you have received a modified Vim that was distributed as
+ mentioned under a) you are allowed to further distribute it
+ unmodified, as mentioned at I). If you make additional changes the
+ text under a) applies to those changes.
+ c) Provide all the changes, including source code, with every copy of
+ the modified Vim you distribute. This may be done in the form of a
+ context diff. You can choose what license to use for new code you
+ add. The changes and their license must not restrict others from
+ making their own changes to the official version of Vim.
+ d) When you have a modified Vim which includes changes as mentioned
+ under c), you can distribute it without the source code for the
+ changes if the following three conditions are met:
+ - The license that applies to the changes permits you to distribute
+ the changes to the Vim maintainer without fee or restriction, and
+ permits the Vim maintainer to include the changes in the official
+ version of Vim without fee or restriction.
+ - You keep the changes for at least three years after last
+ distributing the corresponding modified Vim. When the maintainer
+ or someone who you distributed the modified Vim to asks you (in
+ any way) for the changes within this period, you must make them
+ available to him.
+ - You clearly describe in the distribution how to contact you. This
+ contact information must remain valid for at least three years
+ after last distributing the corresponding modified Vim, or as long
+ as possible.
+ e) When the GNU General Public License (GPL) applies to the changes,
+ you can distribute the modified Vim under the GNU GPL version 2 or
+ any later version.
+ 3) A message must be added, at least in the output of the ":version"
+ command and in the intro screen, such that the user of the modified Vim
+ is able to see that it was modified. When distributing as mentioned
+ under 2)e) adding the message is only required for as far as this does
+ not conflict with the license used for the changes.
+ 4) The contact information as required under 2)a) and 2)d) must not be
+ removed or changed, except that the person himself can make
+ corrections.
+
+III) If you distribute a modified version of Vim, you are encouraged to use
+ the Vim license for your changes and make them available to the
+ maintainer, including the source code. The preferred way to do this is
+ by e-mail or by uploading the files to a server and e-mailing the URL.
+ If the number of changes is small (e.g., a modified Makefile) e-mailing a
+ context diff will do. The e-mail address to be used is
+ <maintainer@vim.org>
+
+IV) It is not allowed to remove this license from the distribution of the Vim
+ sources, parts of it or from a modified version. You may use this
+ license for previous Vim releases instead of the license that they came
+ with, at your option.
+
+On Debian systems the GNU General Public License (GPL) version 2 is located on
+the filesystem at /usr/share/common-licenses/GPL-2.
+
+The Vim user manual and reference manual are Copyright (c) 1988-2003 by Bram
+Moolenaar and are distributed under the Open Publication License, v1.0 or later
+(no license options are exercised):
+
+
+Open Publication License
+v1.0, 8 June 1999
+
+
+I. REQUIREMENTS ON BOTH UNMODIFIED AND MODIFIED VERSIONS
+
+The Open Publication works may be reproduced and distributed in whole or in
+part, in any medium physical or electronic, provided that the terms of this
+license are adhered to, and that this license or an incorporation of it by
+reference (with any options elected by the author(s) and/or publisher) is
+displayed in the reproduction.
+
+Proper form for an incorporation by reference is as follows:
+
+ Copyright (c) <year> by <author's name or designee>. This material may be
+ distributed only subject to the terms and conditions set forth in the Open
+ Publication License, vX.Y or later (the latest version is presently
+ available at http://www.opencontent.org/openpub/).
+
+The reference must be immediately followed with any options elected by the
+author(s) and/or publisher of the document (see section VI).
+
+Commercial redistribution of Open Publication-licensed material is permitted.
+
+Any publication in standard (paper) book form shall require the citation of the
+original publisher and author. The publisher and author's names shall appear on
+all outer surfaces of the book. On all outer surfaces of the book the original
+publisher's name shall be as large as the title of the work and cited as
+possessive with respect to the title.
+
+
+II. COPYRIGHT
+
+The copyright to each Open Publication is owned by its author(s) or designee.
+
+
+III. SCOPE OF LICENSE
+
+The following license terms apply to all Open Publication works, unless
+otherwise explicitly stated in the document.
+
+Mere aggregation of Open Publication works or a portion of an Open Publication
+work with other works or programs on the same media shall not cause this
+license to apply to those other works. The aggregate work shall contain a
+notice specifying the inclusion of the Open Publication material and
+appropriate copyright notice.
+
+SEVERABILITY. If any part of this license is found to be unenforceable in any
+jurisdiction, the remaining portions of the license remain in force.
+
+NO WARRANTY. Open Publication works are licensed and provided "as is" without
+warranty of any kind, express or implied, including, but not limited to, the
+implied warranties of merchantability and fitness for a particular purpose or a
+warranty of non-infringement.
+
+
+IV. REQUIREMENTS ON MODIFIED WORKS
+
+All modified versions of documents covered by this license, including
+translations, anthologies, compilations and partial documents, must meet the
+following requirements:
+
+ 1. The modified version must be labeled as such.
+ 2. The person making the modifications must be identified and the
+ modifications dated.
+ 3. Acknowledgement of the original author and publisher if applicable must
+ be retained according to normal academic citation practices.
+ 4. The location of the original unmodified document must be identified.
+ 5. The original author's (or authors') name(s) may not be used to assert or
+ imply endorsement of the resulting document without the original author's
+ (or authors') permission.
+
+
+V. GOOD-PRACTICE RECOMMENDATIONS
+
+In addition to the requirements of this license, it is requested from and
+strongly recommended of redistributors that:
+
+ 1. If you are distributing Open Publication works on hardcopy or CD-ROM, you
+ provide email notification to the authors of your intent to redistribute
+ at least thirty days before your manuscript or media freeze, to give the
+ authors time to provide updated documents. This notification should
+ describe modifications, if any, made to the document.
+ 2. All substantive modifications (including deletions) be either clearly
+ marked up in the document or else described in an attachment to the
+ document.
+ 3. Finally, while it is not mandatory under this license, it is considered
+ good form to offer a free copy of any hardcopy and CD-ROM expression of
+ an Open Publication-licensed work to its author(s).
+
+
+VI. LICENSE OPTIONS
+
+The author(s) and/or publisher of an Open Publication-licensed document may
+elect certain options by appending language to the reference to or copy of the
+license. These options are considered part of the license instance and must be
+included with the license (or its incorporation by reference) in derived works.
+
+A. To prohibit distribution of substantively modified versions without the
+explicit permission of the author(s). "Substantive modification" is defined as
+a change to the semantic content of the document, and excludes mere changes in
+format or typographical corrections.
+
+To accomplish this, add the phrase `Distribution of substantively modified
+versions of this document is prohibited without the explicit permission of the
+copyright holder.' to the license reference or copy.
+
+B. To prohibit any publication of this work or derivative works in whole or in
+part in standard (paper) book form for commercial purposes is prohibited unless
+prior permission is obtained from the copyright holder.
+
+To accomplish this, add the phrase 'Distribution of the work or derivative of
+the work in any standard (paper) book form is prohibited unless prior
+permission is obtained from the copyright holder.' to the license reference or
+copy.
diff --git a/vim/vim.p5m b/vim/vim.p5m
new file mode 100755
index 0000000..7408f81
--- /dev/null
+++ b/vim/vim.p5m
@@ -0,0 +1,17 @@
+set name=pkg.fmri value=pkg:/editor/vim@$(ips-version)
+set name=pkg.summary value="Vi IMproved - enhanced vi editor"
+set name=info.upstream-url value="$(home)"
+set name=info.source-url value="$(download)"
+
+license $(license-file) license="$(license)"
+
+depend fmri=editor/vim-runtime@$(ips-version) type=require
+depend fmri=editor/vim-runtime@$(ips-version) type=incorporate
+
+depend fmri=editor/vim-common@$(ips-version) type=require
+depend fmri=editor/vim-common@$(ips-version) type=incorporate
+
+file work/source/src/vim-basic/vim path=usr/bin/vim.basic
+
+link path=usr/bin/vim target=vim.basic \
+ mediator=vim mediator-implementation=vim-basic
diff --git a/vim/vimrc b/vim/vimrc
new file mode 100644
index 0000000..00803b1
--- /dev/null
+++ b/vim/vimrc
@@ -0,0 +1,55 @@
+
+set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vimcurrent,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
+
+" Set paper size from /etc/papersize if available (Debian-specific)
+if filereadable("/etc/papersize")
+ let s:papersize = matchstr(readfile('/etc/papersize', '', 1), '\p*')
+ if strlen(s:papersize)
+ exe "set printoptions+=paper:" . s:papersize
+ endif
+endif
+
+if has('gui_running')
+ " Make shift-insert work like in Xterm
+ map <S-Insert> <MiddleMouse>
+ map! <S-Insert> <MiddleMouse>
+endif
+
+" 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
+
+" modelines have historically been a source of security/resource
+" vulnerabilities -- disable by default, even when 'nocompatible' is set
+set nomodeline
+
+" 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
+
+" We know xterm-debian is a color terminal
+if &term =~ "xterm-debian" || &term =~ "xterm-xfree86"
+ set t_Co=16
+ set t_Sfet t_Sb=
+
+syntax enable
+colorscheme desert
+set ai
+set expandtab
+set hlsearch
+set incsearch
+set laststatus=2
+set linebreak
+set mouse=a
+set number
+set pastetoggle=<F5>
+set showcmd
+set sm
+set statusline=%F\ [%Y,\ %{&ff}]\ %=\ %l:%c\ (%p%%)\ \|\ %{strftime(\"%Y-%m-%d,\ %H:%M\")}
+set sw=4
+set tabstop=4
+set wrap