mac80211: i maintain this package
[openwrt.git] / package / compcache / Makefile
1 #
2 # Copyright (C) 2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 6562 2009-10-05 08:30:14 ghd $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=compcache
13 PKG_VERSION:=0.5.4
14 PKG_RELEASE:=$(PKG_VERSION)-1
15 PKG_SOURCE_URL:=http://compcache.googlecode.com/files/
16 PKG_MD5SUM:=e83535925a014ac34e1eaeb4f7a2f49a
17
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define KernelPackage/compcache
23 SUBMENU:=Other modules
24 DEPENDS:=@LINUX_2_6 @BUSYBOX_CONFIG_SWAPONOFF
25 TITLE:=Driver for compressed ram swap device
26 VERSION:=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)+$(PKG_RELEASE)
27 FILES:=$(PKG_BUILD_DIR)/ramzswap.$(LINUX_KMOD_SUFFIX) \
28 $(PKG_BUILD_DIR)/sub-projects/compression/lzo-kmod/lzo1x.$(LINUX_KMOD_SUFFIX) \
29 $(PKG_BUILD_DIR)/sub-projects/allocators/xvmalloc-kmod/xvmalloc.$(LINUX_KMOD_SUFFIX)
30 endef
31
32 XVM = sub-projects/allocators/xvmalloc-kmod
33 LZO = sub-projects/compression/lzo-kmod
34
35 BUILDFLAGS:=-DCONFIG_BLK_DEV_RAMZSWAP_STATS \
36 -I$(PKG_BUILD_DIR)/$(XVM) \
37 -I$(PKG_BUILD_DIR)/$(LZO) \
38 -g -Wall
39
40 define Build/Compile
41 $(MAKE) -C "$(LINUX_DIR)" \
42 CROSS_COMPILE="$(KERNEL_CROSS)" \
43 CC="$(KERNEL_CC)" \
44 ARCH="$(LINUX_KARCH)" \
45 SUBDIRS="$(PKG_BUILD_DIR)" \
46 EXTRA_CFLAGS="$(BUILDFLAGS)" \
47 modules
48 endef
49
50 define KernelPackage/compcache/install
51 $(INSTALL_DIR) $(1)/etc/config
52 $(INSTALL_DATA) ./files/compcache.config $(1)/etc/config/compcache
53 $(SED) 's,%ENABLED%,$(if $(CONFIG_COMPCACHE_ENABLE),1,0),g' \
54 -e 's,%RAM_REPORTED%,$(call qstrip,$(CONFIG_COMPCACHE_RAM_REPORTED)),g' \
55 -e 's,%BACKUP_DEV%,$(call qstrip,$(CONFIG_COMPCACHE_BACKUP_DEV)),g' \
56 $(1)/etc/config/compcache
57 $(INSTALL_DIR) $(1)/etc/init.d
58 $(INSTALL_BIN) ./files/compcache.init $(1)/etc/init.d/compcache
59 endef
60
61 define KernelPackage/compcache/config
62 source "$(SOURCE)/Config.in"
63 endef
64
65 $(eval $(call KernelPackage,compcache))
This page took 0.042197 seconds and 5 git commands to generate.