2024-03-17 17:11:48 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=apk
|
2024-11-19 12:48:06 +00:00
|
|
|
PKG_RELEASE:=1
|
2024-03-17 17:11:48 +00:00
|
|
|
|
|
|
|
PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
|
|
|
|
PKG_SOURCE_PROTO:=git
|
2024-11-19 12:48:06 +00:00
|
|
|
PKG_SOURCE_DATE:=2024-11-13
|
|
|
|
PKG_SOURCE_VERSION:=e3464d096708b270138653ef93db59134bb24813
|
|
|
|
PKG_MIRROR_HASH:=cc633e5c294c9d92391fba5537dfe2f12f82011b55d282beb0d5d7ceba212962
|
2024-03-17 17:11:48 +00:00
|
|
|
|
|
|
|
PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
|
|
|
|
|
|
|
|
PKG_MAINTAINER:=Paul Spooren <mail@aparcar.org>
|
|
|
|
PKG_LICENSE:=GPL-2.0-only
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
2024-11-13 13:27:16 +00:00
|
|
|
PKG_INSTALL:=2
|
2024-03-17 17:11:48 +00:00
|
|
|
|
|
|
|
HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
|
apk: host: make the help available
Currently, the apk utility lacks accessible help documentation, making
it cumbersome for human users:
apk-tools 3.0.0_pre20240519, compiled for x86_64.
ERROR: This apk-tools has been built without help
This absence of help forces users to delve into the apk's build
directory to understand its functionality. To enhance usability, we will
enable the help feature for the host build. The host environment can
accommodate the 3% increase in binary size for the added convenience.
On Ubuntu 22.04, x86_64 platform, the apk size increases by 17,816 bytes
(from 594,144 to 611,960 bytes), a 2.99% increase. This is a reasonable
trade-off for improved ergonomics.
Additionally fix the Lua host build dependency as apk-tools uses during
the build Lua to convert SCDOC manpages to apk-tools help messages.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/15543
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-10 09:43:23 +00:00
|
|
|
HOST_BUILD_DEPENDS:=lua/host
|
2024-03-17 17:11:48 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
include $(INCLUDE_DIR)/meson.mk
|
|
|
|
|
|
|
|
define Package/apk/default
|
|
|
|
SECTION:=base
|
|
|
|
CATEGORY:=Base system
|
|
|
|
TITLE:=apk package manager
|
|
|
|
DEPENDS:=+zlib
|
|
|
|
URL:=$(PKG_SOURCE_URL)
|
2024-05-17 18:47:46 +00:00
|
|
|
PROVIDES:=apk
|
2024-03-17 17:11:48 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/apk-mbedtls
|
|
|
|
$(Package/apk/default)
|
|
|
|
TITLE += (mbedtls)
|
|
|
|
DEPENDS +=+libmbedtls
|
2024-11-11 18:52:14 +00:00
|
|
|
DEFAULT:=y if USE_APK
|
2024-03-17 17:11:48 +00:00
|
|
|
VARIANT:=mbedtls
|
|
|
|
DEFAULT_VARIANT:=1
|
|
|
|
CONFLICTS:=apk-openssl
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/apk-openssl
|
|
|
|
$(Package/apk/default)
|
|
|
|
TITLE += (openssl)
|
|
|
|
DEPENDS +=+libopenssl
|
|
|
|
VARIANT:=openssl
|
|
|
|
endef
|
|
|
|
|
|
|
|
MESON_HOST_VARS+=VERSION=$(PKG_VERSION)
|
|
|
|
MESON_VARS+=VERSION=$(PKG_VERSION)
|
|
|
|
|
2024-11-14 11:01:40 +00:00
|
|
|
MESON_COMMON_ARGS = \
|
2024-03-17 17:11:48 +00:00
|
|
|
-Dcompressed-help=false \
|
|
|
|
-Ddocs=disabled \
|
2024-11-14 11:03:44 +00:00
|
|
|
-Dhelp=enabled \
|
2024-11-14 11:01:40 +00:00
|
|
|
-Dlua_version=5.1 \
|
2024-10-25 20:35:02 +00:00
|
|
|
-Durl_backend=wget \
|
2024-03-17 17:11:48 +00:00
|
|
|
-Dzstd=false
|
|
|
|
|
2024-11-14 11:01:40 +00:00
|
|
|
MESON_HOST_ARGS += \
|
|
|
|
$(MESON_COMMON_ARGS) \
|
|
|
|
-Dcrypto_backend=openssl
|
|
|
|
|
2024-03-17 17:11:48 +00:00
|
|
|
MESON_ARGS += \
|
2024-11-14 11:01:40 +00:00
|
|
|
$(MESON_COMMON_ARGS) \
|
|
|
|
-Dcrypto_backend=$(BUILD_VARIANT)
|
2024-03-17 17:11:48 +00:00
|
|
|
|
2024-11-13 13:27:16 +00:00
|
|
|
define Package/apk/conffiles
|
|
|
|
/etc/apk/repositories.d/customfeeds.list
|
|
|
|
endef
|
|
|
|
|
|
|
|
Package/apk-mbedtls/conffiles = $(Package/apk/conffiles)
|
|
|
|
Package/apk-openssl/conffiles = $(Package/apk/conffiles)
|
|
|
|
|
2024-03-17 17:11:48 +00:00
|
|
|
define Package/apk/default/install
|
|
|
|
$(INSTALL_DIR) $(1)/lib/apk/db
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/apk $(1)/usr/bin/apk
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libapk.so.* $(1)/usr/lib/
|
2024-11-13 13:27:16 +00:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/etc/apk/repositories.d
|
|
|
|
$(INSTALL_DATA) ./files/customfeeds.list $(1)/etc/apk/repositories.d/customfeeds.list
|
2024-03-17 17:11:48 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
Package/apk-mbedtls/install = $(Package/apk/default/install)
|
|
|
|
Package/apk-openssl/install = $(Package/apk/default/install)
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,apk-mbedtls))
|
|
|
|
$(eval $(call BuildPackage,apk-openssl))
|
|
|
|
$(eval $(call HostBuild))
|