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.

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