wok view gvim/receipt @ rev 16219
Up fpc-bootstrap (2.6.4) again...
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 31 20:10:40 2014 +0000 (2014-03-31) |
parents | 749ffdd335d7 |
children | 2a2d57bb6788 |
line source
1 # SliTaz package receipt.
3 PACKAGE="gvim"
4 VERSION="7.3"
5 CATEGORY="development"
6 SHORT_DESC="Advanced text editor, with gtk+ GUI"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="other"
9 SOURCE="vim"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.vim.org/"
12 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
13 CONFIG_FILES="/etc/vim/vimrc"
14 TAGS="text-editor"
16 DEPENDS="ncurses gtk+ xorg-libXt xorg-libXau xorg-libXdmcp"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
23 # define the place for the global vimrc file (set to /etc/vim/vimrc)
24 # (patch from Arch Linux PKGBUILD)
25 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
26 # and global gvimrc file (set to /etc/vim/gvimrc)
27 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h
29 ./configure --prefix=/usr \
30 --cache-file=$PWD/config.cache \
31 --infodir=/usr/share/info \
32 --with-features=normal \
33 --with-x=yes \
34 --enable-gui=gtk2 \
35 --enable-multibyte \
36 --disable-motif-check \
37 --disable-athena-check \
38 --mandir=/usr/share/man $CONFIGURE_ARGS &&
40 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
41 make DESTDIR=$DESTDIR install
42 mkdir -p $DESTDIR/etc/vim
43 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications $fs/etc
51 cp -a $install/usr/bin $fs/usr
52 cp -a $install/usr/share/vim $fs/usr/share
53 cp -a $src/runtime/vim16x16.png $fs/usr/share/pixmaps/gvim.png
54 cp -a stuff/gvim.desktop $fs/usr/share/applications
55 cp -a $install/etc/vim $fs/etc
56 }
58 post_install()
59 {
60 local root
61 root=$1
62 echo "Processing post-install commands..."
63 cmd=`readlink $root/bin/vi`
64 if [ ! "$cmd" = "/usr/bin/vim" ]; then
65 echo ""
66 echo "**** Actual VI link : $cmd"
67 echo ""
68 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 anser
69 if [ "$anser" == "y" ]; then
70 echo ""
71 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
72 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
73 status
74 else
75 echo ""
76 echo "Leaving /bin/vi to : $cmd"
77 fi
78 fi
79 }
81 post_remove()
82 {
83 # restore previous symlink
84 echo "Processing post-remove commands..."
85 ln -sf /bin/busybox $1/bin/vi
86 }