2 # Copyright (C) 2013-2015 OpenWrt.org
3 # Copyright (C) 2017 Daniel Engberg <daniel.engberg.lists@pyret.net>
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=@SF
/lzmautils \
18 PKG_MD5SUM
:=fd9ca16de1052aac899ad3495ad20dfa906c27b4a5070102a2ec35ca3a4740c1
20 PKG_LICENSE
:=Public-Domain LGPL-2.1
+ GPL-2.0
+ GPL-3.0
+
21 PKG_LICENSE_FILES
:=COPYING
22 PKG_MAINTAINER
:=Nicolas Thill
<nico@openwrt.org
>
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/xz
/Default
33 URL
:=http
://tukaani.org
/xz
36 define Package
/xz-utils
37 $(call Package
/xz
/Default
)
38 TITLE
:=XZ Utils
(meta
)
42 define Package
/liblzma
43 $(call Package
/xz
/Default
)
47 TITLE
:=liblzma library from XZ Utils
50 # $(1): package name & command in /usr/bin/
51 # $(2): package dependencies
52 # $(3): symbolic links to $(1) in /usr/bin/
53 define BuildSubPackage
56 $(call Package
/xz
/Default
)
57 DEPENDS
:=xz-utils
$(2)
58 TITLE
:=$(1) utility from XZ Utils
61 define Package
/$(1)/description
65 define Package
/$(1)/install
66 $(INSTALL_DIR
) $$(1)/usr
/bin
67 $(CP
) $(foreach f
,$(1) $(3),$(PKG_INSTALL_DIR
)/usr
/bin
/$(f
)) $$(1)/usr
/bin
/
70 $$(eval
$$(call BuildPackage
,$(1)))
76 --enable-assume-ram
=4 \
80 # API uses "restrict" keyword introduced in C99 standard
84 define Build
/InstallDev
85 $(INSTALL_DIR
) $(1)/usr
/include
87 $(PKG_INSTALL_DIR
)/usr
/include/lzma
{,.h
} \
89 $(INSTALL_DIR
) $(1)/usr
/lib
91 $(PKG_INSTALL_DIR
)/usr
/lib
/liblzma.
{a
,so
*} \
93 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
95 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/liblzma.
pc \
96 $(1)/usr
/lib
/pkgconfig
/
99 define Package
/xz-utils
/install
103 define Package
/liblzma
/install
104 $(INSTALL_DIR
) $(1)/usr
/lib
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/liblzma.so.
* $(1)/usr
/lib
/
109 $(eval
$(call BuildPackage
,xz-utils
))
110 $(eval
$(call BuildPackage
,liblzma
))
111 $(eval
$(call BuildSubPackage
,lzmadec
, +liblzma
,))
112 $(eval
$(call BuildSubPackage
,lzmainfo
, +liblzma
,))
113 $(eval
$(call BuildSubPackage
,xz
, +liblzma
, lzcat lzma unlzma unxz xzcat
))
114 $(eval
$(call BuildSubPackage
,xzdec
, +liblzma
,))
115 $(eval
$(call BuildSubPackage
,xzdiff
, +bash
+xz
, lzcmp lzdiff xzcmp
))
116 $(eval
$(call BuildSubPackage
,xzgrep
, +bash
+xz
, lzegrep lzfgrep lzgrep xzegrep xzfgrep
))
117 $(eval
$(call BuildSubPackage
,xzless
, +bash
+xz
, lzless
))
118 $(eval
$(call BuildSubPackage
,xzmore
, +bash
+xz
, lzmore
))