Changeset 22458


Ignore:
Timestamp:
2010-08-01T18:57:24+02:00 (8 years ago)
Author:
acoul
Message:

package/compcache: use mainline modules for kernels >=2.6.33 (thank you nbd)

Location:
trunk
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/compcache/Makefile

    r22367 r22458  
    1111PKG_NAME:=compcache 
    1212PKG_VERSION:=0.6.2 
    13 PKG_RELEASE:=2 
     13PKG_RELEASE:=3 
    1414PKG_SOURCE_URL:=http://compcache.googlecode.com/files/ 
    1515PKG_MD5SUM:=27aec78dc50e34fb800c74e879057743 
     
    2424  TITLE:=Driver for compressed ram swap device 
    2525  VERSION:=$(LINUX_VERSION)-$(BOARD)-$(LINUX_RELEASE)+$(PKG_RELEASE) 
    26   FILES:=$(PKG_BUILD_DIR)/ramzswap.ko \ 
    27          $(PKG_BUILD_DIR)/sub-projects/compression/lzo-kmod/lzo1x.ko 
     26  KCONFIG:=CONFIG_RAMZSWAP=m CONFIG_RAMZSWAP_STATS=n 
     27ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.33)),1) 
     28  FILES:= \ 
     29        $(LINUX_DIR)/drivers/staging/ramzswap/ramzswap.ko \ 
     30        $(LINUX_DIR)/lib/lzo/lzo_compress.ko \ 
     31        $(LINUX_DIR)/lib/lzo/lzo_decompress.ko  
     32else 
     33  FILES:= \ 
     34        $(PKG_BUILD_DIR)/ramzswap.ko \ 
     35        $(PKG_BUILD_DIR)/sub-projects/compression/lzo-kmod/lzo1x.ko 
     36endif 
    2837  URL:=http://code.google.com/p/compcache/ 
    2938endef 
     
    4049include $(INCLUDE_DIR)/kernel-defaults.mk 
    4150 
    42 LZO = sub-projects/compression/lzo-kmod 
    4351RZSC = sub-projects/rzscontrol 
    44  
    45 BUILDFLAGS:=-DCONFIG_RAMZSWAP_STATS \ 
    46             -I$(PKG_BUILD_DIR)/$(LZO) \ 
    47             -Wall 
    4852 
    4953RZSCFLAGS:=-I$(PKG_BUILD_DIR)/$(RZSC)/../include \ 
    5054           -I$(PKG_BUILD_DIR)/$(RZSC)/../.. 
    5155 
    52 define Build/Compile 
    53         $(MAKE) $(KERNEL_MAKEOPTS) EXTRA_CFLAGS="$(BUILDFLAGS)" M="$(PKG_BUILD_DIR)" modules 
     56ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.33)),1) 
     57 define Build/Compile 
     58        $(TARGET_CC) $(TARGET_CFLAGS) $(RZSCFLAGS) $(PKG_BUILD_DIR)/$(RZSC)/rzscontrol.c -o $(PKG_BUILD_DIR)/rzscontrol  
     59 endef 
     60else  
     61 define Build/Compile 
     62        $(MAKE) $(KERNEL_MAKEOPTS) EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/sub-projects/compression/lzo-kmod -Wall" M="$(PKG_BUILD_DIR)" modules 
    5463        $(TARGET_CC) $(TARGET_CFLAGS) $(RZSCFLAGS) $(PKG_BUILD_DIR)/$(RZSC)/rzscontrol.c -o $(PKG_BUILD_DIR)/rzscontrol 
    55 endef 
     64 endef 
     65endif 
    5666 
    5767define Package/compcache/install 
     
    6373              $(1)/etc/config/compcache 
    6474        $(INSTALL_DIR) $(1)/etc/init.d 
     75ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.33)),1) 
     76        $(INSTALL_BIN) ./files/compcache.init.new $(1)/etc/init.d/compcache 
     77else 
    6578        $(INSTALL_BIN) ./files/compcache.init $(1)/etc/init.d/compcache 
     79endif 
    6680        $(INSTALL_DIR) $(1)/sbin 
    6781        $(INSTALL_BIN) $(PKG_BUILD_DIR)/rzscontrol $(1)/sbin/rzscontrol 
Note: See TracChangeset for help on using the changeset viewer.