Merge pull request #4853 from StevenHessing/noddos
[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 # Although liblz4 exports a major.minor.patch version, it isn't always
11 # incremented for new releases. Check the NEWS file and instead use a
12 # release tag when appropriate. (eg: PKG_VERSION:=r131)
13 PKG_NAME:=liblz4
14 PKG_VERSION:=v1.7.5
15 PKG_RELEASE:=1
16
17 PKG_LICENSE:=BSD-2-Clause
18 PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
19
20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
21 PKG_MIRROR_HASH:=afb362b970816e06dac4997d26dd7d2cdb83168510228d174d25b1044b271e18
22 PKG_SOURCE_PROTO:=git
23 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
24 PKG_SOURCE_URL:=https://github.com/lz4/lz4.git
25 PKG_SOURCE_VERSION:=$(PKG_VERSION)
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/liblz4
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=Extremely fast compression
33 URL:=http://www.lz4.org/
34 endef
35
36 define Package/liblz4/description
37 LZ4 is a compression codec that features a very fast encoder and an
38 even faster decoder. This package provides the liblz4 shared library.
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42
43 define Build/Compile
44 $(MAKE) -C "$(PKG_BUILD_DIR)/lib" $(MAKE_INSTALL_FLAGS) \
45 CC="$(TARGET_CC)" \
46 CFLAGS="$(TARGET_CFLAGS)" \
47 PREFIX="$(CONFIGURE_PREFIX)" \
48 install
49 endef
50
51 define Build/InstallDev
52 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
53 endef
54
55 define Package/liblz4/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,liblz4))