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.

103 lines
2.3 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.8.4
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://www.rarlab.com/rar
  11. PKG_HASH:=0b7cb2307ef7e65f631496376ce2fdf98b9b0f2136dc4467408ef63f3bf92f96
  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. ifeq ($(CONFIG_USE_UCLIBCXX),y)
  22. TARGET_LDFLAGS +=-nodefaultlibs
  23. endif
  24. TARGET_CXXFLAGS +=-fno-rtti -flto
  25. TARGET_LDFLAGS +=$(FPIC) -Wl,--gc-sections
  26. define Package/unrar/Default
  27. TITLE:=UnRAR
  28. SUBMENU:=Compression
  29. URL:=https://www.rarlab.com/
  30. DEPENDS:=$(CXX_DEPENDS) +libpthread
  31. endef
  32. define Package/unrar
  33. $(call Package/unrar/Default)
  34. SECTION:=utils
  35. CATEGORY:=Utilities
  36. TITLE+= (application)
  37. VARIANT:=bin
  38. endef
  39. define Package/libunrar
  40. $(call Package/unrar/Default)
  41. SECTION:=libs
  42. CATEGORY:=Libraries
  43. TITLE+= (library)
  44. VARIANT:=lib
  45. endef
  46. define Package/unrar/description
  47. UnRAR is an application that can decompress files and archives created using
  48. the RAR compression scheme
  49. endef
  50. define Package/libunrar/description
  51. UnRAR library is a shared library that provides file extraction from RAR
  52. archives
  53. endef
  54. ifeq ($(BUILD_VARIANT),lib)
  55. define Build/Compile
  56. $(call Build/Compile/Default,lib)
  57. endef
  58. define Build/Install
  59. $(call Build/Install/Default,install-lib)
  60. endef
  61. define Build/InstallDev
  62. $(INSTALL_DIR) $(1)/usr/include/unrar
  63. $(CP) $(PKG_BUILD_DIR)/*.hpp $(1)/usr/include/unrar/
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/lib/libunrar.so $(1)/usr/lib/
  66. endef
  67. else
  68. define Build/Compile
  69. $(call Build/Compile/Default,unrar)
  70. endef
  71. define Build/Install
  72. $(call Build/Install/Default,install-unrar)
  73. endef
  74. endif
  75. define Package/unrar/install
  76. $(INSTALL_DIR) $(1)/usr/bin
  77. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/unrar $(1)/usr/bin/
  78. endef
  79. define Package/libunrar/install
  80. $(INSTALL_DIR) $(1)/usr/lib
  81. $(CP) $(PKG_INSTALL_DIR)/lib/libunrar.so $(1)/usr/lib/
  82. endef
  83. $(eval $(call BuildPackage,unrar))
  84. $(eval $(call BuildPackage,libunrar))