wok view gvim/receipt @ rev 25517

updated gvim 8.2 -> 9.0.0133
author Hans-G?nter Theisgen
date Thu Feb 23 10:53:50 2023 +0100 (15 months ago)
parents bc2b9d9bed6f
children adcde2ac1f32
line source
1 # SliTaz package receipt.
3 PACKAGE="gvim"
4 VERSION="9.0.0133"
5 basever=${VERSION%.*}
6 basever=${basever/./}
7 CATEGORY="editors"
8 TAGS="text-editor"
9 SHORT_DESC="Advanced text editor, with gtk+ GUI."
10 MAINTAINER="erjo@slitaz.org"
11 LICENSE="other"
12 WEB_SITE="https://www.vim.org/"
14 SOURCE="vim"
15 TARBALL="$SOURCE-$VERSION.tar.gz"
16 WGET_URL="https://github.com/$SOURCE/$SOURCE/archive/v$VERSION.tar.gz"
18 PROVIDES="xxd"
19 DEPENDS="gtk+ ncurses xorg-libXau xorg-libXdmcp xorg-libXt"
20 BUILD_DEPENDS="gtk+-dev"
21 CONFIG_FILES="/etc/vim/vimrc"
23 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
27 sed '/vim-[0-9]/!d;/tar/!d;s|.*vim-||;s|.tar.*||' | sort -Vr | sed q
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 export LDFLAGS="$LDFLAGS -ltinfo"
35 # define the place for the global vimrc file (set to /etc/vim/vimrc)
36 # (patch from Arch Linux PKGBUILD)
37 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' \
38 $src/src/feature.h
39 # and global gvimrc file (set to /etc/vim/gvimrc)
40 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' \
41 $src/src/feature.h
43 ./configure \
44 --prefix=/usr \
45 --cache-file=$PWD/config.cache \
46 --infodir=/usr/share/info \
47 --mandir=/usr/share/man \
48 --with-features=normal \
49 --with-x=yes \
50 --enable-gui=gtk2 \
51 --enable-multibyte \
52 --disable-athena-check \
53 --disable-motif-check \
54 $CONFIGURE_ARGS &&
56 make \
57 VIMRCLOC=/etc/vim \
58 VIMRUNTIMEDIR=/usr/share/vim/vim$basever\
59 MAKE="make -e" &&
60 make DESTDIR=$DESTDIR install
62 mkdir -p $DESTDIR/etc/vim
63 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 genpkg_rules()
68 {
69 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps
70 mkdir -p $fs/usr/share/applications
71 mkdir -p $fs/etc
73 cp -a $install/usr/bin $fs/usr
74 cp -a $install/usr/share/vim $fs/usr/share
75 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
76 cp -a stuff/gvim.desktop $fs/usr/share/applications
77 cp -a $install/etc/vim $fs/etc
78 }
80 post_install()
81 {
82 cmd=$(readlink "$1/bin/vi")
83 if [ ! "$cmd" = '/usr/bin/vim' ]
84 then
85 echo ""
86 echo "**** Actual vi link : $cmd"
87 echo ""
88 echo -n "Do you want vim for /bin/vi (y/N) ? : "
89 read -t 30 answer
90 if [ "$answer" = 'y' ]
91 then
92 echo ""
93 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
94 rm "$1/bin/vi" &&
95 ln -sf /usr/bin/vim "$1/bin/vi"
96 status
97 else
98 echo ""
99 echo "Leaving /bin/vi to : $cmd"
100 fi
101 fi
102 }
104 post_remove()
105 {
106 # restore previous symbolic link
107 ln -sf busybox "$1/bin/vi"
108 }