wok annotate gvim/receipt @ rev 13069
Up: tiff to 4.0.2.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Jun 25 07:39:28 2012 +0000 (2012-06-25) |
parents | 240266efee48 |
children | 749ffdd335d7 |
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" |
manuelfloresv@9417 | 8 DEPENDS="ncurses gtk+ xorg-libXt xorg-libXau xorg-libXdmcp" |
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 |
gokhlayeh@9131 | 16 # Rules to configure and make the package. |
gokhlayeh@9131 | 17 compile_rules() |
gokhlayeh@9131 | 18 { |
gokhlayeh@9131 | 19 cd $src |
manuelfloresv@9417 | 20 |
manuelfloresv@9417 | 21 # define the place for the global vimrc file (set to /etc/vim/vimrc) |
manuelfloresv@9417 | 22 # (patch from Arch Linux PKGBUILD) |
manuelfloresv@9417 | 23 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h |
manuelfloresv@9417 | 24 # and global gvimrc file (set to /etc/vim/gvimrc) |
manuelfloresv@9417 | 25 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h |
gokhlayeh@9131 | 26 |
gokhlayeh@9131 | 27 ./configure --prefix=/usr \ |
gokhlayeh@9131 | 28 --cache-file=$PWD/config.cache \ |
gokhlayeh@9131 | 29 --infodir=/usr/share/info \ |
gokhlayeh@9131 | 30 --with-features=normal \ |
manuelfloresv@9417 | 31 --with-x=yes \ |
gokhlayeh@9131 | 32 --enable-gui=gtk2 \ |
gokhlayeh@9131 | 33 --enable-multibyte \ |
gokhlayeh@9131 | 34 --disable-motif-check \ |
gokhlayeh@9131 | 35 --disable-athena-check \ |
gokhlayeh@9131 | 36 --mandir=/usr/share/man $CONFIGURE_ARGS && |
gokhlayeh@9131 | 37 |
manuelfloresv@9417 | 38 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" && |
gokhlayeh@9131 | 39 make DESTDIR=$DESTDIR install |
gokhlayeh@9131 | 40 mkdir -p $DESTDIR/etc/vim |
gokhlayeh@9131 | 41 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc |
gokhlayeh@9131 | 42 } |
gokhlayeh@9131 | 43 |
erjo@2928 | 44 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@2928 | 45 genpkg_rules() |
erjo@2928 | 46 { |
manuelfloresv@9417 | 47 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications $fs/etc |
gokhlayeh@9131 | 48 |
gokhlayeh@9131 | 49 cp -a $_pkg/usr/bin $fs/usr |
gokhlayeh@9131 | 50 cp -a $_pkg/usr/share/vim $fs/usr/share |
slaxemulator@8751 | 51 cp -a $src/runtime/vim16x16.png $fs/usr/share/pixmaps/gvim.png |
erjo@2928 | 52 cp -a stuff/gvim.desktop $fs/usr/share/applications |
manuelfloresv@9417 | 53 cp -a $_pkg/etc/vim $fs/etc |
erjo@2928 | 54 } |
erjo@2928 | 55 |
manuelfloresv@9417 | 56 post_install() |
manuelfloresv@9417 | 57 { |
manuelfloresv@9417 | 58 local root |
manuelfloresv@9417 | 59 root=$1 |
manuelfloresv@9417 | 60 echo "Processing post-install commands..." |
manuelfloresv@9417 | 61 cmd=`readlink $root/bin/vi` |
manuelfloresv@9417 | 62 if [ ! "$cmd" = "/usr/bin/vim" ]; then |
manuelfloresv@9417 | 63 echo "" |
manuelfloresv@9417 | 64 echo "**** Actual VI link : $cmd" |
manuelfloresv@9417 | 65 echo "" |
manuelfloresv@9417 | 66 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser |
manuelfloresv@9417 | 67 if [ "$anser" == "y" ]; then |
manuelfloresv@9417 | 68 echo "" |
manuelfloresv@9417 | 69 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..." |
manuelfloresv@9417 | 70 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi |
manuelfloresv@9417 | 71 status |
manuelfloresv@9417 | 72 else |
manuelfloresv@9417 | 73 echo "" |
manuelfloresv@9417 | 74 echo "Leaving /bin/vi to : $cmd" |
manuelfloresv@9417 | 75 fi |
manuelfloresv@9417 | 76 fi |
manuelfloresv@9417 | 77 } |
erjo@2928 | 78 |
manuelfloresv@9417 | 79 post_remove() |
manuelfloresv@9417 | 80 { |
manuelfloresv@9417 | 81 # restore previous symlink |
manuelfloresv@9417 | 82 echo "Processing post-remove commands..." |
manuelfloresv@9417 | 83 ln -sf /bin/busybox $1/bin/vi |
manuelfloresv@9417 | 84 } |
manuelfloresv@9417 | 85 |