gst1-plugins-base: update to 1.22.8
[feed/packages.git] / libs / liblz4 / Makefile
1 #
2 # Copyright (C) 2015 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:=lz4
11 PKG_VERSION:=1.9.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/lz4/lz4/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b
17
18 PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
19
20 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_lz4
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/meson.mk
24
25 MESON_BUILD_DIR:=$(PKG_BUILD_DIR)/contrib/meson/openwrt-build
26
27 define Package/lz4/Default
28 SUBMENU:=Compression
29 URL:=https://www.lz4.org/
30 endef
31
32 define Package/liblz4
33 $(call Package/lz4/Default)
34 SECTION:=libs
35 CATEGORY:=Libraries
36 TITLE:=Extremely fast compression
37 LICENSE:=BSD-2-Clause
38 LICENSE_FILES:=LICENSE lib/LICENSE
39 ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
40 MENU:=1
41 endef
42
43 define Package/liblz4/description
44 LZ4 is a compression codec that features a very fast encoder and an
45 even faster decoder. This package provides the liblz4 shared library.
46 endef
47
48 define Package/liblz4/config
49 source "$(SOURCE)/Config.in"
50 endef
51
52 define Package/lz4
53 $(call Package/lz4/Default)
54 SECTION:=utils
55 CATEGORY:=Utilities
56 TITLE:=Extremely fast compression
57 LICENSE:=GPL-2.0-or-later
58 LICENSE_FILES:=LICENSE programs/COPYING
59 DEPENDS:=+liblz4
60 endef
61
62 define Package/lz4/description
63 LZ4 - Fast real-time compression algorithm.
64 This package provides the lz4 binaries.
65 endef
66
67 MESON_ARGS += \
68 -Ddebug-level=0 \
69 -Dunstable=false \
70 -Dprograms=$(if $(CONFIG_PACKAGE_lz4),true,false) \
71 -Dtests=false \
72 -Dcontrib=false \
73 -Dexamples=false \
74 -Db_lto=false
75
76 ifeq ($(CONFIG_LZ4_OPTIMIZE_SPEED),y)
77 TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
78 endif
79
80 define Build/InstallDev
81 $(INSTALL_DIR) $(1)/usr/include
82 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib
85 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/liblz4.pc $(1)/usr/lib/pkgconfig
87 endef
88
89 define Package/liblz4/install
90 $(INSTALL_DIR) $(1)/usr/lib
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so.$(ABI_VERSION)* $(1)/usr/lib/
92 endef
93
94 define Package/lz4/install
95 $(INSTALL_DIR) $(1)/usr/bin
96 $(CP) $(PKG_INSTALL_DIR)/usr/bin/{lz4,lz4c,lz4cat,unlz4} $(1)/usr/bin/
97 endef
98
99 $(eval $(call BuildPackage,liblz4))
100 $(eval $(call BuildPackage,lz4))