small-package/upx/Makefile

58 lines
1.5 KiB
Makefile
Raw Normal View History

2024-03-29 12:36:22 +08:00
# SPDX-License-Identifier: GPL-3.0-only
2023-09-26 00:24:02 +08:00
#
2024-03-29 12:36:22 +08:00
# Copyright (C) 2022 ImmortalWrt.org
2023-09-26 00:24:02 +08:00
include $(TOPDIR)/rules.mk
PKG_NAME:=upx
2024-05-10 04:16:40 +08:00
PKG_VERSION:=4.2.4
2023-09-26 00:24:02 +08:00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.xz
2024-03-29 12:36:22 +08:00
PKG_SOURCE_URL:=https://github.com/upx/upx/releases/download/v$(PKG_VERSION)
2024-05-10 04:16:40 +08:00
PKG_HASH:=5ed6561607d27fb4ef346fc19f08a93696fa8fa127081e7a7114068306b8e1c4
2023-09-26 00:24:02 +08:00
2024-03-29 12:36:22 +08:00
PKG_LICENSE:=GPL-2.0-or-later
2023-09-26 00:24:02 +08:00
PKG_LICENSE_FILES:=COPYING LICENSE
2024-03-29 12:36:22 +08:00
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
2023-09-26 00:24:02 +08:00
2024-03-29 12:36:22 +08:00
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)-src
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-src
CMAKE_BINARY_SUBDIR:=openwrt-build
PKG_BUILD_FLAGS:=no-mips16
2023-09-26 00:24:02 +08:00
include $(INCLUDE_DIR)/host-build.mk
2024-03-29 12:36:22 +08:00
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
2023-09-26 00:24:02 +08:00
define Package/upx
SECTION:=utils
CATEGORY:=Utilities
2024-03-29 12:36:22 +08:00
SUBMENU:=Compression
2023-09-26 00:24:02 +08:00
TITLE:=The Ultimate Packer for eXecutables
2024-03-29 12:36:22 +08:00
URL:=https://upx.github.io
DEPENDS:=+libstdcpp
2023-09-26 00:24:02 +08:00
endef
2024-03-29 12:36:22 +08:00
CMAKE_OPTS:= \
-DUPX_CONFIG_DISABLE_GITREV=ON \
-DUPX_CONFIG_DISABLE_SELF_PACK_TEST=ON
CMAKE_HOST_OPTIONS+= $(CMAKE_OPTS)
CMAKE_OPTIONS+= $(CMAKE_OPTS)
2023-09-26 00:24:02 +08:00
2024-03-29 12:36:22 +08:00
define Package/upx/description
UPX is an advanced executable file compressor. UPX will typically
reduce the file size of programs and DLLs by around 50%-70%, thus
reducing disk space, network load times, download times and
other distribution and storage costs.
2023-09-26 00:24:02 +08:00
endef
define Package/upx/install
$(INSTALL_DIR) $(1)/usr/bin
2024-03-29 12:36:22 +08:00
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upx $(1)/usr/bin/
2023-09-26 00:24:02 +08:00
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,upx))