Skip to content
Myr

Remove Dockerfiles and clean up Makefile

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Due to the recent removal of ncurses dependency, we can cross-compile binaries for different platforms without virtual machines.

authored by Junegunn Choi · committed by Junegunn Choi · parent 876c233 · Browse files · 5 files+3 added−164 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+3 added−164 removed

  • other:+3 added−164 removed

5 files+3 added−164 removed

deleted:src/Dockerfile.android-40 removed
1FROM ubuntu:14.042MAINTAINER Junegunn Choi <junegunn.c@gmail.com>34# apt-get5RUN apt-get update && apt-get -y upgrade && \6 apt-get install -y --force-yes git curl build-essential78# Install Go 1.49RUN cd / && curl \10 https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | \11 tar -xz && mv go go1.4 && \12 sed -i 's@#define PTHREAD_KEYS_MAX 128@@' /go1.4/src/runtime/cgo/gcc_android_arm.c1314ENV GOROOT /go1.415ENV PATH /go1.4/bin:$PATH1617RUN cd / && \18 curl -O http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin && \19 chmod 755 /android-ndk* && /android-ndk-r10e-linux-x86_64.bin && \20 mv android-ndk-r10e /android-ndk2122RUN cd /android-ndk && bash ./build/tools/make-standalone-toolchain.sh --platform=android-21 --install-dir=/ndk --arch=arm2324ENV NDK_CC /ndk/bin/arm-linux-androideabi-gcc2526RUN cd $GOROOT/src && \27 CC_FOR_TARGET=$NDK_CC GOOS=android GOARCH=arm GOARM=7 ./make.bash2829RUN cd / && curl \30 http://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz | \31 tar -xz && cd /ncurses-5.9 && \32 ./configure CC=$NDK_CC CFLAGS="-fPIE -march=armv7-a -mfpu=neon -mhard-float -Wl,--no-warn-mismatch" LDFLAGS="-march=armv7-a -Wl,--no-warn-mismatch" --host=arm-linux --enable-overwrite --enable-const --without-cxx-binding --without-shared --without-debug --enable-widec --enable-ext-colors --enable-ext-mouse --enable-pc-files --with-pkg-config-libdir=$PKG_CONFIG_LIBDIR --without-manpages --without-ada --disable-shared --without-tests --prefix=/ndk/sysroot/usr --with-default-terminfo-dirs=/usr/share/terminfo --with-terminfo-dirs=/usr/share/terminfo ac_cv_header_locale_h=n ac_cv_func_getpwent=no ac_cv_func_getpwnam=no ac_cv_func_getpwuid=no && \33 sed -i 's@#define HAVE_LOCALE_H 1@/* #undef HAVE_LOCALE_H */@' include/ncurses_cfg.h && \34 make && \35 sed -i '0,/echo.*/{s/echo.*/exit 0/}' misc/run_tic.sh && \36 make install && \37 mv /ndk/sysroot/usr/lib/libncursesw.a /ndk/sysroot/usr/lib/libncurses.a3839# Default CMD40CMD cd /fzf/src && /bin/bash
deleted:src/Dockerfile.arch-24 removed
1FROM base/archlinux:2014.07.032MAINTAINER Junegunn Choi <junegunn.c@gmail.com>34# apt-get5RUN pacman-key --populate archlinux && pacman-key --refresh-keys6RUN pacman-db-upgrade && pacman -Syu --noconfirm base-devel git78# Install Go 1.49RUN cd / && curl \10 https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | \11 tar -xz && mv go go1.41213ENV GOROOT /go1.414ENV PATH /go1.4/bin:$PATH1516# For i386 build17RUN echo '[multilib]' >> /etc/pacman.conf && \18 echo 'Include = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf && \19 pacman-db-upgrade && yes | pacman -Sy gcc-multilib lib32-ncurses && \20 cd $GOROOT/src && GOARCH=386 ./make.bash2122# Default CMD23CMD cd /fzf/src && /bin/bash24
deleted:src/Dockerfile.centos-32 removed
1FROM centos:centos62MAINTAINER Junegunn Choi <junegunn.c@gmail.com>34# yum5RUN yum install -y git gcc make tar glibc-devel glibc-devel.i686 \6 ncurses-devel ncurses-static ncurses-devel.i686 \7 gpm-devel gpm-static libgcc.i68689# Install Go 1.410RUN cd / && curl \11 https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | \12 tar -xz && mv go go1.41314# Install Go 1.715RUN cd / && curl \16 https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz | \17 tar -xz && mv go go1.71819# Install RPMs for building static 32-bit binary20RUN curl ftp://ftp.pbone.net/mirror/ftp.centos.org/6.8/os/i386/Packages/ncurses-static-5.7-4.20090207.el6.i686.rpm -o rpm && rpm -i rpm && \21 curl ftp://ftp.pbone.net/mirror/ftp.centos.org/6.8/os/i386/Packages/gpm-static-1.20.6-12.el6.i686.rpm -o rpm && rpm -i rpm2223ENV GOROOT_BOOTSTRAP /go1.424ENV GOROOT /go1.725ENV PATH /go1.7/bin:$PATH2627# For i386 build28RUN cd $GOROOT/src && GOARCH=386 ./make.bash2930# Default CMD31CMD cd /fzf/src && /bin/bash32
deleted:src/Dockerfile.ubuntu-22 removed
1FROM ubuntu:14.042MAINTAINER Junegunn Choi <junegunn.c@gmail.com>34# apt-get5RUN apt-get update && apt-get -y upgrade && \6 apt-get install -y --force-yes git curl build-essential libncurses-dev libgpm-dev78# Install Go 1.49RUN cd / && curl \10 https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | \11 tar -xz && mv go go1.41213ENV GOROOT /go1.414ENV PATH /go1.4/bin:$PATH1516# For i386 build17RUN apt-get install -y lib32ncurses5-dev && \18 cd $GOROOT/src && GOARCH=386 ./make.bash1920# Default CMD21CMD cd /fzf/src && /bin/bash22
modified:src/Makefile+3 added-46 removed
2 unmodified lines
3ifeq ($(UNAME_S),Darwin)4 GOOS := darwin5else ifeq ($(UNAME_S),Linux)6 GOOS := linux7else8$(error "$$GOOS is not defined.")9endif10endif1112SOURCES := $(wildcard *.go */*.go)13ROOTDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))14BINDIR := $(shell dirname $(ROOTDIR))/bin15GOPATH := $(shell dirname $(ROOTDIR))/gopath16SRCDIR := $(GOPATH)/src/github.com/junegunn/fzf/src15DOCKEROPTS := -i -t -v $(ROOTDIR):/fzf/src17BINARY32 := fzf-$(GOOS)_38618BINARY64 := fzf-$(GOOS)_amd6419BINARYARM5 := fzf-$(GOOS)_arm520BINARYARM6 := fzf-$(GOOS)_arm6
65 unmodified lines
86deps: $(SRCDIR) $(SOURCES)87 cd $(SRCDIR) && go get -tags "$(TAGS)"88 ./deps8989android-build: $(SRCDIR)90 cd $(SRCDIR) && GOARCH=arm GOARM=7 CGO_ENABLED=1 go get91 cd $(SRCDIR)/fzf && GOARCH=arm GOARM=7 CGO_ENABLED=1 go build -a -ldflags="-w -extldflags=-pie" -o $(BINARYARM7)92 cd $(SRCDIR)/fzf && cp $(BINARYARM7) $(RELEASEARM7) && tar -czf $(RELEASEARM7).tgz $(RELEASEARM7) && \93 rm -f $(RELEASEARM7)9490test: deps91 SHELL=/bin/sh GOOS= go test -v -tags "$(TAGS)" ./...9293install: $(BINDIR)/fzf
29 unmodified lines
123124$(BINDIR):125 mkdir -p $@126132docker-arch:133 docker build -t junegunn/arch-sandbox - < Dockerfile.arch134135docker-ubuntu:136 docker build -t junegunn/ubuntu-sandbox - < Dockerfile.ubuntu137138docker-centos:139 docker build -t junegunn/centos-sandbox - < Dockerfile.centos140141docker-android:142 docker build -t junegunn/android-sandbox - < Dockerfile.android143144arch: docker-arch145 docker run $(DOCKEROPTS) junegunn/$@-sandbox \146 sh -c 'cd /fzf/src; /bin/bash'147148ubuntu: docker-ubuntu149 docker run $(DOCKEROPTS) junegunn/$@-sandbox \150 sh -c 'cd /fzf/src; /bin/bash'151152centos: docker-centos153 docker run $(DOCKEROPTS) junegunn/$@-sandbox \154 sh -c 'cd /fzf/src; /bin/bash'155156linux: docker-centos157 docker run $(DOCKEROPTS) junegunn/centos-sandbox \158 /bin/bash -ci 'cd /fzf/src; make TAGS=static release'159160ubuntu-android: docker-android161 docker run $(DOCKEROPTS) junegunn/android-sandbox \162 sh -c 'cd /fzf/src; /bin/bash'163164android: docker-android165 docker run $(DOCKEROPTS) junegunn/android-sandbox \166 /bin/bash -ci 'cd /fzf/src; GOOS=android make android-build'167168.PHONY: all deps release test install uninstall clean \169 linux arch ubuntu centos docker-arch docker-ubuntu docker-centos \170 android-build docker-android ubuntu-android android127.PHONY: all deps release release-all test install uninstall clean