Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vim to v9.0.1582 & fix alpine to v3.18 #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 33 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,41 @@
#!/bin/bash

docker run -i --rm -v "$PWD":/out -w /root alpine /bin/sh <<EOF
apk add gcc make musl-dev ncurses-static
wget https://github.com/vim/vim/archive/v8.1.1045.tar.gz
tar xvfz v8.1.1045.tar.gz
docker run -i --rm -e vim_version=9.0.1582 -v "$PWD":/out -w /root alpine:3.18 /bin/sh <<EOF
set -e

# install build-time dependencies
apk add gcc make musl-dev ncurses-static curl upx

# download vim tarball and extract it
curl -Ls https://github.com/vim/vim/archive/refs/tags/v\$vim_version.tar.gz | tar xz
cd vim-*
LDFLAGS="-static" ./configure --disable-channel --disable-gpm --disable-gtktest --disable-gui --disable-netbeans --disable-nls --disable-selinux --disable-smack --disable-sysmouse --disable-xsmp --enable-multibyte --with-features=huge --without-x --with-tlib=ncursesw
make

# configure, compile and install
LDFLAGS="-static" \
./configure --disable-channel \
--disable-gpm \
--disable-gtktest \
--disable-gui \
--disable-netbeans \
--disable-nls \
--disable-selinux \
--disable-smack \
--disable-sysmouse \
--disable-xsmp \
--enable-multibyte \
--with-features=huge \
--without-x \
--with-tlib=ncursesw
make -j3
make install

# copy compiled output
mkdir -p /out/vim
cp -r /usr/local/* /out/vim
strip /out/bin/vim

# make it smaller
strip /out/vim/bin/vim
upx /out/vim/bin/vim

chown -R $(id -u):$(id -g) /out/vim
EOF