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.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:=6.0.7
  8. PKG_RELEASE:=$(AUTORELEASE)
  9. PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://www.rarlab.com/rar
  11. PKG_HASH:=a7029942006cbcced3f3b7322ec197683f8e7be408972ca08099b196c038f518
  12. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/unrar
  13. PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>, \
  14. Ted Hess <thess@kitschensync.net>
  15. PKG_LICENSE:=UnRAR
  16. PKG_LICENSE_FILES:=license.txt
  17. PKG_CPE_ID:=cpe:/a:rarlab:unrar
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. TARGET_CXXFLAGS +=-fno-rtti -flto
  22. TARGET_LDFLAGS +=$(FPIC) -Wl,--gc-sections $(if $(CONFIG_USE_GLIBC),-lpthread)
  23. define Package/unrar/Default
  24. TITLE:=UnRAR
  25. SUBMENU:=Compression
  26. URL:=https://www.rarlab.com/
  27. DEPENDS:=+libstdcpp +libpthread
  28. endef
  29. define Package/unrar
  30. $(call Package/unrar/Default)
  31. SECTION:=utils
  32. CATEGORY:=Utilities
  33. TITLE+= (application)
  34. VARIANT:=bin
  35. endef
  36. define Package/libunrar
  37. $(call Package/unrar/Default)
  38. SECTION:=libs
  39. CATEGORY:=Libraries
  40. TITLE+= (library)
  41. VARIANT:=lib
  42. endef
  43. define Package/unrar/description
  44. UnRAR is an application that can decompress files and archives created using
  45. the RAR compression scheme
  46. endef
  47. define Package/libunrar/description
  48. UnRAR library is a shared library that provides file extraction from RAR
  49. archives
  50. endef
  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))