libnetwork: add package

This commit is contained in:
Lukas Rusak 2017-01-20 14:55:24 -08:00
parent d774d56b57
commit 80e3838f23
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3

View File

@ -0,0 +1,74 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="libnetwork"
PKG_VERSION="0f53435"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="APL"
PKG_SITE="https://github.com/docker/libnetwork"
PKG_URL="https://github.com/docker/libnetwork/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain go:host"
PKG_SECTION="system"
PKG_SHORTDESC="Libnetwork provides a native Go implementation for connecting containers"
PKG_LONGDESC="Libnetwork provides a native Go implementation for connecting containers"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
pre_make_target() {
case $TARGET_ARCH in
x86_64)
export GOARCH=amd64
;;
arm)
export GOARCH=arm
case $TARGET_CPU in
arm1176jzf-s)
export GOARM=6
;;
cortex-a7)
export GOARM=7
;;
esac
;;
aarch64)
export GOARCH=arm64
;;
esac
export GOOS=linux
export CGO_ENABLED=0
export CGO_NO_EMULATION=1
export CGO_CFLAGS=$CFLAGS
export LDFLAGS="-extld $CC"
export GOLANG=$ROOT/$TOOLCHAIN/lib/golang/bin/go
export GOPATH=$ROOT/$PKG_BUILD.gopath
export GOROOT=$ROOT/$TOOLCHAIN/lib/golang
export PATH=$PATH:$GOROOT/bin
}
make_target() {
mkdir -p bin
$GOLANG build -v -o bin/docker-proxy -a -ldflags "$LDFLAGS" ./cmd/proxy
}
makeinstall_target() {
:
}