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.

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