openwrt/package/system/fwtool/Makefile
Paul Spooren e8725a932e treewide: use APK compatible version schema
Different from OPKG, APK uses a deterministic version schema which chips
the version into chunks and compares them individually. This enforces a
certain schema which was previously entirely flexible.

 - Releases are added at the very and end prefixed with an `r` like
`1.2.3-r3`.
- Hashes are prefixed with a `~` like `1.2.3~abc123`.
- Dates become semantic versions, like `2024.04.01`
- Extra tags are possible like `_git`, `_alpha` and more.

For full details see the APK test list:
https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/master/test/version.data

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-03-22 22:14:22 +01:00

49 lines
1.1 KiB
Makefile

#
# Copyright (C) Felix Fietkau <nbd@nbd.name>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fwtool
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fwtool.git
PKG_SOURCE_DATE:=2019-11-12
PKG_SOURCE_VERSION:=8f7fe925ca205c8e8e2d0d1b16218c1e148d5173
PKG_MIRROR_HASH:=f8309d4cf548ce28d98f8f8313d78e17307ded135b96b49bfbc9ac6b039d8689
CMAKE_INSTALL:=1
PKG_FLAGS:=nonshared
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER := Felix Fietkau <nbd@nbd.name>
PKG_BUILD_DEPENDS := fwtool/host
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk
HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
define Package/fwtool
SECTION:=utils
CATEGORY:=Base system
TITLE:=Utility for appending and extracting firmware metadata and signatures
endef
define Host/Install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/fwtool $(1)/bin/
endef
define Package/fwtool/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwtool $(1)/usr/bin/
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,fwtool))