DESCRIPTION = "A framework for simple filesystem replication \
and/or security monitoring and/or automatic file transformations"
SECTION = "base"
PRIORITY = "optional"
MAINTAINER = "Michael Lauer <mickey@Vanille.de>"
LICENSE = "GPL"

SRC_URI = "http://www.bangstate.com/changedfiles-${PV}.tar.gz"
S = "${WORKDIR}/changedfiles-${PV}/module"

inherit module

do_compile() {
        ${CC} -Wall -DMODULE -D__KERNEL__ -I${STAGING_KERNEL_DIR}/include -c changedfiles.c
}

pkg_postinst() {
#!/bin/sh
if [ -n $D ]; then exit 1; fi
/bin/mknod /dev/changedfiles c 40 0; exit 0
chmod 0600 /dev/changedfiles
}

pkg_postrm() {
#!/bin/sh
if [ -n $D ]; then exit 1; fi
rm -f /dev/changedfiles
}

do_install() {
	install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/fs/changedfiles/
	install -m 0755 changedfiles.o ${D}/lib/modules/${KERNEL_VERSION}/kernel/fs/changedfiles/
}