wok annotate vim/receipt @ rev 18431
open-vm-tools: add dnet dep
author | Nathan Neulinger <nneul@neulinger.org> |
---|---|
date | Mon Sep 21 22:09:23 2015 +0000 (2015-09-21) |
parents | 2a21689b0af7 |
children | 3494cfd4c595 |
rev | line source |
---|---|
erjo@250 | 1 # SliTaz package receipt. |
erjo@250 | 2 |
erjo@250 | 3 PACKAGE="vim" |
manuelfloresv@9417 | 4 VERSION="7.3" |
pankso@271 | 5 CATEGORY="development" |
erjo@250 | 6 SHORT_DESC="Advanced text editor" |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15363 | 8 LICENSE="other" |
erjo@250 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
erjo@250 | 10 WEB_SITE="http://www.vim.org/" |
erjo@250 | 11 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL" |
mallory@6286 | 12 CONFIG_FILES="/etc/vim/vimrc" |
jozee@4975 | 13 TAGS="text-editor" |
erjo@250 | 14 |
pascal@13276 | 15 DEPENDS="ncurses acl diffutils" |
pascal@17716 | 16 BUILD_DEPENDS="ncurses-dev acl-dev diffutils" |
pascal@13276 | 17 |
erjo@250 | 18 # Rules to configure and make the package. |
erjo@250 | 19 compile_rules() |
erjo@250 | 20 { |
pascal@17716 | 21 export LDFLAGS="$LDFLAGS -ltinfo" |
manuelfloresv@9417 | 22 |
manuelfloresv@9417 | 23 # define the place for the global vimrc file (set to /etc/vim/vimrc) |
manuelfloresv@9417 | 24 # (patch from Arch Linux PKGBUILD) |
manuelfloresv@9417 | 25 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h |
erjo@250 | 26 |
erjo@250 | 27 ./configure --prefix=/usr \ |
erjo@250 | 28 --cache-file=$PWD/config.cache \ |
erjo@250 | 29 --infodir=/usr/share/info \ |
erjo@250 | 30 --with-features=normal \ |
manuelfloresv@9417 | 31 --with-x=no \ |
gokhlayeh@9131 | 32 --disable-gui \ |
rocky@7851 | 33 --enable-multibyte \ |
erjo@2927 | 34 --disable-motif-check \ |
erjo@2927 | 35 --disable-athena-check \ |
pascal@2948 | 36 --mandir=/usr/share/man $CONFIGURE_ARGS && |
erjo@250 | 37 |
manuelfloresv@9417 | 38 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" && |
slaxemulator@8751 | 39 make DESTDIR=$DESTDIR install |
slaxemulator@8751 | 40 mkdir -p $DESTDIR/etc/vim |
slaxemulator@8751 | 41 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc |
erjo@250 | 42 } |
erjo@250 | 43 |
erjo@250 | 44 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@250 | 45 genpkg_rules() |
erjo@250 | 46 { |
manuelfloresv@9417 | 47 mkdir -p $fs/usr/share $fs/etc |
erjo@2927 | 48 |
pascal@15363 | 49 cp -a $install/usr/bin $fs/usr |
pascal@15363 | 50 cp -a $install/usr/share/vim $fs/usr/share |
pascal@15363 | 51 cp -a $install/etc/vim $fs/etc |
erjo@2927 | 52 } |
erjo@250 | 53 |
erjo@250 | 54 post_install() |
erjo@250 | 55 { |
erjo@250 | 56 local root |
erjo@250 | 57 root=$1 |
erjo@250 | 58 echo "Processing post-install commands..." |
erjo@250 | 59 cmd=`readlink $root/bin/vi` |
erjo@250 | 60 if [ ! "$cmd" = "/usr/bin/vim" ]; then |
erjo@250 | 61 echo "" |
erjo@250 | 62 echo "**** Actual VI link : $cmd" |
erjo@250 | 63 echo "" |
pascal@14582 | 64 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 anser |
erjo@250 | 65 if [ "$anser" == "y" ]; then |
erjo@250 | 66 echo "" |
erjo@250 | 67 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..." |
erjo@1354 | 68 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi |
erjo@250 | 69 status |
erjo@250 | 70 else |
erjo@250 | 71 echo "" |
erjo@250 | 72 echo "Leaving /bin/vi to : $cmd" |
erjo@250 | 73 fi |
erjo@250 | 74 fi |
erjo@250 | 75 } |
erjo@250 | 76 |
erjo@2531 | 77 post_remove() |
erjo@2531 | 78 { |
erjo@2531 | 79 # restore previous symlink |
erjo@2531 | 80 echo "Processing post-remove commands..." |
slaxemulator@8751 | 81 ln -sf /bin/busybox $1/bin/vi |
erjo@2531 | 82 } |