wok-next view gvim/receipt @ rev 18678
Add xpenguins (2.2), xpenguins_themes (1.0)
author | Lucas Levrel <llevrel@yahoo.fr> |
---|---|
date | Mon Dec 07 22:10:28 2015 +0100 (2015-12-07) |
parents | 6c09056154b2 |
children | 9e01bc6321ea |
line source
1 # SliTaz package receipt.
3 PACKAGE="gvim"
4 VERSION="7.3"
5 CATEGORY="editors"
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"
17 BUILD_DEPENDS="gtk+-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 export LDFLAGS="$LDFLAGS -ltinfo"
24 # define the place for the global vimrc file (set to /etc/vim/vimrc)
25 # (patch from Arch Linux PKGBUILD)
26 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
27 # and global gvimrc file (set to /etc/vim/gvimrc)
28 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h
30 ./configure \
31 --prefix=/usr \
32 --cache-file=$PWD/config.cache \
33 --infodir=/usr/share/info \
34 --with-features=normal \
35 --with-x=yes \
36 --enable-gui=gtk2 \
37 --enable-multibyte \
38 --disable-motif-check \
39 --disable-athena-check \
40 --mandir=/usr/share/man \
41 $CONFIGURE_ARGS &&
43 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
44 make DESTDIR=$DESTDIR install
45 mkdir -p $DESTDIR/etc/vim
46 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps $fs/usr/share/applications $fs/etc
54 cp -a $install/usr/bin $fs/usr
55 cp -a $install/usr/share/vim $fs/usr/share
56 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
57 cp -a stuff/gvim.desktop $fs/usr/share/applications
58 cp -a $install/etc/vim $fs/etc
59 }
61 post_install()
62 {
63 local root
64 root=$1
66 cmd=$(readlink $root/bin/vi)
67 if [ ! "$cmd" == '/usr/bin/vim' ]; then
68 echo ""
69 echo "**** Actual VI link : $cmd"
70 echo ""
71 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer
72 if [ "$answer" == 'y' ]; then
73 echo ""
74 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
75 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
76 status
77 else
78 echo ""
79 echo "Leaving /bin/vi to : $cmd"
80 fi
81 fi
82 }
84 post_remove()
85 {
86 # restore previous symlink
87 ln -sf busybox $1/bin/vi
88 }