# Description: File integrity / intrusion detection system
# URL:         http://la-samhna.de/samhain/
# Maintainer:  Juergen Daubert, juergen dot daubert at t-online dot de

name=samhain
version=2.5.8
release=1
source=(http://la-samhna.de/archive/${name}_signed-$version.tar.gz)

build () {
    tar xfz $name-$version.tar.gz

    cd $name-$version
    ./configure --prefix=/usr \
                --mandir=/usr/man \
                --localstatedir=/var \
                --sysconfdir=/etc \
                --with-log-file=/var/log/samhain.log \
                --enable-static \
                --enable-login-watch \
                --enable-suidcheck
    make -j1
    make DESTDIR=$PKG install

    rm -r $PKG/var/run

    touch $PKG/var/log/samhain.log
    touch $PKG/var/lib/samhain/samhain_file
    chmod 0640 $PKG/var/log/samhain.log
    chmod 0640 $PKG/var/lib/samhain/samhain_file
}