wok-next view gvim/receipt @ rev 21605

dropbear: add ed25519 key
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 25 08:01:52 2020 +0000 (2020-06-25)
parents d5aab818505e
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gvim"
4 VERSION="7.3"
5 CATEGORY="editors"
6 SHORT_DESC="Advanced text editor with GTK+ GUI"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="other"
9 WEB_SITE="https://www.vim.org/"
10 REPOLOGY="vim"
12 SOURCE="vim"
13 TARBALL="$SOURCE-$VERSION.tar.bz2"
14 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
16 BUILD_DEPENDS="gtk2-dev"
18 compile_rules() {
19 # define the place for the global vimrc file (set to /etc/vim/vimrc)
20 # (patch from Arch Linux PKGBUILD)
21 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
22 # and global gvimrc file (set to /etc/vim/gvimrc)
23 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h
25 ./configure \
26 --prefix=/usr \
27 --cache-file=$PWD/config.cache \
28 --infodir=/usr/share/info \
29 --with-features=normal \
30 --with-x=yes \
31 --enable-gui=gtk2 \
32 --enable-multibyte \
33 --disable-motif-check \
34 --disable-athena-check \
35 --mandir=/usr/share/man \
36 $CONFIGURE_ARGS &&
37 make \
38 VIMRCLOC=/etc/vim \
39 VIMRUNTIMEDIR=/usr/share/vim/vim73 \
40 MAKE="make -e" &&
41 make DESTDIR=$install install || return 1
43 mkdir -p $install/etc/vim
44 cp -a $src/runtime/vimrc_example.vim $install/etc/vim/vimrc
45 }
47 genpkg_rules() {
48 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps $fs/usr/share/applications $fs/etc
50 cp -a $install/usr/bin $fs/usr
51 cp -a $install/usr/share/vim $fs/usr/share
52 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
53 cp -a $stuff/gvim.desktop $fs/usr/share/applications
54 cp -a $install/etc/vim $fs/etc
55 DEPENDS="ncurses gtk2 libxt libxau libxdmcp"
56 CONFIG_FILES="/etc/vim/vimrc"
57 TAGS="text-editor"
58 }
60 post_install() {
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 answer
67 if [ "$answer" == '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 "$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 # restore previous symlink
81 ln -sf busybox "$1/bin/vi"
82 }