Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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_MD5SUM:=588b3fadc04eea7372cbfe98e4709aee
  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. ifeq ($(BUILD_VARIANT),lib)
  50. define Build/Compile
  51. $(call Build/Compile/Default,lib)
  52. endef
  53. define Build/Install
  54. $(call Build/Install/Default,install-lib)
  55. endef
  56. define Build/InstallDev
  57. $(INSTALL_DIR) $(1)/usr/include/unrar
  58. $(CP) $(PKG_BUILD_DIR)/*.hpp $(1)/usr/include/unrar/
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/lib/libunrar.so $(1)/usr/lib/
  61. endef
  62. else
  63. define Build/Compile
  64. $(call Build/Compile/Default,unrar)
  65. endef
  66. define Build/Install
  67. $(call Build/Install/Default,install-unrar)
  68. endef
  69. endif
  70. define Package/unrar/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/unrar $(1)/usr/bin/
  73. endef
  74. define Package/libunrar/install
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) $(PKG_INSTALL_DIR)/lib/libunrar.so $(1)/usr/lib/
  77. endef
  78. $(eval $(call BuildPackage,unrar))
  79. $(eval $(call BuildPackage,libunrar))