wok-6.x view gvim/receipt @ rev 24614
Update some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 06 21:04:14 2022 +0000 (2022-03-06) |
parents | 241fb98cab1c |
children | 5cb11e361a0a |
line source
1 # SliTaz package receipt.
3 PACKAGE="gvim"
4 VERSION="8.2"
5 CATEGORY="editors"
6 TAGS="text-editor"
7 SHORT_DESC="Advanced text editor, with gtk+ GUI."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="other"
10 WEB_SITE="https://www.vim.org/"
12 SOURCE="vim"
13 TARBALL="$SOURCE-$VERSION.tar.bz2"
14 WGET_URL="https://ftp.nluug.nl/pub/vim/unix/$TARBALL"
16 PROVIDES="xxd"
17 DEPENDS="gtk+ ncurses xorg-libXau xorg-libXdmcp xorg-libXt"
18 BUILD_DEPENDS="gtk+-dev"
19 CONFIG_FILES="/etc/vim/vimrc"
21 # What is the latest version available today?
22 current_version()
23 {
24 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
25 sed '/vim-[0-9]/!d;/tar/!d;s|.*vim-||;s|.tar.*||' | sort -Vr | sed q
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 export LDFLAGS="$LDFLAGS -ltinfo"
33 # define the place for the global vimrc file (set to /etc/vim/vimrc)
34 # (patch from Arch Linux PKGBUILD)
35 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
36 $src/src/feature.h
37 # and global gvimrc file (set to /etc/vim/gvimrc)
38 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' \
39 $src/src/feature.h
41 ./configure \
42 --prefix=/usr \
43 --cache-file=$PWD/config.cache \
44 --infodir=/usr/share/info \
45 --mandir=/usr/share/man \
46 --with-features=normal \
47 --with-x=yes \
48 --enable-gui=gtk2 \
49 --enable-multibyte \
50 --disable-athena-check \
51 --disable-motif-check \
52 $CONFIGURE_ARGS &&
54 make \
55 VIMRCLOC=/etc/vim \
56 VIMRUNTIMEDIR=/usr/share/vim/vim82 \
57 MAKE="make -e" &&
58 make DESTDIR=$DESTDIR install
60 mkdir -p $DESTDIR/etc/vim
61 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
62 }
64 # Rules to gen a SliTaz package suitable for Tazpkg.
65 genpkg_rules()
66 {
67 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps
68 mkdir -p $fs/usr/share/applications
69 mkdir -p $fs/etc
71 cp -a $install/usr/bin $fs/usr
72 cp -a $install/usr/share/vim $fs/usr/share
73 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
74 cp -a stuff/gvim.desktop $fs/usr/share/applications
75 cp -a $install/etc/vim $fs/etc
76 }
78 post_install()
79 {
80 cmd=$(readlink "$1/bin/vi")
81 if [ ! "$cmd" = '/usr/bin/vim' ]
82 then
83 echo ""
84 echo "**** Actual VI link : $cmd"
85 echo ""
86 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer
87 if [ "$answer" = 'y' ]
88 then
89 echo ""
90 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
91 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
92 status
93 else
94 echo ""
95 echo "Leaving /bin/vi to : $cmd"
96 fi
97 fi
98 }
100 post_remove()
101 {
102 # restore previous symlink
103 ln -sf busybox "$1/bin/vi"
104 }