2 # Copyright (C) 2013-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://tukaani.org
/xz \
16 http
://fossies.org
/linux
/misc
17 PKG_MD5SUM
:=f90c9a0c8b259aee2234c4e0d7fd70af
19 PKG_LICENSE
:=Public-Domain LGPL-2.1
+ GPL-2.0
+ GPL-3.0
+
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_MAINTAINER
:=Nicolas Thill
<nico@openwrt.org
>
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/xz
/Default
32 URL
:=http
://tukaani.org
/xz
35 define Package
/xz-utils
36 $(call Package
/xz
/Default
)
37 TITLE
:=XZ Utils
(meta
)
41 define Package
/liblzma
42 $(call Package
/xz
/Default
)
46 TITLE
:=liblzma library from XZ Utils
49 # $(1): package name & command in /usr/bin/
50 # $(2): package dependencies
51 # $(3): symbolic links to $(1) in /usr/bin/
52 define BuildSubPackage
55 $(call Package
/xz
/Default
)
56 DEPENDS
:=xz-utils
$(2)
57 TITLE
:=$(1) utility from XZ Utils
60 define Package
/$(1)/description
64 define Package
/$(1)/install
65 $(INSTALL_DIR
) $$(1)/usr
/bin
66 $(CP
) $(foreach f
,$(1) $(3),$(PKG_INSTALL_DIR
)/usr
/bin
/$(f
)) $$(1)/usr
/bin
/
69 $$(eval
$$(call BuildPackage
,$(1)))
75 --enable-assume-ram
=4 \
79 # API uses "restrict" keyword introduced in C99 standard
83 define Build
/InstallDev
84 $(INSTALL_DIR
) $(1)/usr
/include
86 $(PKG_INSTALL_DIR
)/usr
/include/lzma
{,.h
} \
88 $(INSTALL_DIR
) $(1)/usr
/lib
90 $(PKG_INSTALL_DIR
)/usr
/lib
/liblzma.
{a
,so
*} \
92 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
94 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/liblzma.
pc \
95 $(1)/usr
/lib
/pkgconfig
/
98 define Package
/xz-utils
/install
102 define Package
/liblzma
/install
103 $(INSTALL_DIR
) $(1)/usr
/lib
104 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/liblzma.so.
* $(1)/usr
/lib
/
108 $(eval
$(call BuildPackage
,xz-utils
))
109 $(eval
$(call BuildPackage
,liblzma
))
110 $(eval
$(call BuildSubPackage
,lzmadec
, +liblzma
,))
111 $(eval
$(call BuildSubPackage
,lzmainfo
, +liblzma
,))
112 $(eval
$(call BuildSubPackage
,xz
, +liblzma
, lzcat lzma unlzma unxz xzcat
))
113 $(eval
$(call BuildSubPackage
,xzdec
, +liblzma
,))
114 $(eval
$(call BuildSubPackage
,xzdiff
, +bash
+xz
, lzcmp lzdiff xzcmp
))
115 $(eval
$(call BuildSubPackage
,xzgrep
, +bash
+xz
, lzegrep lzfgrep lzgrep xzegrep xzfgrep
))
116 $(eval
$(call BuildSubPackage
,xzless
, +bash
+xz
, lzless
))
117 $(eval
$(call BuildSubPackage
,xzmore
, +bash
+xz
, lzmore
))