From 6faa512bba92bb71902c7a96b063c2f6a06212ee Mon Sep 17 00:00:00 2001 From: xhaa123 Date: Sat, 7 Sep 2024 23:34:40 +0800 Subject: [PATCH] vim 9.1.0660-1 --- vim/PKGBUILD | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 vim/PKGBUILD diff --git a/vim/PKGBUILD b/vim/PKGBUILD new file mode 100644 index 0000000..374ccf0 --- /dev/null +++ b/vim/PKGBUILD @@ -0,0 +1,64 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# Maintainer: Future Linux Team +pkgname=vim +pkgver=9.1.0660 +pkgrel=1 +pkgdesc="Vi Improved, a highly configurable, improved version of the vi text editor" +arch=('x86_64') +url="https://www.vim.org/" +license=('custom:vim') +depends=('glibc' 'gawk' 'acl' 'zlib') +source=(https://github.com/vim/vim/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz) +sha256sums=(cf7d5c1fbde84357a355c1ad20118c8947d5e1684e71a673549f1e9635f9bfe7) + +prepare() { + cd ${pkgname}-${pkgver} + + echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h +} + +build() { + cd ${pkgname}-${pkgver} + + ${CONFIGURE} --with-compiledby='Future Linux' + + make +} + +package() { + cd ${pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install + + ln -sv vim ${pkgdir}/usr/bin/vi + for L in ${pkgdir}/usr/share/man/{,*/}man1/vim.1; do + ln -sv vim.1 $(dirname $L)/vi.1 + done + + install -vdm755 ${pkgdir}/usr/share/doc + ln -sv ../vim/vim91/doc ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} + + install -vdm755 ${pkgdir}/etc + cat > ${pkgdir}/etc/vimrc << "EOF" +" Begin /etc/vimrc + +" Ensure defaults are set before customizing settings, not after +source $VIMRUNTIME/defaults.vim +let skip_defaults_vim=1 + +set nocompatible +set backspace=2 +set mouse= +syntax on +if (&term == "xterm") || (&term == "putty") + set background=dark +endif + +" End /etc/vimrc +EOF + +}