wok annotate gvim/receipt @ rev 18125

Add xaos
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 11 15:46:55 2015 +0200 (2015-06-11)
parents 2a2d57bb6788
children 6c09056154b2
rev   line source
erjo@2928 1 # SliTaz package receipt.
erjo@2928 2
erjo@2928 3 PACKAGE="gvim"
manuelfloresv@9417 4 VERSION="7.3"
erjo@2928 5 CATEGORY="development"
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
gokhlayeh@9131 29
gokhlayeh@9131 30 ./configure --prefix=/usr \
gokhlayeh@9131 31 --cache-file=$PWD/config.cache \
gokhlayeh@9131 32 --infodir=/usr/share/info \
gokhlayeh@9131 33 --with-features=normal \
manuelfloresv@9417 34 --with-x=yes \
gokhlayeh@9131 35 --enable-gui=gtk2 \
gokhlayeh@9131 36 --enable-multibyte \
gokhlayeh@9131 37 --disable-motif-check \
gokhlayeh@9131 38 --disable-athena-check \
gokhlayeh@9131 39 --mandir=/usr/share/man $CONFIGURE_ARGS &&
gokhlayeh@9131 40
manuelfloresv@9417 41 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
gokhlayeh@9131 42 make DESTDIR=$DESTDIR install
gokhlayeh@9131 43 mkdir -p $DESTDIR/etc/vim
gokhlayeh@9131 44 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
gokhlayeh@9131 45 }
gokhlayeh@9131 46
erjo@2928 47 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@2928 48 genpkg_rules()
erjo@2928 49 {
manuelfloresv@9417 50 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications $fs/etc
gokhlayeh@9131 51
pascal@15600 52 cp -a $install/usr/bin $fs/usr
pascal@15600 53 cp -a $install/usr/share/vim $fs/usr/share
slaxemulator@8751 54 cp -a $src/runtime/vim16x16.png $fs/usr/share/pixmaps/gvim.png
erjo@2928 55 cp -a stuff/gvim.desktop $fs/usr/share/applications
pascal@15600 56 cp -a $install/etc/vim $fs/etc
erjo@2928 57 }
erjo@2928 58
manuelfloresv@9417 59 post_install()
manuelfloresv@9417 60 {
manuelfloresv@9417 61 local root
manuelfloresv@9417 62 root=$1
manuelfloresv@9417 63 echo "Processing post-install commands..."
manuelfloresv@9417 64 cmd=`readlink $root/bin/vi`
manuelfloresv@9417 65 if [ ! "$cmd" = "/usr/bin/vim" ]; then
manuelfloresv@9417 66 echo ""
manuelfloresv@9417 67 echo "**** Actual VI link : $cmd"
manuelfloresv@9417 68 echo ""
pascal@14582 69 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 anser
manuelfloresv@9417 70 if [ "$anser" == "y" ]; then
manuelfloresv@9417 71 echo ""
manuelfloresv@9417 72 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
manuelfloresv@9417 73 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
manuelfloresv@9417 74 status
manuelfloresv@9417 75 else
manuelfloresv@9417 76 echo ""
manuelfloresv@9417 77 echo "Leaving /bin/vi to : $cmd"
manuelfloresv@9417 78 fi
manuelfloresv@9417 79 fi
manuelfloresv@9417 80 }
erjo@2928 81
manuelfloresv@9417 82 post_remove()
manuelfloresv@9417 83 {
manuelfloresv@9417 84 # restore previous symlink
manuelfloresv@9417 85 echo "Processing post-remove commands..."
manuelfloresv@9417 86 ln -sf /bin/busybox $1/bin/vi
manuelfloresv@9417 87 }