Преглед изворни кода

liblz4: add new package

Signed-off-by: Darik Horn <dajhorn@vanadac.com>
Darik Horn пре 9 година
родитељ
комит
2f46e824a2
1 измењених фајлова са 58 додато и 0 уклоњено
  1. 58
    0
      libs/liblz4/Makefile

+ 58
- 0
libs/liblz4/Makefile Прегледај датотеку

@@ -0,0 +1,58 @@
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, so use the release tag instead.
12
+PKG_NAME:=liblz4
13
+PKG_VERSION:=r129
14
+PKG_RELEASE:=1
15
+
16
+PKG_LICENSE:=BSD-2-Clause
17
+PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
18
+
19
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20
+PKG_SOURCE_PROTO:=git
21
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
22
+PKG_SOURCE_URL:=https://github.com/Cyan4973/lz4.git
23
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/liblz4
28
+	SECTION:=libs
29
+	CATEGORY:=Libraries
30
+	TITLE:=Extremely fast compression
31
+	URL:=http://www.lz4.org/
32
+endef
33
+
34
+define Package/liblz4/description
35
+  LZ4 is a compression codec that features a very fast encoder and an
36
+  even faster decoder. This package provides the liblz4 shared library.
37
+endef
38
+
39
+TARGET_CFLAGS += $(FPIC)
40
+
41
+define Build/Compile
42
+	$(MAKE) -C "$(PKG_BUILD_DIR)/lib" $(MAKE_INSTALL_FLAGS) \
43
+	  CC="$(TARGET_CC)" \
44
+	  CFLAGS="$(TARGET_CFLAGS)" \
45
+	  PREFIX="$(CONFIGURE_PREFIX)" \
46
+	  install
47
+endef
48
+
49
+define Build/InstallDev
50
+	$(CP) $(PKG_INSTALL_DIR)/* $(1)/
51
+endef
52
+
53
+define Package/liblz4/install
54
+	$(INSTALL_DIR) $(1)/usr/lib
55
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib/
56
+endef
57
+
58
+$(eval $(call BuildPackage,liblz4))