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. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=unrar
  9. PKG_VERSION:=5.4.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.rarlab.com/rar
  13. PKG_HASH:=e470c584332422893fb52e049f2cbd99e24dc6c6da971008b4e2ae4284f8796c
  14. PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
  15. PKG_LICENSE:=UnRAR
  16. PKG_LICENSE_FILES:=license.txt
  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:=http://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))