summaryrefslogtreecommitdiff
path: root/package/compcache/Makefile
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-11-23 22:30:42 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-11-23 22:30:42 +0000
commit1f24cd1700272f566ece8cbcde509494ccb894d0 (patch)
treeace4e1d121694a6cf16ad11ae41b423e260496f3 /package/compcache/Makefile
parent9fce92753fbaf50f800e991a20f697566374f7e8 (diff)
downloadmtk-20170518-1f24cd1700272f566ece8cbcde509494ccb894d0.zip
mtk-20170518-1f24cd1700272f566ece8cbcde509494ccb894d0.tar.gz
mtk-20170518-1f24cd1700272f566ece8cbcde509494ccb894d0.tar.bz2
update compcache to 0.5.4 (#6018)
SVN-Revision: 18512
Diffstat (limited to 'package/compcache/Makefile')
-rw-r--r--package/compcache/Makefile36
1 files changed, 21 insertions, 15 deletions
diff --git a/package/compcache/Makefile b/package/compcache/Makefile
index a4d8451..8ca581b 100644
--- a/package/compcache/Makefile
+++ b/package/compcache/Makefile
@@ -1,21 +1,19 @@
#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-# $Id: Makefile 6562 2009-01-21 11:19:24 ghd $
+# $Id: Makefile 6562 2009-10-05 08:30:14 ghd $
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=compcache
-PKG_VERSION:=0.5
+PKG_VERSION:=0.5.4
PKG_RELEASE:=$(PKG_VERSION)-1
PKG_SOURCE_URL:=http://compcache.googlecode.com/files/
-PKG_MD5SUM:=eea73324e9e69178866f6c0fbc852f1f
-
-#PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
+PKG_MD5SUM:=e83535925a014ac34e1eaeb4f7a2f49a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -26,18 +24,18 @@ define KernelPackage/compcache
DEPENDS:=@LINUX_2_6 @BUSYBOX_CONFIG_SWAPONOFF
TITLE:=Driver for compressed ram swap device
VERSION:=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)+$(PKG_RELEASE)
- FILES:=$(PKG_BUILD_DIR)/compcache.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/sub-projects/compression/lzo-kmod/lzo1x.$(LINUX_KMOD_SUFFIX) \
- $(PKG_BUILD_DIR)/sub-projects/allocators/xvmalloc-kmod/xvmalloc.$(LINUX_KMOD_SUFFIX)
-# AUTOLOAD:=$(call AutoLoad,10,xvmalloc lzo1x compcache+compcache_size_kbytes=2048)
+ FILES:=$(PKG_BUILD_DIR)/ramzswap.$(LINUX_KMOD_SUFFIX) \
+ $(PKG_BUILD_DIR)/sub-projects/compression/lzo-kmod/lzo1x.$(LINUX_KMOD_SUFFIX) \
+ $(PKG_BUILD_DIR)/sub-projects/allocators/xvmalloc-kmod/xvmalloc.$(LINUX_KMOD_SUFFIX)
endef
-BUILDFLAGS:=-DCONFIG_BLK_DEV_COMPCACHE_DEBUG=0 \
- -DCONFIG_BLK_DEV_COMPCACHE_STATS=1 \
- -DCONFIG_XV_DEBUG=0 \
- -DCONFIG_XV_STATS=1 \
- -g -Wall
+XVM = sub-projects/allocators/xvmalloc-kmod
+LZO = sub-projects/compression/lzo-kmod
+BUILDFLAGS:=-DCONFIG_BLK_DEV_RAMZSWAP_STATS \
+ -I$(PKG_BUILD_DIR)/$(XVM) \
+ -I$(PKG_BUILD_DIR)/$(LZO) \
+ -g -Wall
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
@@ -52,8 +50,16 @@ endef
define KernelPackage/compcache/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/compcache.config $(1)/etc/config/compcache
+ $(SED) 's,%ENABLED%,$(if $(CONFIG_COMPCACHE_ENABLE),1,0),g' \
+ -e 's,%RAM_REPORTED%,$(call qstrip,$(CONFIG_COMPCACHE_RAM_REPORTED)),g' \
+ -e 's,%BACKUP_DEV%,$(call qstrip,$(CONFIG_COMPCACHE_BACKUP_DEV)),g' \
+ $(1)/etc/config/compcache
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/compcache.init $(1)/etc/init.d/compcache
endef
+define KernelPackage/compcache/config
+ source "$(SOURCE)/Config.in"
+endef
+
$(eval $(call KernelPackage,compcache))