Sunday, October 7, 2012

Compcache: Easy installation


(Very old information, unlikely to be useful anymore, kept here for the sake of history)


Being a happy user of compcache (on a Xubuntu system), I have prepared a very simple patch to have it easily installed on my system, and reinstalled whenever kernel changes or I just want to try a new version. The patch adds an "install" target to compcache's main Makefile, in order to install an LSB-compliant init script, so compcache is loaded and unloaded at the proper system levels.


This is, roughly, the make code:

PWD := $(shell pwd)
KD := /lib/modules/$(shell uname -r)/build
install:
        make -C $(KD) M=$(PWD) INSTALL_MOD_STRIP=1 modules_install
        depmod
        install init-compcache /etc/init.d/compcache
        update-rc.d compcache defaults

 
Here is the init script: init-compcache.

And here is the full patch that you can apply with "patch < compcache_installation.diff " on a fresh compcache-0.5.1 source tree: compcache_installation.diff. After that, build it with "make" and install it with "sudo make install".

No comments:

Post a Comment