1 # Build recipe for vim (tiny).
3 # Copyright (c) 2016-2018 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/tools"
26 tarname=${program}-${version}.tar.gz
29 fetch=http://github.com/vim/vim/archive/v${version}/$tarname
31 homepage=http://www.vim.org
34 The ubiquitous text editor (tiny version).
36 Vim is a highly configurable text editor built to make creating and
37 changing any kind of text very efficient. It is included as \"vi\"
38 with most UNIX systems and with Apple OS X.
40 For more information, visit: $homepage
45 # Source documentation
46 docs="CONTRIBUTING.md README.md"
47 docsdir="${docdir}/${pkgname}-${pkgversion}"
53 unpack "${tardir}/$tarname"
57 # Workaround for the special 'srcdir' variable, it is internally
58 # imported and exported from vim's ./configure
62 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
64 --libdir=/usr/lib${libSuffix} \
71 --disable-icon-cache-update \
72 --disable-desktop-database-update \
73 --with-features=tiny \
74 --with-compiledby="Dragora GNU/Linux-Libre" \
76 --build="$(cc -dumpmachine)"
83 make -j${jobs} DESTDIR="$destdir" install
85 # Do not include this for our "tiny" package
86 rm -rf "${destdir}/usr/share/applications" \
87 "${destdir}/usr/share/icons"
89 # Add wrappers script from Dragora for compatibility mode (vi)
90 cp -f "${worktree}/archive/vim/usr/bin/vi" \
92 chmod 755 "${destdir}/usr/bin/vi"
94 # Compress and link man pages (if needed)
95 if test -d "${destdir}/$mandir"
98 cd "${destdir}/$mandir"
99 find . -type f -exec lzip -9 '{}' +
100 find . -type l | while read -r file
102 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
109 mkdir -p "${destdir}${docsdir}"
110 cp -p $docs "${destdir}${docsdir}"