You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.8 KiB

  1. #
  2. # Copyright © 2020 David Woodhouse <dwmw2@infradead.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:=minizip-ng
  8. PKG_VERSION:=3.0.2
  9. PKG_RELEASE:=$(AUTORELEASE)
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://codeload.github.com/zlib-ng/minizip-ng/tar.gz/$(PKG_VERSION)?
  12. PKG_HASH:=6ba4b6629c107c27ab526e517bdb105612232f0965a6747f60150e5a04c2fe5a
  13. PKG_MAINTAINER:=David Woodhouse <dwmw2@infradead.org>
  14. PKG_LICENSE:=Zlib
  15. PKG_LICENSE_FILES:=LICENSE
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/cmake.mk
  18. CMAKE_OPTIONS += \
  19. -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
  20. -DINSTALL_INC_DIR=/usr/include/minizip \
  21. -DBUILD_SHARED_LIBS=ON \
  22. -DMZ_BZIP2=OFF \
  23. -DMZ_COMPAT=ON \
  24. -DMZ_ICONV=OFF \
  25. -DMZ_LIBBSD=OFF \
  26. -DMZ_LZMA=OFF \
  27. -DMZ_OPENSSL=OFF \
  28. -DMZ_PKCRYPT=OFF \
  29. -DMZ_ZSTD=OFF
  30. define Package/minizip
  31. TITLE:=Fork of the popular zip manipulation library found in the zlib distribution
  32. SECTION:=libs
  33. CATEGORY:=Libraries
  34. DEPENDS:=+zlib
  35. URL:=https://github.com/nmoinvaz/minizip
  36. endef
  37. define Package/minizip-dev
  38. SECTION:=devel
  39. CATEGORY:=Development
  40. SUBMENU:=Libraries
  41. DEPENDS:=minizip
  42. TITLE:=Development files for the minizip library
  43. endef
  44. define Package/minizip/description
  45. minizip is a zip manipulation library written in C that is supported on Windows, macOS, and Linux
  46. endef
  47. define Package/minizip/install
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libminizip.so.* $(1)/usr/lib/
  50. endef
  51. TARGET_CXXFLAGS += -flto
  52. define Build/InstallDev
  53. $(call Build/InstallDev/cmake,$(1))
  54. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/minizip.pc
  55. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/minizip.pc
  56. endef
  57. $(eval $(call BuildPackage,minizip))