kumquat-buildroot/package/docker-engine/docker-engine.mk
Victor Huesca 69808c7536 package: remove 'v' prefix from github-fetched packages
On Github, a large number of projects name their tag vXYZ (i.e v3.0,
v0.1, etc.). In some packages we do:

 <pkg>_VERSION = v0.3
 <pkg>_SITE = $(call github foo,bar,$(<pkg>_VERSION))

And in some other packages we do:

 <pkg>_VERSION = 0.3
 <pkg>_SITE = $(call github foo,bar,v$(<pkg>_VERSION))

I.e in one case we consider the version to be v0.3, in the other case
we consider 0.3 to be the version.

The problem with v0.3 is that when used in conjunction with
release-monitoring.org, it doesn't work very well, because
release-monitoring.org has the concept of "version prefix" and using
that they drop the "v" prefix for the version.

Therefore, a number of packages in Buildroot have a version that
doesn't match with release-monitoring.org because Buildroot has 'v0.3'
and release-monitoring.org has '0.3'.

Since really the version number of 0.3, is makes sense to update our
packages to drop this 'v'.

This commit only addresses the (common) case of github packages where
the prefix is simply 'v'. Other cases will be handled by separate
commits. Also, there are a few cases that couldn't be handled
mechanically that aren't covered by this commit.

Signed-off-by: Victor Huesca <victor.huesca@bootlin.com>
[Arnout: don't change flatbuffers, json-for-modern-cpp, libpagekite,
 python-scapy3k, softether]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-19 22:27:55 +02:00

86 lines
2.5 KiB
Makefile

################################################################################
#
# docker-engine
#
################################################################################
DOCKER_ENGINE_VERSION = 18.09.6
DOCKER_ENGINE_SITE = $(call github,docker,engine,v$(DOCKER_ENGINE_VERSION))
DOCKER_ENGINE_LICENSE = Apache-2.0
DOCKER_ENGINE_LICENSE_FILES = LICENSE
DOCKER_ENGINE_DEPENDENCIES = host-pkgconf
DOCKER_ENGINE_SRC_SUBDIR = github.com/docker/docker
DOCKER_ENGINE_LDFLAGS = \
-X main.GitCommit=$(DOCKER_ENGINE_VERSION) \
-X main.Version=$(DOCKER_ENGINE_VERSION)
DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs autogen
DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
DOCKER_ENGINE_TAGS += seccomp
DOCKER_ENGINE_DEPENDENCIES += libseccomp
endif
ifeq ($(BR2_INIT_SYSTEMD),y)
DOCKER_ENGINE_DEPENDENCIES += systemd
DOCKER_ENGINE_TAGS += systemd journald
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y)
DOCKER_ENGINE_TAGS += experimental
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
DOCKER_ENGINE_DEPENDENCIES += btrfs-progs
else
DOCKER_ENGINE_TAGS += exclude_graphdriver_btrfs
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
DOCKER_ENGINE_DEPENDENCIES += lvm2
else
DOCKER_ENGINE_TAGS += exclude_graphdriver_devicemapper
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS),y)
DOCKER_ENGINE_DEPENDENCIES += gvfs
else
DOCKER_ENGINE_TAGS += exclude_graphdriver_vfs
endif
DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS))
define DOCKER_ENGINE_RUN_AUTOGEN
cd $(@D) && \
BUILDTIME="$$(date)" \
VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \
bash ./hack/make/.go-autogen
endef
DOCKER_ENGINE_POST_CONFIGURE_HOOKS += DOCKER_ENGINE_RUN_AUTOGEN
define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \
$(TARGET_DIR)/usr/lib/systemd/system/docker.service
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \
$(TARGET_DIR)/usr/lib/systemd/system/docker.socket
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
ln -fs ../../../../usr/lib/systemd/system/docker.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service
endef
define DOCKER_ENGINE_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/docker-engine/S60dockerd \
$(TARGET_DIR)/etc/init.d/S60dockerd
endef
define DOCKER_ENGINE_USERS
- - docker -1 * - - - Docker Application Container Framework
endef
$(eval $(golang-package))