2
0

Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #
  2. # Copyright (C) 2022 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=libdeflate
  8. PKG_VERSION:=1.22
  9. PKG_RELEASE:=1
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate/releases/download/v$(PKG_VERSION)
  12. PKG_HASH:=7834d9adbc9a809e0fb0d7b486060a9ae5f7819eb7f55bb8c22b10d7b3bed8da
  13. include $(INCLUDE_DIR)/host-build.mk
  14. DECOMPRESS_CMD:=$(STAGING_DIR_HOST)/bin/gzip -dc $(DL_DIR)/$(PKG_SOURCE) |
  15. define Host/Compile
  16. $(HOSTCC_NOCACHE) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
  17. $(HOST_BUILD_DIR)/lib/*{,/*}.c \
  18. $(HOST_BUILD_DIR)/programs/{gzip,prog_util,tgetopt}.c \
  19. -o $(HOST_BUILD_DIR)/libdeflate-gzip
  20. endef
  21. define Host/Install
  22. $(INSTALL_BIN) $(HOST_BUILD_DIR)/libdeflate-gzip $(STAGING_DIR_HOST)/bin/
  23. $(LN) libdeflate-gzip $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
  24. endef
  25. define Host/Uninstall
  26. $(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gzip
  27. $(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
  28. $(call Host/Uninstall/Default)
  29. endef
  30. $(eval $(call HostBuild))