wok-6.x view vim-tiny/receipt @ rev 18739

Up firefox-official(43.0.2)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Dec 23 15:31:48 2015 +0200 (2015-12-23)
parents 3494cfd4c595
children 6fab3264ba87
line source
1 # SliTaz package receipt.
3 PACKAGE="vim-tiny"
4 VERSION="7.3"
5 CATEGORY="editors"
6 SHORT_DESC="Advanced text editor with no 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"
17 BUILD_DEPENDS="ncurses-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
28 ./configure --prefix=/usr \
29 --cache-file=$PWD/config.cache \
30 --infodir=/usr/share/info \
31 --with-features=tiny \
32 --with-x=no \
33 --disable-gui \
34 --enable-multibyte \
35 --with-vim-name=$PACKAGE \
36 --disable-acl \
37 --disable-motif-check \
38 --disable-athena-check \
39 --mandir=/usr/share/man $CONFIGURE_ARGS &&
41 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
42 make DESTDIR=$DESTDIR install
43 mkdir -p $DESTDIR/etc/vim
44 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 mkdir -p $fs/usr/share $fs/etc
52 cp -a $install/usr/bin $fs/usr
53 cp -a $install/usr/share/vim $fs/usr/share
54 cp -a $install/etc/vim $fs/etc
55 rm -f $fs/usr/bin/*tutor
56 }
58 post_install()
59 {
60 echo "Processing post-install commands..."
61 cmd=$(readlink "$1/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 -t 30 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 "$1/bin/vi" && ln -sf /usr/bin/vim-tiny "$1/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 }