aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-09-24 09:11:10 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-09-25 12:03:34 +0000
commit39012086b781245da1db14e85b76fadafba7a827 (patch)
treef74f85cadf10a15a26f2b4635601aed7fc808e78 /community/docker/APKBUILD
parent63e8390eac3f3b21d025fa7e9cdd462c5a0aedaa (diff)
community/docker: simplify
get rid of needless _ver variable. This also fixes `docker --version` to be more consistent with the .dep from docker inc. get rid of _apply_patches() and prepare() functions replace _dockerdir variable with builddir and adjust openrc patch
Diffstat (limited to 'community/docker/APKBUILD')
-rw-r--r--community/docker/APKBUILD39
1 files changed, 10 insertions, 29 deletions
diff --git a/community/docker/APKBUILD b/community/docker/APKBUILD
index e2fe3794fad..52b9e37ea1e 100644
--- a/community/docker/APKBUILD
+++ b/community/docker/APKBUILD
@@ -4,8 +4,7 @@
pkgname=docker
pkgver=19.03.2
_gitcommit=6a30dfca03664a0b6bf0646a7d389ee7d0318e6e # https://github.com/docker/docker-ce/commits/v$pkgver
-_ver=${pkgver/_/-}-ce
-pkgrel=0
+pkgrel=1
pkgdesc="Pack, ship and run any application as a lightweight container"
url="https://www.docker.io/"
arch="all"
@@ -15,7 +14,9 @@ makedepends="go go-md2man btrfs-progs-dev bash linux-headers coreutils lvm2-dev
libseccomp-dev"
install="$pkgname.pre-install"
-# from https://github.com/docker/docker-ce/blob/v$pkgver/components/engine/vendor.conf
+# from components/engine/vendor.conf:
+# grep libnetwork components/engine/vendor.conf
+# grep cobra components/engine/vendor.conf
_libnetwork_ver=fc5a7d91d54cc98f64fc28f9e288b46a0bee756c
_cobra_ver="0.0.3"
@@ -45,33 +46,13 @@ source="
docker-openrc-fixes.patch
"
-_dockerdir="$srcdir"/docker-$_ver
-_cli_builddir="$_dockerdir"/components/cli
-_daemon_builddir="$_dockerdir"/components/engine
+builddir="$srcdir"/docker-ce-$pkgver
+_cli_builddir="$builddir"/components/cli
+_daemon_builddir="$builddir"/components/engine
_buildtags="seccomp"
_libnetwork_builddir="$srcdir"/libnetwork-$_libnetwork_ver
-_apply_patches() {
- local _dir="$1"
- local _prefix="$2"
- local i
- msg "applying patches for $_prefix"
- cd "$_dir"
- for i in $source; do
- case $i in
- ${_prefix}-*.patch) msg $i; patch -p1 -i "$srcdir"/$i;;
- esac
- done
-}
-
-prepare() {
- # Rename 'docker-ce-VER' to 'docker-VER'
- mv "$srcdir"/docker-ce-$pkgver "$_dockerdir"
-
- _apply_patches "$_daemon_builddir" docker
-}
-
build() {
export AUTO_GOPATH=1
export GITCOMMIT=$_gitcommit # for cli
@@ -91,7 +72,7 @@ build() {
cd "$_daemon_builddir"
mkdir -p src/github.com/docker/
ln -s "$_daemon_builddir" src/github.com/docker/docker
- GOPATH="$PWD" VERSION="$_ver" hack/make.sh dynbinary
+ GOPATH="$PWD" VERSION="$pkgver" hack/make.sh dynbinary
# Required for building man-pages
export GOPATH="$_cli_builddir"
@@ -103,7 +84,7 @@ build() {
cd "$_cli_builddir"
mkdir -p "$GOPATH"/src/github.com/docker/
ln -s "$_cli_builddir" "$GOPATH"/src/github.com/docker/cli
- LDFLAGS="" make VERSION="$_ver" dynbinary
+ LDFLAGS="" make VERSION="$pkgver" dynbinary
# docker man
msg "building docker man pages"
@@ -216,4 +197,4 @@ cli_vim() {
sha512sums="6b594fdbb53dcc0228781375a3884eb370446738c44f7c1e42945c4ccc263e75f53d984bc8ea6a6a498446859e667305bd967299c12956f1cb925d868a4bf2b8 docker-19.03.2.tar.gz
dea31fd82ab2d445fbd39fe15550a91f7e489a06f6dedd32ea1925f7e9a7971952d26b874f9687249609a0d204ea35da357e0a957b819df2026a0cf8109cb354 libnetwork-fc5a7d91d54cc98f64fc28f9e288b46a0bee756c.tar.gz
c38db9432a168f913b41a1e1b11d84bedfade82ff70791be9d343a6cc86b8a05b18bae344d67ebd8bae4c98662db7ac664a9dc86fa9b9ad4aa5c96cbf0178efb cobra-0.0.3.tar.gz
-d796e6dcab6443a84064f3439dde46bc7e1989e1b52910b3e80a0af0ae1ddd288f0306a24c8d31032e24f5fd4218d2f25614752021355441f118ba2b524cfbd1 docker-openrc-fixes.patch"
+6d3f1e71910a717d52820fbfe81663baadf3f5aa5ab39071d15c02ef49b51fe1978033e1cafc8482a468983bf872ab39d37759b82221778cbb2392a9eac41d65 docker-openrc-fixes.patch"