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.

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