wok-current annotate vim-tiny/receipt @ rev 22014
updated tcptrack (1.4.2 -> 1.4.3)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Oct 19 16:30:51 2019 +0100 (2019-10-19) |
parents | 6fab3264ba87 |
children | cbff385f6ca4 |
rev | line source |
---|---|
erjo@4784 | 1 # SliTaz package receipt. |
erjo@4784 | 2 |
erjo@4784 | 3 PACKAGE="vim-tiny" |
manuelfloresv@9417 | 4 VERSION="7.3" |
pascal@18559 | 5 CATEGORY="editors" |
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 |
al@18741 | 27 |
erjo@4784 | 28 ./configure --prefix=/usr \ |
al@18741 | 29 --cache-file=$PWD/config.cache \ |
al@18741 | 30 --infodir=/usr/share/info \ |
al@18741 | 31 --with-features=tiny \ |
al@18741 | 32 --with-x=no \ |
al@18741 | 33 --disable-gui \ |
al@18741 | 34 --enable-multibyte \ |
al@18741 | 35 --with-vim-name=$PACKAGE \ |
al@18741 | 36 --disable-acl \ |
al@18741 | 37 --disable-motif-check \ |
al@18741 | 38 --disable-athena-check \ |
al@18741 | 39 --mandir=/usr/share/man $CONFIGURE_ARGS && |
al@18741 | 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 |
al@18741 | 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 { |
al@18741 | 60 cmd=$(readlink "$1/bin/vi") |
al@18741 | 61 if [ "$cmd" != '/usr/bin/vim' ]; then |
al@18741 | 62 echo '' |
al@18741 | 63 echo "**** Actual VI link : $cmd" |
al@18741 | 64 echo '' |
al@18741 | 65 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser |
pascal@20892 | 66 if [ "$anser" = 'y' ]; then |
al@18741 | 67 echo '' |
al@18741 | 68 action 'Removing vi link to make a new one pointing on /usr/bin/vim...' |
al@18741 | 69 rm "$1/bin/vi" && ln -sf /usr/bin/vim-tiny "$1/bin/vi" |
al@18741 | 70 status |
al@18741 | 71 else |
al@18741 | 72 echo '' |
al@18741 | 73 echo "Leaving /bin/vi to : $cmd" |
al@18741 | 74 fi |
al@18741 | 75 fi |
erjo@4784 | 76 } |
erjo@4784 | 77 |
erjo@4784 | 78 post_remove() |
erjo@4784 | 79 { |
erjo@4784 | 80 # restore previous symlink |
pascal@18730 | 81 ln -sf /bin/busybox "$1/bin/vi" |
erjo@4784 | 82 } |