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.

100 lines
2.2 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=unrar
  7. PKG_VERSION:=5.6.8
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://www.rarlab.com/rar
  11. PKG_HASH:=a4cc0ac14a354827751912d2af4a0a09e2c2129df5766576fa7e151791dd3dff
  12. PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
  13. Ted Hess <thess@kitschensync.net>
  14. PKG_LICENSE:=UnRAR
  15. PKG_LICENSE_FILES:=license.txt
  16. PKG_CPE_ID:=cpe:/a:rarlab:unrar
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/unrar
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/uclibc++.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/unrar/Default
  22. TITLE:=UnRAR
  23. SUBMENU:=Compression
  24. URL:=https://www.rarlab.com/
  25. DEPENDS:=$(CXX_DEPENDS) +libpthread
  26. endef
  27. define Package/unrar
  28. $(call Package/unrar/Default)
  29. SECTION:=utils
  30. CATEGORY:=Utilities
  31. TITLE+= (application)
  32. VARIANT:=bin
  33. endef
  34. define Package/libunrar
  35. $(call Package/unrar/Default)
  36. SECTION:=libs
  37. CATEGORY:=Libraries
  38. TITLE+= (library)
  39. VARIANT:=lib
  40. endef
  41. define Package/unrar/description
  42. UnRAR is an application that can decompress files and archives created using
  43. the RAR compression scheme
  44. endef
  45. define Package/libunrar/description
  46. UnRAR library is a shared library that provides file extraction from RAR
  47. archives
  48. endef
  49. MAKE_FLAGS += \
  50. LDFLAGS="$(TARGET_LDFLAGS) -lpthread"
  51. ifeq ($(BUILD_VARIANT),lib)
  52. define Build/Compile
  53. $(call Build/Compile/Default,lib)
  54. endef
  55. define Build/Install
  56. $(call Build/Install/Default,install-lib)
  57. endef
  58. define Build/InstallDev
  59. $(INSTALL_DIR) $(1)/usr/include/unrar
  60. $(CP) $(PKG_BUILD_DIR)/*.hpp $(1)/usr/include/unrar/
  61. $(INSTALL_DIR) $(1)/usr/lib
  62. $(CP) $(PKG_INSTALL_DIR)/lib/libunrar.so $(1)/usr/lib/
  63. endef
  64. else
  65. define Build/Compile
  66. $(call Build/Compile/Default,unrar)
  67. endef
  68. define Build/Install
  69. $(call Build/Install/Default,install-unrar)
  70. endef
  71. endif
  72. define Package/unrar/install
  73. $(INSTALL_DIR) $(1)/usr/bin
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/unrar $(1)/usr/bin/
  75. endef
  76. define Package/libunrar/install
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/lib/libunrar.so $(1)/usr/lib/
  79. endef
  80. $(eval $(call BuildPackage,unrar))
  81. $(eval $(call BuildPackage,libunrar))