wok view gvim/receipt @ rev 12678

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