lede/package/lean/upx/Makefile
AmadeusGhost a5c98133c2 upx: witch to the release version
There is no reason to use a date to download source.
2022-12-02 21:18:16 +08:00

63 lines
1.4 KiB
Makefile

#
# Copyright (C) 2011-2020 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=upx
PKG_VERSION:=3.96
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/upx/upx.git
PKG_SOURCE_VERSION:=d7ba31cab8ce8d95d2c10e88d2ec787ac52005ef
PKG_MIRROR_HASH:=15b4884dbe35d3b7bda27538429cab92aaeaca006d558deb49f2ef93e3c261b8
PKG_MAINTAINER:=Xingwang Liao <kuoruan@gmail.com>
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING LICENSE
HOST_BUILD_DEPENDS:=ucl/host
MAKE_PATH:=src
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/upx
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libucl +libstdcpp +zlib
TITLE:=The Ultimate Packer for eXecutables
URL:=https://upx.github.io/
endef
define Package/upx/description
UPX is a free, secure, portable, extendable, high-performance
executable packer for several executable formats.
endef
define Host/Compile
UPX_UCLDIR=$(STAGING_DIR_HOST) \
$(MAKE) -C $(HOST_BUILD_DIR)/src \
LDFLAGS="$(HOST_LDFLAGS)" \
CXX="$(HOSTCXX)"
endef
define Host/Install
$(CP) $(HOST_BUILD_DIR)/src/upx.out $(STAGING_DIR_HOST)/bin/upx
endef
define Host/Clean
rm -f $(STAGING_DIR_HOST)/bin/upx
endef
define Package/upx/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/upx.out $(1)/usr/bin/upx
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,upx))