wok annotate gvim/receipt @ rev 18877

Up slitaz-base-files(298), slitaz-boot-scripts(422)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Feb 08 10:29:19 2016 +0200 (2016-02-08)
parents 3494cfd4c595
children 02c70d036ea0
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 {
pascal@18730 63 cmd=$(readlink "$1/bin/vi")
al@18303 64 if [ ! "$cmd" == '/usr/bin/vim' ]; then
al@18303 65 echo ""
al@18303 66 echo "**** Actual VI link : $cmd"
al@18303 67 echo ""
al@18303 68 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer
al@18303 69 if [ "$answer" == 'y' ]; then
al@18303 70 echo ""
al@18303 71 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
pascal@18730 72 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
al@18303 73 status
al@18303 74 else
al@18303 75 echo ""
al@18303 76 echo "Leaving /bin/vi to : $cmd"
al@18303 77 fi
al@18303 78 fi
manuelfloresv@9417 79 }
erjo@2928 80
manuelfloresv@9417 81 post_remove()
manuelfloresv@9417 82 {
al@18303 83 # restore previous symlink
pascal@18730 84 ln -sf busybox "$1/bin/vi"
manuelfloresv@9417 85 }