Browse Source

unrar: add libunrar support

Closes https://github.com/openwrt/packages/pull/1882

Signed-off-by: Nikolay Podoprigora volzhanin@gmail.com
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Álvaro Fernández Rojas 9 years ago
parent
commit
6cb3979f21
1 changed files with 33 additions and 8 deletions
  1. 33
    8
      utils/unrar/Makefile

+ 33
- 8
utils/unrar/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=unrar
11 11
 PKG_VERSION:=5.3.5
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=unrarsrc-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=http://www.rarlab.com/rar
@@ -25,21 +25,40 @@ PKG_INSTALL:=1
25 25
 include $(INCLUDE_DIR)/uclibc++.mk
26 26
 include $(INCLUDE_DIR)/package.mk
27 27
 
28
-define Package/unrar
29
-  SECTION:=utils
30
-  CATEGORY:=Utilities
28
+define Package/unrar/Default
29
+  TITLE:=UnRAR
31 30
   SUBMENU:=Compression
32
-  TITLE:=UnRAR application
33 31
   URL:=http://www.rarlab.com/
34 32
   DEPENDS:=$(CXX_DEPENDS) +libpthread
35 33
 endef
36 34
 
35
+define Package/unrar
36
+$(call Package/unrar/Default)
37
+  SECTION:=utils
38
+  CATEGORY:=Utilities
39
+  TITLE+= (application)
40
+endef
41
+
42
+define Package/libunrar
43
+$(call Package/unrar/Default)
44
+  SECTION:=libs
45
+  CATEGORY:=Libraries
46
+  TITLE+= (library)
47
+endef
48
+
37 49
 define Package/unrar/description
38
-   UnRAR is an application that can decompress files and archives created using
39
-   the RAR compression scheme
50
+  UnRAR is an application that can decompress files and archives created using
51
+  the RAR compression scheme
40 52
 endef
41 53
 
42
-define Build/Configure
54
+define Package/libunrar/description
55
+  UnRAR library is a shared library that provides file extraction from RAR
56
+  archives
57
+endef
58
+
59
+define Build/Compile
60
+	$(call Build/Compile/Default,unrar)
61
+	$(call Build/Compile/Default,lib)
43 62
 endef
44 63
 
45 64
 define Package/unrar/install
@@ -47,4 +66,10 @@ define Package/unrar/install
47 66
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/unrar $(1)/usr/bin/
48 67
 endef
49 68
 
69
+define Package/libunrar/install
70
+	$(INSTALL_DIR) $(1)/usr/lib
71
+	$(CP) $(PKG_BUILD_DIR)/libunrar.so $(1)/usr/lib/
72
+endef
73
+
50 74
 $(eval $(call BuildPackage,unrar))
75
+$(eval $(call BuildPackage,libunrar))