diff --git a/src/Dockerfile.centos b/src/Dockerfile.centos index c03f43a..aed4120 100644 --- a/src/Dockerfile.centos +++ b/src/Dockerfile.centos @@ -1,8 +1,10 @@ -FROM centos:centos7 +FROM centos:centos6 MAINTAINER Junegunn Choi # yum -RUN yum install -y git gcc make tar ncurses-devel +RUN yum install -y git gcc make tar glibc-devel glibc-devel.i686 \ + ncurses-devel ncurses-static ncurses-devel.i686 \ + gpm-devel gpm-static libgcc.i686 # Install Go 1.4 RUN cd / && curl \ @@ -13,6 +15,9 @@ ENV GOPATH /go ENV GOROOT /go1.4 ENV PATH /go1.4/bin:$PATH +# For i386 build +RUN cd $GOROOT/src && GOARCH=386 ./make.bash + # Volume VOLUME /go diff --git a/src/Makefile b/src/Makefile index dee7e80..8c80ee2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -62,6 +62,9 @@ docker-arch: docker-ubuntu: docker build -t junegunn/ubuntu-sandbox - < Dockerfile.ubuntu +docker-centos: + docker build -t junegunn/centos-sandbox - < Dockerfile.centos + arch: docker-arch docker run -i -t -v $(GOPATH):/go junegunn/$@-sandbox \ sh -c 'cd /go/src/github.com/junegunn/fzf/src; /bin/bash' @@ -70,9 +73,13 @@ ubuntu: docker-ubuntu docker run -i -t -v $(GOPATH):/go junegunn/$@-sandbox \ sh -c 'cd /go/src/github.com/junegunn/fzf/src; /bin/bash' -linux: docker-ubuntu - docker run -i -t -v $(GOPATH):/go junegunn/ubuntu-sandbox \ +centos: docker-centos + docker run -i -t -v $(GOPATH):/go junegunn/$@-sandbox \ + sh -c 'cd /go/src/github.com/junegunn/fzf/src; /bin/bash' + +linux: docker-centos + docker run -i -t -v $(GOPATH):/go junegunn/centos-sandbox \ /bin/bash -ci 'cd /go/src/github.com/junegunn/fzf/src; make' .PHONY: all build release test install uninstall clean docker \ - linux arch ubuntu docker-arch docker-ubuntu + linux arch ubuntu centos docker-arch docker-ubuntu docker-centos diff --git a/src/curses/curses.go b/src/curses/curses.go index 2c4cb0d..5339ec9 100644 --- a/src/curses/curses.go +++ b/src/curses/curses.go @@ -5,7 +5,7 @@ package curses #include #cgo darwin LDFLAGS: -lncurses #cgo linux,386 LDFLAGS: -lncurses -#cgo linux,amd64 LDFLAGS: -l:libncurses.a -l:libtinfo.a -l:libgpm.a +#cgo linux,amd64 LDFLAGS: -l:libncurses.a -l:libtinfo.a -l:libgpm.a -ldl */ import "C"