pkgname=vim pkgver=9.1.0984 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') makedepends=('perl' 'python') backup=(etc/vimrc) source=(https://github.com/vim/vim/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz vimrc) sha256sums=(1a821c8fa4fe176e2713ac38ed37fe85da6785d9095233dd830e5e97f2aad681 acb4e424e551ad670ac046944fd234b489319cc636e41067a8e16572caffbde9) prepare() { cd ${pkgname}-${pkgver} echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h } build() { cd ${pkgname}-${pkgver} local configure_args=( --with-compiledby='Flarebird Linux' ${configure_options} ) ./configure ${configure_args[@]} 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 -vDm644 ${srcdir}/vimrc ${pkgdir}/etc/vimrc sed -i "s/mouse=a/mouse-=a/g" ${pkgdir}/usr/share/vim/vim91/defaults.vim }