wok-6.x annotate vim/receipt @ rev 4147
emov Thunar, Thunar-dev, Terminal
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Sep 20 14:00:03 2009 +0000 (2009-09-20) |
parents | b3f7190dc81e |
children | 176fe655cdc1 |
rev | line source |
---|---|
erjo@250 | 1 # SliTaz package receipt. |
erjo@250 | 2 |
erjo@250 | 3 PACKAGE="vim" |
erjo@1354 | 4 VERSION="7.2" |
pankso@271 | 5 CATEGORY="development" |
erjo@250 | 6 SHORT_DESC="Advanced text editor" |
erjo@784 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@2948 | 8 DEPENDS="ncurses gtk+" |
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@3287 | 12 CONFIG_FILES="/etc/vimrc" |
erjo@250 | 13 |
erjo@250 | 14 # Rules to configure and make the package. |
erjo@250 | 15 compile_rules() |
erjo@250 | 16 { |
pankso@1382 | 17 src="vim72" |
erjo@250 | 18 cd $src |
erjo@250 | 19 |
erjo@250 | 20 ./configure --prefix=/usr \ |
erjo@250 | 21 --cache-file=$PWD/config.cache \ |
erjo@250 | 22 --infodir=/usr/share/info \ |
erjo@250 | 23 --with-features=normal \ |
erjo@2927 | 24 --enable-gui=gtk2 \ |
erjo@2927 | 25 --disable-motif-check \ |
erjo@2927 | 26 --disable-athena-check \ |
pascal@2948 | 27 --mandir=/usr/share/man $CONFIGURE_ARGS && |
erjo@250 | 28 |
mallory@3100 | 29 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/$src MAKE="make -e" && |
erjo@250 | 30 make DESTDIR=$PWD/_pkg install |
erjo@250 | 31 } |
erjo@250 | 32 |
erjo@250 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@250 | 34 genpkg_rules() |
erjo@250 | 35 { |
pankso@1383 | 36 _pkg="$PWD/vim72/_pkg" |
erjo@2927 | 37 |
erjo@2927 | 38 mkdir -p $fs/usr $fs/usr/share $fs/etc/vim |
erjo@2927 | 39 |
erjo@250 | 40 cp -a $_pkg/usr/bin $fs/usr |
erjo@250 | 41 cp -a $_pkg/usr/share/vim $fs/usr/share |
erjo@2927 | 42 cp -a $WOK/$PACKAGE/vim72/runtime/vimrc_example.vim $fs/etc/vim/vimrc |
erjo@2927 | 43 rm -f $fs/usr/bin/*vimtutor |
erjo@2927 | 44 } |
erjo@250 | 45 |
erjo@250 | 46 |
erjo@250 | 47 |
erjo@250 | 48 # Rules to clean extras dirs or files |
erjo@250 | 49 clean_wok() |
erjo@250 | 50 { |
erjo@1354 | 51 rm -rf $PWD/vim72 2>/dev/null |
erjo@250 | 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 "" |
erjo@250 | 64 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read 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..." |
erjo@2531 | 81 ln -sf /bin/busybox /bin/vi |
erjo@2531 | 82 } |