wok-current view vim/receipt @ rev 23759
librsvg: avoid using /usr/libgcc83/libstdc++.la
author | Hans-G?nter Theisgen |
---|---|
date | Mon May 04 07:00:22 2020 +0100 (2020-05-04) |
parents | c16b1e0dda38 |
children | 5ea0ce1cecc0 |
line source
1 # SliTaz package receipt.
3 PACKAGE="vim"
4 VERSION="8.2.0664"
5 CATEGORY="editors"
6 TAGS="text-editor"
7 SHORT_DESC="Advanced text editor."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="other"
10 WEB_SITE="https://www.vim.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/v$VERSION.tar.gz"
15 DEPENDS="acl diffutils ncurses"
16 BUILD_DEPENDS="acl-dev diffutils ncurses-dev"
18 CONFIG_FILES="/etc/vim/vimrc"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 export LDFLAGS="$LDFLAGS -ltinfo"
25 # define the place for the global vimrc file (set to /etc/vim/vimrc)
26 # (patch from Arch Linux PKGBUILD)
27 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
28 $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=no \
36 --disable-gui \
37 --enable-multibyte \
38 --disable-motif-check \
39 --disable-athena-check \
40 --mandir=/usr/share/man \
41 $CONFIGURE_ARGS &&
43 make \
44 VIMRCLOC=/etc/vim \
45 VIMRUNTIMEDIR=/usr/share/vim/vim82 \
46 MAKE="make -e" &&
47 make DESTDIR=$DESTDIR install
49 mkdir -p $DESTDIR/etc/vim
50 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
51 }
53 # Rules to gen a SliTaz package suitable for Tazpkg.
54 genpkg_rules()
55 {
56 mkdir -p $fs/usr/share
57 mkdir -p $fs/etc
59 cp -a $install/usr/bin $fs/usr
60 cp -a $install/usr/share/vim $fs/usr/share
61 cp -a $install/etc/vim $fs/etc
62 }
64 post_install()
65 {
66 cmd=$(readlink "$1/bin/vi")
67 if [ "$cmd" != '/usr/bin/vim' ]
68 then
69 echo ''
70 echo "**** Actual VI link : $cmd"
71 echo ''
72 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
73 if [ "$anser" = 'y' ]
74 then
75 echo ''
76 echo -n 'Removing vi link to make a new one pointing on /usr/bin/vim...'
77 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
78 status
79 else
80 echo ''
81 echo "Leaving /bin/vi to : $cmd"
82 fi
83 fi
84 }
86 post_remove()
87 {
88 # restore previous symlink
89 ln -sf /bin/busybox "$1/bin/vi"
90 }