wok-current annotate gvim/receipt @ rev 18559
Grows editors category
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Nov 08 14:57:26 2015 +0100 (2015-11-08) |
parents | 6c09056154b2 |
children | 9e01bc6321ea |
rev | line source |
---|---|
erjo@2928 | 1 # SliTaz package receipt. |
erjo@2928 | 2 |
erjo@2928 | 3 PACKAGE="gvim" |
manuelfloresv@9417 | 4 VERSION="7.3" |
pascal@18559 | 5 CATEGORY="editors" |
gokhlayeh@9147 | 6 SHORT_DESC="Advanced text editor, with gtk+ GUI" |
erjo@2928 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15600 | 8 LICENSE="other" |
gokhlayeh@9147 | 9 SOURCE="vim" |
gokhlayeh@9147 | 10 TARBALL="$SOURCE-$VERSION.tar.bz2" |
erjo@2928 | 11 WEB_SITE="http://www.vim.org/" |
gokhlayeh@9147 | 12 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL" |
gokhlayeh@9147 | 13 CONFIG_FILES="/etc/vim/vimrc" |
gokhlayeh@9147 | 14 TAGS="text-editor" |
erjo@2928 | 15 |
pascal@15600 | 16 DEPENDS="ncurses gtk+ xorg-libXt xorg-libXau xorg-libXdmcp" |
mojo@16699 | 17 BUILD_DEPENDS="gtk+-dev" |
pascal@15600 | 18 |
gokhlayeh@9131 | 19 # Rules to configure and make the package. |
gokhlayeh@9131 | 20 compile_rules() |
gokhlayeh@9131 | 21 { |
pascal@17751 | 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 |
manuelfloresv@9417 | 27 # and global gvimrc file (set to /etc/vim/gvimrc) |
manuelfloresv@9417 | 28 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h |
al@18303 | 29 |
al@18303 | 30 ./configure \ |
al@18303 | 31 --prefix=/usr \ |
al@18303 | 32 --cache-file=$PWD/config.cache \ |
al@18303 | 33 --infodir=/usr/share/info \ |
al@18303 | 34 --with-features=normal \ |
al@18303 | 35 --with-x=yes \ |
al@18303 | 36 --enable-gui=gtk2 \ |
al@18303 | 37 --enable-multibyte \ |
al@18303 | 38 --disable-motif-check \ |
al@18303 | 39 --disable-athena-check \ |
al@18303 | 40 --mandir=/usr/share/man \ |
al@18303 | 41 $CONFIGURE_ARGS && |
al@18303 | 42 |
manuelfloresv@9417 | 43 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" && |
gokhlayeh@9131 | 44 make DESTDIR=$DESTDIR install |
gokhlayeh@9131 | 45 mkdir -p $DESTDIR/etc/vim |
gokhlayeh@9131 | 46 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc |
gokhlayeh@9131 | 47 } |
gokhlayeh@9131 | 48 |
erjo@2928 | 49 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@2928 | 50 genpkg_rules() |
erjo@2928 | 51 { |
al@18303 | 52 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps $fs/usr/share/applications $fs/etc |
gokhlayeh@9131 | 53 |
pascal@15600 | 54 cp -a $install/usr/bin $fs/usr |
pascal@15600 | 55 cp -a $install/usr/share/vim $fs/usr/share |
al@18303 | 56 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png |
erjo@2928 | 57 cp -a stuff/gvim.desktop $fs/usr/share/applications |
pascal@15600 | 58 cp -a $install/etc/vim $fs/etc |
erjo@2928 | 59 } |
erjo@2928 | 60 |
manuelfloresv@9417 | 61 post_install() |
manuelfloresv@9417 | 62 { |
al@18303 | 63 local root |
al@18303 | 64 root=$1 |
al@18303 | 65 |
al@18303 | 66 cmd=$(readlink $root/bin/vi) |
al@18303 | 67 if [ ! "$cmd" == '/usr/bin/vim' ]; then |
al@18303 | 68 echo "" |
al@18303 | 69 echo "**** Actual VI link : $cmd" |
al@18303 | 70 echo "" |
al@18303 | 71 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer |
al@18303 | 72 if [ "$answer" == 'y' ]; then |
al@18303 | 73 echo "" |
al@18303 | 74 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..." |
al@18303 | 75 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi |
al@18303 | 76 status |
al@18303 | 77 else |
al@18303 | 78 echo "" |
al@18303 | 79 echo "Leaving /bin/vi to : $cmd" |
al@18303 | 80 fi |
al@18303 | 81 fi |
manuelfloresv@9417 | 82 } |
erjo@2928 | 83 |
manuelfloresv@9417 | 84 post_remove() |
manuelfloresv@9417 | 85 { |
al@18303 | 86 # restore previous symlink |
al@18303 | 87 ln -sf busybox $1/bin/vi |
manuelfloresv@9417 | 88 } |