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