Merge pull request #3260 from cshore/pull-request-gitolite
[feed/packages.git] / utils / unrar / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=unrar
11 PKG_VERSION:=5.4.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.rarlab.com/rar
16 PKG_MD5SUM:=588b3fadc04eea7372cbfe98e4709aee
17 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
18
19 PKG_LICENSE:=UnRAR
20 PKG_LICENSE_FILES:=license.txt
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/unrar
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/uclibc++.mk
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/unrar/Default
29 TITLE:=UnRAR
30 SUBMENU:=Compression
31 URL:=http://www.rarlab.com/
32 DEPENDS:=$(CXX_DEPENDS) +libpthread
33 endef
34
35 define Package/unrar
36 $(call Package/unrar/Default)
37 SECTION:=utils
38 CATEGORY:=Utilities
39 TITLE+= (application)
40 VARIANT:=bin
41 endef
42
43 define Package/libunrar
44 $(call Package/unrar/Default)
45 SECTION:=libs
46 CATEGORY:=Libraries
47 TITLE+= (library)
48 VARIANT:=lib
49 endef
50
51 define Package/unrar/description
52 UnRAR is an application that can decompress files and archives created using
53 the RAR compression scheme
54 endef
55
56 define Package/libunrar/description
57 UnRAR library is a shared library that provides file extraction from RAR
58 archives
59 endef
60
61 ifeq ($(BUILD_VARIANT),lib)
62 define Build/Compile
63 $(call Build/Compile/Default,lib)
64 endef
65
66 define Build/Install
67 $(call Build/Install/Default,install-lib)
68 endef
69
70 define Build/InstallDev
71 $(INSTALL_DIR) $(1)/usr/include/unrar
72 $(CP) $(PKG_BUILD_DIR)/*.hpp $(1)/usr/include/unrar/
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_INSTALL_DIR)/lib/libunrar.so $(1)/usr/lib/
75 endef
76 else
77 define Build/Compile
78 $(call Build/Compile/Default,unrar)
79 endef
80
81 define Build/Install
82 $(call Build/Install/Default,install-unrar)
83 endef
84 endif
85
86 define Package/unrar/install
87 $(INSTALL_DIR) $(1)/usr/bin
88 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/unrar $(1)/usr/bin/
89 endef
90
91 define Package/libunrar/install
92 $(INSTALL_DIR) $(1)/usr/lib
93 $(CP) $(PKG_INSTALL_DIR)/lib/libunrar.so $(1)/usr/lib/
94 endef
95
96 $(eval $(call BuildPackage,unrar))
97 $(eval $(call BuildPackage,libunrar))