1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 10:59:13 +02:00
openwrt-packages/utils/docker-compose/Makefile
Javier Marcet 876b0bc194 docker-compose: add PKG_NAME to PKG_SOURCE
Before this change, the tarball was downloaded as vVERSION.tar.gz.
For example, it was v2.26.1.tar.gz and that file was put into the dl folder
within the OpenWrt build system.

After this change, the tarball is properly downloaded as NAME-vVERSION.tar.gz.
In this case, it will look like this: docker-compose-v.2.26.1.tar.gz

The advantages of using this:
- Users, developers will know that what they downloaded (it has name and version)
- The tarball will not be overwritten by another package with the same version.

Signed-off-by: Javier Marcet <javier@marcet.info>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[added commit message]
(cherry picked from commit 261b38c14b)
2024-03-31 15:27:05 +02:00

48 lines
1.4 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=compose
PKG_VERSION:=2.18.1
PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/docker/compose/tar.gz/v${PKG_VERSION}?
PKG_HASH:=192c47c177d9bfd8492ed0c49214af0c740586da6db0b7e9c9a07da37c9dc722
PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16
GO_PKG:=github.com/docker/compose/v2
GO_PKG_BUILD_PKG:=github.com/docker/compose/v2/cmd
GO_PKG_LDFLAGS_X:=github.com/docker/compose/v2/internal.Version=v$(PKG_VERSION)
GO_PKG_TAGS:=e2e,kube
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
define Package/docker-compose
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Docker Compose
URL:=https://github.com/docker/compose
DEPENDS:=$(GO_ARCH_DEPENDS) +docker
endef
define Package/docker-compose/description
Multi-container orchestration for Docker
endef
define Package/docker-compose/install
$(INSTALL_DIR) $(1)/usr/lib/docker/cli-plugins/
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/cmd $(1)/usr/lib/docker/cli-plugins/docker-compose
$(INSTALL_DIR) $(1)/usr/bin/
$(LN) ../lib/docker/cli-plugins/docker-compose $(1)/usr/bin/docker-compose
endef
$(eval $(call GoBinPackage,docker-compose))
$(eval $(call BuildPackage,docker-compose))