wok-next annotate vim/receipt @ rev 12479

Add sg3_utils
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 23 16:15:50 2012 +0200 (2012-04-23)
parents ee65475504e7
children fbb0f6a5043a
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"
mojo@11665 8 DEPENDS="ncurses acl"
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
erjo@250 15 # Rules to configure and make the package.
erjo@250 16 compile_rules()
erjo@250 17 {
erjo@250 18 cd $src
manuelfloresv@9417 19
manuelfloresv@9417 20 # define the place for the global vimrc file (set to /etc/vim/vimrc)
manuelfloresv@9417 21 # (patch from Arch Linux PKGBUILD)
manuelfloresv@9417 22 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
erjo@250 23
erjo@250 24 ./configure --prefix=/usr \
erjo@250 25 --cache-file=$PWD/config.cache \
erjo@250 26 --infodir=/usr/share/info \
erjo@250 27 --with-features=normal \
manuelfloresv@9417 28 --with-x=no \
gokhlayeh@9131 29 --disable-gui \
rocky@7851 30 --enable-multibyte \
erjo@2927 31 --disable-motif-check \
erjo@2927 32 --disable-athena-check \
pascal@2948 33 --mandir=/usr/share/man $CONFIGURE_ARGS &&
erjo@250 34
manuelfloresv@9417 35 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
slaxemulator@8751 36 make DESTDIR=$DESTDIR install
slaxemulator@8751 37 mkdir -p $DESTDIR/etc/vim
slaxemulator@8751 38 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
erjo@250 39 }
erjo@250 40
erjo@250 41 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@250 42 genpkg_rules()
erjo@250 43 {
manuelfloresv@9417 44 mkdir -p $fs/usr/share $fs/etc
erjo@2927 45
erjo@250 46 cp -a $_pkg/usr/bin $fs/usr
erjo@250 47 cp -a $_pkg/usr/share/vim $fs/usr/share
manuelfloresv@9417 48 cp -a $_pkg/etc/vim $fs/etc
erjo@2927 49 }
erjo@250 50
erjo@250 51 post_install()
erjo@250 52 {
erjo@250 53 local root
erjo@250 54 root=$1
erjo@250 55 echo "Processing post-install commands..."
erjo@250 56 cmd=`readlink $root/bin/vi`
erjo@250 57 if [ ! "$cmd" = "/usr/bin/vim" ]; then
erjo@250 58 echo ""
erjo@250 59 echo "**** Actual VI link : $cmd"
erjo@250 60 echo ""
erjo@250 61 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
erjo@250 62 if [ "$anser" == "y" ]; then
erjo@250 63 echo ""
erjo@250 64 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
erjo@1354 65 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
erjo@250 66 status
erjo@250 67 else
erjo@250 68 echo ""
erjo@250 69 echo "Leaving /bin/vi to : $cmd"
erjo@250 70 fi
erjo@250 71 fi
erjo@250 72 }
erjo@250 73
erjo@2531 74 post_remove()
erjo@2531 75 {
erjo@2531 76 # restore previous symlink
erjo@2531 77 echo "Processing post-remove commands..."
slaxemulator@8751 78 ln -sf /bin/busybox $1/bin/vi
erjo@2531 79 }